Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md4
-rw-r--r--admin.services/.classpath33
-rw-r--r--admin.services/.project36
-rw-r--r--admin.services/.settings/org.eclipse.jdt.core.prefs2
-rw-r--r--admin.services/.settings/org.eclipse.jpt.core.prefs10
-rw-r--r--admin.services/.settings/org.eclipse.m2e.core.prefs4
-rw-r--r--admin.services/.settings/org.eclipse.wst.common.component10
-rw-r--r--admin.services/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml7
-rw-r--r--admin.services/.settings/org.eclipse.wst.common.project.facet.core.xml6
-rw-r--r--admin.services/eclipse-runconfigs/CreateDatabaseTest (1).launch18
-rw-r--r--admin.services/eclipse-runconfigs/CreateDatabaseTest.launch16
-rw-r--r--admin.services/eclipse-runconfigs/TestCreateHostEnvironments.launch16
-rw-r--r--admin.services/eclipse-runconfigs/TestCreateLeagues (1).launch18
-rw-r--r--admin.services/eclipse-runconfigs/TestCreateLeagues.launch16
-rw-r--r--admin.services/eclipse-runconfigs/TestCreateOrmXml.launch16
-rw-r--r--admin.services/eclipse-runconfigs/TestCreateStyles.launch16
-rw-r--r--admin.services/eclipse-runconfigs/TestHostedLeagueRepository.launch16
-rw-r--r--admin.services/eclipse-runconfigs/VerifyModelAndMappingsTest.launch18
-rw-r--r--admin.services/ejbModule/META-INF/MANIFEST.MF3
-rw-r--r--admin.services/pom.xml161
-rw-r--r--admin.services/src/main/java/eclipselink/example/mysports/admin/examples/ExampleLeagueDefinition.java133
-rw-r--r--admin.services/src/main/java/eclipselink/example/mysports/admin/model/DataIsolation.java58
-rw-r--r--admin.services/src/main/java/eclipselink/example/mysports/admin/model/Datasource.java97
-rw-r--r--admin.services/src/main/java/eclipselink/example/mysports/admin/model/Extension.java139
-rw-r--r--admin.services/src/main/java/eclipselink/example/mysports/admin/model/GlassFish.java46
-rw-r--r--admin.services/src/main/java/eclipselink/example/mysports/admin/model/HostEnvironment.java72
-rw-r--r--admin.services/src/main/java/eclipselink/example/mysports/admin/model/HostedLeague.java265
-rw-r--r--admin.services/src/main/java/eclipselink/example/mysports/admin/model/Style.java61
-rw-r--r--admin.services/src/main/java/eclipselink/example/mysports/admin/model/WebLogic.java36
-rw-r--r--admin.services/src/main/java/eclipselink/example/mysports/admin/model/jaxb.properties1
-rw-r--r--admin.services/src/main/java/eclipselink/example/mysports/admin/model/persistence/ExtensionMappingsCustomizer.java35
-rw-r--r--admin.services/src/main/java/eclipselink/example/mysports/admin/services/AdminSchemaManager.java41
-rw-r--r--admin.services/src/main/java/eclipselink/example/mysports/admin/services/HostEnvironmentRepository.java19
-rw-r--r--admin.services/src/main/java/eclipselink/example/mysports/admin/services/HostEnvironmentRepositoryBean.java52
-rw-r--r--admin.services/src/main/java/eclipselink/example/mysports/admin/services/HostedLeagueRepository.java47
-rw-r--r--admin.services/src/main/java/eclipselink/example/mysports/admin/services/HostedLeagueRepositoryBean.java109
-rw-r--r--admin.services/src/main/java/eclipselink/example/mysports/admin/services/MappingsLoader.java158
-rw-r--r--admin.services/src/main/java/eclipselink/example/mysports/admin/services/glassfish/JDBCResource.java119
-rw-r--r--admin.services/src/main/java/eclipselink/example/mysports/admin/services/glassfish/MOXyContextHelper.java58
-rw-r--r--admin.services/src/main/java/eclipselink/example/mysports/admin/services/glassfish/Message.java29
-rw-r--r--admin.services/src/main/java/eclipselink/example/mysports/admin/services/glassfish/Properties.java25
-rw-r--r--admin.services/src/main/java/eclipselink/example/mysports/admin/services/glassfish/Property.java25
-rw-r--r--admin.services/src/main/java/eclipselink/example/mysports/admin/services/glassfish/RESTOperations.java74
-rw-r--r--admin.services/src/main/java/eclipselink/example/mysports/admin/services/glassfish/Result.java95
-rw-r--r--admin.services/src/main/java/eclipselink/example/mysports/admin/services/glassfish/jaxb.properties1
-rw-r--r--admin.services/src/main/jpa-modelgen/eclipselink/example/mysports/admin/model/Extension_.java15
-rw-r--r--admin.services/src/main/jpa-modelgen/eclipselink/example/mysports/admin/model/GlassFish_.java9
-rw-r--r--admin.services/src/main/jpa-modelgen/eclipselink/example/mysports/admin/model/HostEnvironment_.java13
-rw-r--r--admin.services/src/main/jpa-modelgen/eclipselink/example/mysports/admin/model/HostedLeague_.java22
-rw-r--r--admin.services/src/main/jpa-modelgen/eclipselink/example/mysports/admin/model/Style_.java12
-rw-r--r--admin.services/src/main/jpa-modelgen/eclipselink/example/mysports/admin/model/WebLogic_.java9
-rw-r--r--admin.services/src/main/resources/META-INF/eclipselink-oxm.xml23
-rw-r--r--admin.services/src/main/resources/META-INF/persistence.xml25
-rw-r--r--admin.services/src/main/resources/black.css209
-rw-r--r--admin.services/src/main/resources/blue.css212
-rw-r--r--admin.services/src/main/resources/default.css212
-rw-r--r--admin.services/src/main/resources/green.css212
-rw-r--r--admin.services/src/main/resources/red.css209
-rw-r--r--admin.services/src/test/java/eclipselink/example/mysports/admin/services/test/AdminPersistenceTesting.java115
-rw-r--r--admin.services/src/test/java/eclipselink/example/mysports/admin/services/test/CreateDatabaseTest.java125
-rw-r--r--admin.services/src/test/java/eclipselink/example/mysports/admin/services/test/HostedLeagueRepositoryHandler.java72
-rw-r--r--admin.services/src/test/java/eclipselink/example/mysports/admin/services/test/TestCreateHostEnvironments.java102
-rw-r--r--admin.services/src/test/java/eclipselink/example/mysports/admin/services/test/TestCreateLeagues.java62
-rw-r--r--admin.services/src/test/java/eclipselink/example/mysports/admin/services/test/TestHostedLeagueRepository.java128
-rw-r--r--admin.services/src/test/java/eclipselink/example/mysports/admin/services/test/VerifyModelAndMappingsTest.java89
-rw-r--r--admin.services/src/test/java/eclipselink/example/mysports/admin/services/test/extensions/TestCreateOrmXml.java65
-rw-r--r--admin.services/src/test/java/eclipselink/example/mysports/admin/services/test/league/TestDynamicJAXB.java74
-rw-r--r--admin.services/src/test/java/eclipselink/example/mysports/admin/services/test/services/ServerTests.java24
-rw-r--r--admin.services/src/test/java/eclipselink/example/mysports/admin/services/test/services/glassfish/TestBaseJsonRest.java81
-rw-r--r--admin.services/src/test/java/eclipselink/example/mysports/admin/services/test/services/glassfish/TestMOXyContext.java76
-rw-r--r--admin.services/src/test/java/eclipselink/example/mysports/admin/services/test/services/glassfish/TestParseJDBCConnectPool_mysports.java39
-rw-r--r--admin.services/src/test/java/eclipselink/example/mysports/admin/services/test/services/glassfish/TestParseJDBCConnectPool_mysports_property.java39
-rw-r--r--admin.services/src/test/java/eclipselink/example/mysports/admin/services/test/services/glassfish/TestParseJDBCResources.java66
-rw-r--r--admin.services/src/test/java/eclipselink/example/mysports/admin/services/test/services/glassfish/TestParseListJDBCConnectionPools.java50
-rw-r--r--admin.services/src/test/java/eclipselink/example/mysports/admin/services/test/services/glassfish/TestParseListJDBCResources.java100
-rw-r--r--admin.services/src/test/resource/eclipselink-example-mysports.properties19
-rw-r--r--admin.services/src/test/resource/eclipselink/example/mysports/admin/services/test/services/glassfish/eclipselink-example-mysports.properties19
-rw-r--r--admin.services/src/test/resource/eclipselink/example/mysports/admin/services/test/services/glassfish/jdbc-connection-pool_mysports.json304
-rw-r--r--admin.services/src/test/resource/eclipselink/example/mysports/admin/services/test/services/glassfish/jdbc-connection-pool_mysports_property.json29
-rw-r--r--admin.services/src/test/resource/eclipselink/example/mysports/admin/services/test/services/glassfish/jdbc-resource.json71
-rw-r--r--admin.services/src/test/resource/eclipselink/example/mysports/admin/services/test/services/glassfish/list-jdbc-connection-pools.json36
-rw-r--r--admin.services/src/test/resource/eclipselink/example/mysports/admin/services/test/services/glassfish/list-jdbc-resources.json36
-rw-r--r--admin.services/src/test/resource/eclipselink/example/mysports/admin/services/test/style/black.css209
-rw-r--r--admin.services/src/test/resource/eclipselink/example/mysports/admin/services/test/style/blue.css212
-rw-r--r--admin.services/src/test/resource/eclipselink/example/mysports/admin/services/test/style/default.css212
-rw-r--r--admin.services/src/test/resource/eclipselink/example/mysports/admin/services/test/style/green.css212
-rw-r--r--admin.services/src/test/resource/eclipselink/example/mysports/admin/services/test/style/red.css209
-rw-r--r--admin.web/.classpath32
-rw-r--r--admin.web/.project42
-rw-r--r--admin.web/.settings/.jsdtscope12
-rw-r--r--admin.web/.settings/org.eclipse.jdt.core.prefs5
-rw-r--r--admin.web/.settings/org.eclipse.m2e.core.prefs4
-rw-r--r--admin.web/.settings/org.eclipse.wst.common.component13
-rw-r--r--admin.web/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml12
-rw-r--r--admin.web/.settings/org.eclipse.wst.common.project.facet.core.xml9
-rw-r--r--admin.web/.settings/org.eclipse.wst.jsdt.ui.superType.container1
-rw-r--r--admin.web/.settings/org.eclipse.wst.jsdt.ui.superType.name1
-rw-r--r--admin.web/pom.xml79
-rw-r--r--admin.web/src/main/java/eclipselink/example/mysports/admin/jaxrs/HostedLeaguesService.java103
-rw-r--r--admin.web/src/main/java/eclipselink/example/mysports/admin/jaxrs/MySportsContextResolver.java66
-rw-r--r--admin.web/src/main/java/eclipselink/example/mysports/admin/jsf/CreateLeague.java81
-rw-r--r--admin.web/src/main/java/eclipselink/example/mysports/admin/jsf/CurrentUser.java35
-rw-r--r--admin.web/src/main/java/eclipselink/example/mysports/admin/jsf/DatasourceRepositoryBean.java46
-rw-r--r--admin.web/src/main/java/eclipselink/example/mysports/admin/jsf/HostEnvironmentRepositoryBean.java42
-rw-r--r--admin.web/src/main/java/eclipselink/example/mysports/admin/jsf/LeagueRepository.java51
-rw-r--r--admin.web/src/main/java/eclipselink/example/mysports/admin/jsf/MySportsPhaseListener.java47
-rw-r--r--admin.web/src/main/java/eclipselink/example/mysports/admin/jsf/NoCacheFilter.java55
-rw-r--r--admin.web/src/main/java/eclipselink/example/mysports/admin/jsf/ViewLeague.java191
-rw-r--r--admin.web/src/main/resources/hthl.pngbin8522 -> 0 bytes
-rw-r--r--admin.web/src/main/resources/kfl.pngbin8228 -> 0 bytes
-rw-r--r--admin.web/src/main/resources/mha.pngbin26028 -> 0 bytes
-rw-r--r--admin.web/src/main/resources/osl.pngbin9056 -> 0 bytes
-rw-r--r--admin.web/src/main/webapp/META-INF/MANIFEST.MF3
-rw-r--r--admin.web/src/main/webapp/WEB-INF/faces-config.xml7
-rw-r--r--admin.web/src/main/webapp/WEB-INF/sun-web.xml9
-rw-r--r--admin.web/src/main/webapp/WEB-INF/template.xhtml41
-rw-r--r--admin.web/src/main/webapp/WEB-INF/web.xml38
-rw-r--r--admin.web/src/main/webapp/WEB-INF/weblogic.xml4
-rw-r--r--admin.web/src/main/webapp/about.xhtml14
-rw-r--r--admin.web/src/main/webapp/default.css93
-rw-r--r--admin.web/src/main/webapp/images/bg_button_a.gifbin577 -> 0 bytes
-rw-r--r--admin.web/src/main/webapp/images/bg_button_span.gifbin1419 -> 0 bytes
-rw-r--r--admin.web/src/main/webapp/images/eclipselink.pngbin3092 -> 0 bytes
-rw-r--r--admin.web/src/main/webapp/images/mysports.pngbin18571 -> 0 bytes
-rw-r--r--admin.web/src/main/webapp/index.xhtml63
-rw-r--r--admin.web/src/main/webapp/league.xhtml117
-rw-r--r--admin.web/src/main/webapp/logos/hthl.pngbin8522 -> 0 bytes
-rw-r--r--admin.web/src/main/webapp/logos/kfl.pngbin8228 -> 0 bytes
-rw-r--r--admin.web/src/main/webapp/logos/osl.pngbin9056 -> 0 bytes
-rw-r--r--admin.web/src/main/webapp/xsds/leagues.xsd23
-rw-r--r--admin.web/src/test/java/eclipselink/example/mysports/admin/test/CreateOrmXML.java53
-rw-r--r--admin.web/src/test/java/eclipselink/example/mysports/admin/test/CreateStyles.java98
-rw-r--r--admin.web/src/test/java/eclipselink/example/mysports/admin/test/CreateXMLBindingsTests.java17
-rw-r--r--admin.web/src/test/java/eclipselink/example/mysports/admin/test/LeagueJAXBTests.java85
-rw-r--r--admin.web/src/test/java/eclipselink/example/mysports/admin/test/SchemaGenerator.java33
-rw-r--r--application/.classpath37
-rw-r--r--application/.project42
-rw-r--r--application/.settings/.jsdtscope12
-rw-r--r--application/.settings/org.eclipse.jdt.core.prefs12
-rw-r--r--application/.settings/org.eclipse.jpt.core.prefs7
-rw-r--r--application/.settings/org.eclipse.m2e.core.prefs4
-rw-r--r--application/.settings/org.eclipse.wst.common.component14
-rw-r--r--application/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml17
-rw-r--r--application/.settings/org.eclipse.wst.common.project.facet.core.xml10
-rw-r--r--application/.settings/org.eclipse.wst.jsdt.ui.superType.container1
-rw-r--r--application/.settings/org.eclipse.wst.jsdt.ui.superType.name1
-rw-r--r--application/eclipse-config/TestCreateTenantEMF.launch16
-rw-r--r--application/eclipse-config/TestExampleLeagues (1).launch18
-rw-r--r--application/eclipse-config/TestExampleLeagues.launch16
-rw-r--r--application/eclipse-config/TestModelAndMappings.launch16
-rw-r--r--application/eclipse-config/TestSchemaCreation (1).launch18
-rw-r--r--application/pom.xml184
-rw-r--r--application/src/main/java/eclipselink/example/mysports/application/MySportsConfig.java44
-rw-r--r--application/src/main/java/eclipselink/example/mysports/application/admin/AdminMetadataSource.java76
-rw-r--r--application/src/main/java/eclipselink/example/mysports/application/admin/AdminServerConnector.java44
-rw-r--r--application/src/main/java/eclipselink/example/mysports/application/admin/HostedLeagues.java33
-rw-r--r--application/src/main/java/eclipselink/example/mysports/application/admin/League.java86
-rw-r--r--application/src/main/java/eclipselink/example/mysports/application/admin/MoxyContextHelper.java67
-rw-r--r--application/src/main/java/eclipselink/example/mysports/application/admin/RESTAdminServerConnector.java132
-rw-r--r--application/src/main/java/eclipselink/example/mysports/application/admin/leagues-oxm.xml26
-rw-r--r--application/src/main/java/eclipselink/example/mysports/application/model/Division.java139
-rw-r--r--application/src/main/java/eclipselink/example/mysports/application/model/Division_.java16
-rw-r--r--application/src/main/java/eclipselink/example/mysports/application/model/Extensible.java29
-rw-r--r--application/src/main/java/eclipselink/example/mysports/application/model/MOXyHelper.java50
-rw-r--r--application/src/main/java/eclipselink/example/mysports/application/model/Player.java185
-rw-r--r--application/src/main/java/eclipselink/example/mysports/application/model/Player_.java18
-rw-r--r--application/src/main/java/eclipselink/example/mysports/application/model/Team.java134
-rw-r--r--application/src/main/java/eclipselink/example/mysports/application/model/Team_.java16
-rw-r--r--application/src/main/java/eclipselink/example/mysports/application/model/User.java62
-rw-r--r--application/src/main/java/eclipselink/example/mysports/application/model/User_.java14
-rw-r--r--application/src/main/java/eclipselink/example/mysports/application/services/LeagueRepository.java483
-rw-r--r--application/src/main/java/eclipselink/example/mysports/application/services/PersistenceWeavingBean.java40
-rw-r--r--application/src/main/java/eclipselink/example/mysports/application/view/BaseManagedBean.java54
-rw-r--r--application/src/main/java/eclipselink/example/mysports/application/view/BaseTeamBean.java193
-rw-r--r--application/src/main/java/eclipselink/example/mysports/application/view/CreateDivision.java57
-rw-r--r--application/src/main/java/eclipselink/example/mysports/application/view/CreateTeam.java103
-rw-r--r--application/src/main/java/eclipselink/example/mysports/application/view/EditDivision.java57
-rw-r--r--application/src/main/java/eclipselink/example/mysports/application/view/EditTeam.java70
-rw-r--r--application/src/main/java/eclipselink/example/mysports/application/view/ExtensibleEntity.java77
-rw-r--r--application/src/main/java/eclipselink/example/mysports/application/view/LeagueRepositoryBean.java70
-rw-r--r--application/src/main/java/eclipselink/example/mysports/application/view/LeaguesList.java38
-rw-r--r--application/src/main/java/eclipselink/example/mysports/application/view/LookAndFeel.java51
-rw-r--r--application/src/main/java/eclipselink/example/mysports/application/view/MySportsPhaseListener.java50
-rw-r--r--application/src/main/java/eclipselink/example/mysports/application/view/NoCacheFilter.java51
-rw-r--r--application/src/main/java/eclipselink/example/mysports/application/view/ViewDivision.java50
-rw-r--r--application/src/main/java/eclipselink/example/mysports/application/view/ViewLeague.java59
-rw-r--r--application/src/main/java/eclipselink/example/mysports/application/view/ViewTeam.java43
-rw-r--r--application/src/main/java/resources/application.properties7
-rw-r--r--application/src/main/resources/META-INF/eclipselink-oxm.xml53
-rw-r--r--application/src/main/resources/META-INF/local-eclipselink-orm.xml9
-rw-r--r--application/src/main/resources/META-INF/persistence.xml28
-rw-r--r--application/src/main/resources/my-sports.properties3
-rw-r--r--application/src/main/resources/resources/application.properties5
-rw-r--r--application/src/main/webapp/META-INF/MANIFEST.MF3
-rw-r--r--application/src/main/webapp/WEB-INF/faces-config.xml17
-rw-r--r--application/src/main/webapp/WEB-INF/sun-web.xml20
-rw-r--r--application/src/main/webapp/WEB-INF/web.xml16
-rw-r--r--application/src/main/webapp/WEB-INF/weblogic.xml4
-rw-r--r--application/src/main/webapp/create-division.xhtml36
-rw-r--r--application/src/main/webapp/create-team.xhtml51
-rw-r--r--application/src/main/webapp/default.css212
-rw-r--r--application/src/main/webapp/edit-team.xhtml43
-rw-r--r--application/src/main/webapp/images/add_obj.gifbin318 -> 0 bytes
-rw-r--r--application/src/main/webapp/images/bg_button_a.gifbin577 -> 0 bytes
-rw-r--r--application/src/main/webapp/images/bg_button_span.gifbin1419 -> 0 bytes
-rw-r--r--application/src/main/webapp/images/eclipselink.pngbin3092 -> 0 bytes
-rw-r--r--application/src/main/webapp/images/mysports.pngbin18571 -> 0 bytes
-rw-r--r--application/src/main/webapp/index.jsp13
-rw-r--r--application/src/main/webapp/index.xhtml37
-rw-r--r--application/src/main/webapp/leagues-template.jsf65
-rw-r--r--application/src/main/webapp/player/view.xhtml53
-rw-r--r--application/src/main/webapp/template.jsf65
-rw-r--r--application/src/main/webapp/tsa/index.html59
-rw-r--r--application/src/main/webapp/tsa/mysports.css92
-rw-r--r--application/src/main/webapp/tsa/mysports.js285
-rw-r--r--application/src/main/webapp/view-division.xhtml42
-rw-r--r--application/src/main/webapp/view-league.xhtml42
-rw-r--r--application/src/main/webapp/view-team.xhtml33
-rw-r--r--application/src/test/java/eclipselink/example/mysports/application/test/MockAdminServerConnector.java180
-rw-r--r--application/src/test/java/eclipselink/example/mysports/application/test/TestCreateTenantEMF.java115
-rw-r--r--application/src/test/java/eclipselink/example/mysports/application/test/TestExampleLeagues.java201
-rw-r--r--application/src/test/java/eclipselink/example/mysports/application/test/TestModelAndMappings.java110
-rw-r--r--application/src/test/java/eclipselink/example/mysports/application/test/TestSchemaCreation.java125
-rw-r--r--application/src/test/java/eclipselink/example/mysports/application/test/TestingLeagueRepository.java126
-rw-r--r--application/src/test/java/eclipselink/example/mysports/examples/ExampleLeague.java50
-rw-r--r--application/src/test/java/eclipselink/example/mysports/examples/HighTechHockey.java72
-rw-r--r--application/src/test/java/eclipselink/example/mysports/examples/KidsFootballLeague.java78
-rw-r--r--application/src/test/java/eclipselink/example/mysports/examples/MinorHockeyLeague.java60
-rw-r--r--application/src/test/java/eclipselink/example/mysports/examples/OttawaSoccerLeague.java73
-rw-r--r--application/src/test/java/eclipselink/example/mysports/examples/PlayerFactory.java53
-rw-r--r--application/src/test/resources/META-INF/flex-columns-orm.xml68
-rw-r--r--application/src/test/resources/eclipselink-example-mysports.properties22
-rw-r--r--persistence/.classpath37
-rw-r--r--persistence/.project36
-rw-r--r--persistence/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--persistence/.settings/org.eclipse.m2e.core.prefs4
-rw-r--r--persistence/.settings/org.eclipse.wst.common.component7
-rw-r--r--persistence/.settings/org.eclipse.wst.common.project.facet.core.xml5
-rw-r--r--persistence/pom.xml99
-rw-r--r--persistence/src/main/java/eclipselink/example/mysports/persistence/TenantPerEMFProvider.java86
-rw-r--r--persistence/src/main/java/eclipselink/example/mysports/persistence/TenantPerEMFProviderInitializer.java116
-rw-r--r--persistence/src/main/java/eclipselink/example/mysports/persistence/TenantPerEMFWeavingAgent.java62
-rw-r--r--persistence/src/main/resources/META-INF/MANIFEST.MF11
-rw-r--r--persistence/src/main/resources/META-INF/services/javax.persistence.spi.PersistenceProvider1
-rw-r--r--persistence/src/test/java/eclipselink/example/mysports/persistence/test/ConfigTest.java20
-rw-r--r--persistence/src/test/java/eclipselink/example/mysports/persistence/test/ExamplePropertiesLoader.java83
-rw-r--r--persistence/src/test/java/eclipselink/example/mysports/persistence/test/ProviderTest.java78
-rw-r--r--persistence/src/test/java/eclipselink/example/mysports/persistence/test/persistence.xml12
-rw-r--r--persistence/src/test/java/eclipselink/example/mysports/test/common/ExamplePropertiesLoader.java105
-rw-r--r--persistence/src/test/resources/META-INF/test-persistence.xml12
-rw-r--r--persistence/src/test/resources/eclipselink-example-mysports.properties21
-rw-r--r--pom.xml144
252 files changed, 1 insertions, 14617 deletions
diff --git a/README.md b/README.md
index 1fabfc9..b0034c0 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,4 @@
EclipseLink MySports Example Application
========================================
-This example application illustrates some of the latest features in EclipseLink 2.4 including extensible entities, tenant isolation, and externalized metadata storage.
-
-http://wiki.eclipse.org/EclipseLink/Examples/MySports
+Moved to main EclipseLink examples repo. \ No newline at end of file
diff --git a/admin.services/.classpath b/admin.services/.classpath
deleted file mode 100644
index 9a07d21..0000000
--- a/admin.services/.classpath
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" output="target/classes" path="src/main/java">
- <attributes>
- <attribute name="optional" value="true"/>
- <attribute name="maven.pomderived" value="true"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="src" output="target/test-classes" path="src/test/resource"/>
- <classpathentry kind="src" output="target/test-classes" path="src/test/java">
- <attributes>
- <attribute name="optional" value="true"/>
- <attribute name="maven.pomderived" value="true"/>
- </attributes>
- </classpathentry>
- <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
- <attributes>
- <attribute name="maven.pomderived" value="true"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7">
- <attributes>
- <attribute name="maven.pomderived" value="true"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
- <attributes>
- <attribute name="maven.pomderived" value="true"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="output" path="target/classes"/>
-</classpath>
diff --git a/admin.services/.project b/admin.services/.project
deleted file mode 100644
index 1ae4406..0000000
--- a/admin.services/.project
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>MySports Admin Services</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.wst.common.project.facet.core.builder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.wst.validation.validationbuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.m2e.core.maven2Builder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
- <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.m2e.core.maven2Nature</nature>
- <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
- </natures>
-</projectDescription>
diff --git a/admin.services/.settings/org.eclipse.jdt.core.prefs b/admin.services/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 4ede96d..0000000
--- a/admin.services/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,2 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
diff --git a/admin.services/.settings/org.eclipse.jpt.core.prefs b/admin.services/.settings/org.eclipse.jpt.core.prefs
deleted file mode 100644
index 716ada6..0000000
--- a/admin.services/.settings/org.eclipse.jpt.core.prefs
+++ /dev/null
@@ -1,10 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jpt.core.platform=eclipselink2_4
-org.eclipse.jpt.jpa.core.discoverAnnotatedClasses=false
-problem.EMBEDDED_ID_CLASS_SHOULD_NOT_CONTAIN_RELATIONSHIP_MAPPINGS=error
-problem.MAPPING_INVALID_MAPPED_BY=warning
-problem.MAPS_ID_VALUE_INVALID=error
-problem.PROJECT_INACTIVE_CONNECTION=info
-problem.PROJECT_INVALID_CONNECTION=info
-problem.TYPE_MAPPING_ID_CLASS_ATTRIBUTE_TYPE_DOES_NOT_AGREE=warning
-workspace_preferences_overriden=true
diff --git a/admin.services/.settings/org.eclipse.m2e.core.prefs b/admin.services/.settings/org.eclipse.m2e.core.prefs
deleted file mode 100644
index f897a7f..0000000
--- a/admin.services/.settings/org.eclipse.m2e.core.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-activeProfiles=
-eclipse.preferences.version=1
-resolveWorkspaceProjects=true
-version=1
diff --git a/admin.services/.settings/org.eclipse.wst.common.component b/admin.services/.settings/org.eclipse.wst.common.component
deleted file mode 100644
index 1b08b57..0000000
--- a/admin.services/.settings/org.eclipse.wst.common.component
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
- <wb-module deploy-name="MySports Admin Services">
- <wb-resource deploy-path="/" source-path="/ejbModule" tag="defaultRootSource"/>
- <wb-resource deploy-path="/" source-path="/src/main/java"/>
- <wb-resource deploy-path="/" source-path="/src/test/resource"/>
- <wb-resource deploy-path="/" source-path="/src/test/java"/>
- <wb-resource deploy-path="/" source-path="/src/main/resources"/>
- <property name="java-output-path" value="/MySports Admin Services/target/classes"/>
- </wb-module>
-</project-modules>
diff --git a/admin.services/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml b/admin.services/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml
deleted file mode 100644
index 7961132..0000000
--- a/admin.services/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<root>
- <facet id="jpt.jpa">
- <node name="libprov">
- <attribute name="provider-id" value="jpa-no-op-library-provider"/>
- </node>
- </facet>
-</root>
diff --git a/admin.services/.settings/org.eclipse.wst.common.project.facet.core.xml b/admin.services/.settings/org.eclipse.wst.common.project.facet.core.xml
deleted file mode 100644
index 4f901b8..0000000
--- a/admin.services/.settings/org.eclipse.wst.common.project.facet.core.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<faceted-project>
- <installed facet="java" version="1.7"/>
- <installed facet="jpt.jpa" version="2.0"/>
- <installed facet="jst.ejb" version="3.1"/>
-</faceted-project>
diff --git a/admin.services/eclipse-runconfigs/CreateDatabaseTest (1).launch b/admin.services/eclipse-runconfigs/CreateDatabaseTest (1).launch
deleted file mode 100644
index 57d769e..0000000
--- a/admin.services/eclipse-runconfigs/CreateDatabaseTest (1).launch
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.jdt.junit.launchconfig">
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/MySports Admin Services/src/test/java/eclipselink/example/mysports/admin/services/test/CreateDatabaseTest.java"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
-<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
-<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
-<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
-<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
-<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.m2e.launchconfig.classpathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="eclipselink.example.mysports.admin.services.test.CreateDatabaseTest"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="MySports Admin Services"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.m2e.launchconfig.sourcepathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-javaagent:${system_property:user.home}/.m2/repository/org/eclipse/persistence/eclipselink/2.4.2-SNAPSHOT/eclipselink-2.4.2-SNAPSHOT.jar -Djavax.persistence.jdbc.driver=com.mysql.jdbc.Driver"/>
-</launchConfiguration>
diff --git a/admin.services/eclipse-runconfigs/CreateDatabaseTest.launch b/admin.services/eclipse-runconfigs/CreateDatabaseTest.launch
deleted file mode 100644
index 03bec91..0000000
--- a/admin.services/eclipse-runconfigs/CreateDatabaseTest.launch
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.jdt.junit.launchconfig">
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/admin.services/src/test/java/eclipselink/example/mysports/admin/services/test/TestCreateDatabase.java"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
-<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
-<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
-<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
-<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="eclipselink.example.mysports.admin.services.test.CreateDatabaseTest"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="admin.services"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-javaagent:${system_property:user.home}/.m2/repository/eclipselink/example/mysports/persistence/2.4.2-SNAPSHOT/persistence-2.4.2-SNAPSHOT.jar"/>
-</launchConfiguration>
diff --git a/admin.services/eclipse-runconfigs/TestCreateHostEnvironments.launch b/admin.services/eclipse-runconfigs/TestCreateHostEnvironments.launch
deleted file mode 100644
index c2fb749..0000000
--- a/admin.services/eclipse-runconfigs/TestCreateHostEnvironments.launch
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.jdt.junit.launchconfig">
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/admin.services/src/test/java/eclipselink/example/mysports/admin/services/test/TestCreateHostEnvironments.java"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
-<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
-<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
-<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
-<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="eclipselink.example.mysports.admin.services.test.TestCreateHostEnvironments"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="admin.services"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-javaagent:${system_property:user.home}/.m2/repository/eclipselink/example/mysports/persistence/0.0.1-SNAPSHOT/persistence-0.0.1-SNAPSHOT.jar"/>
-</launchConfiguration>
diff --git a/admin.services/eclipse-runconfigs/TestCreateLeagues (1).launch b/admin.services/eclipse-runconfigs/TestCreateLeagues (1).launch
deleted file mode 100644
index b5c4fd8..0000000
--- a/admin.services/eclipse-runconfigs/TestCreateLeagues (1).launch
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.jdt.junit.launchconfig">
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/MySports Admin Services/src/test/java/eclipselink/example/mysports/admin/services/test/TestCreateLeagues.java"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
-<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
-<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
-<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
-<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
-<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.m2e.launchconfig.classpathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="eclipselink.example.mysports.admin.services.test.TestCreateLeagues"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="MySports Admin Services"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.m2e.launchconfig.sourcepathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-javaagent:${system_property:user.home}/.m2/repository/org/eclipse/persistence/eclipselink/2.4.2-SNAPSHOT/eclipselink-2.4.2-SNAPSHOT.jar"/>
-</launchConfiguration>
diff --git a/admin.services/eclipse-runconfigs/TestCreateLeagues.launch b/admin.services/eclipse-runconfigs/TestCreateLeagues.launch
deleted file mode 100644
index 9a0482e..0000000
--- a/admin.services/eclipse-runconfigs/TestCreateLeagues.launch
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.jdt.junit.launchconfig">
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/admin.services/src/test/java/eclipselink/example/mysports/admin/services/test/TestCreateLeagues.java"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
-<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
-<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
-<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
-<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="eclipselink.example.mysports.admin.services.test.TestCreateLeagues"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="admin.services"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-javaagent:${system_property:user.home}/.m2/repository/eclipselink/example/mysports/persistence/2.4.2-SNAPSHOT/persistence-2.4.2-SNAPSHOT.jar"/>
-</launchConfiguration>
diff --git a/admin.services/eclipse-runconfigs/TestCreateOrmXml.launch b/admin.services/eclipse-runconfigs/TestCreateOrmXml.launch
deleted file mode 100644
index db0f979..0000000
--- a/admin.services/eclipse-runconfigs/TestCreateOrmXml.launch
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.jdt.junit.launchconfig">
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/admin.services/src/test/java/eclipselink/example/mysports/admin/services/test/extensions/TestCreateOrmXml.java"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
-<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
-<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
-<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
-<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="eclipselink.example.mysports.admin.services.test.extensions.TestCreateOrmXml"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="admin.services"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-javaagent:${system_property:user.home}/.m2/repository/eclipselink/example/mysports/persistence/2.4.2-SNAPSHOT/persistence-2.4.2-SNAPSHOT.jar"/>
-</launchConfiguration>
diff --git a/admin.services/eclipse-runconfigs/TestCreateStyles.launch b/admin.services/eclipse-runconfigs/TestCreateStyles.launch
deleted file mode 100644
index bf55ed0..0000000
--- a/admin.services/eclipse-runconfigs/TestCreateStyles.launch
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.jdt.junit.launchconfig">
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/admin.services/src/test/java/eclipselink/example/mysports/admin/services/test/style/TestCreateStyles.java"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
-<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
-<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
-<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
-<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="eclipselink.example.mysports.admin.services.test.style.TestCreateStyles"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="admin.services"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-javaagent:${system_property:user.home}/.m2/repository/eclipselink/example/mysports/persistence/2.4.2-SNAPSHOT/persistence-2.4.2-SNAPSHOT.jar"/>
-</launchConfiguration>
diff --git a/admin.services/eclipse-runconfigs/TestHostedLeagueRepository.launch b/admin.services/eclipse-runconfigs/TestHostedLeagueRepository.launch
deleted file mode 100644
index 42e3f9b..0000000
--- a/admin.services/eclipse-runconfigs/TestHostedLeagueRepository.launch
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.jdt.junit.launchconfig">
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/admin.services/src/test/java/eclipselink/example/mysports/admin/services/test/TestHostedLeagueRepository.java"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
-<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
-<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
-<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
-<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="eclipselink.example.mysports.admin.services.test.TestHostedLeagueRepository"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="admin.services"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-javaagent:${system_property:user.home}/.m2/repository/eclipselink/example/mysports/persistence/2.4.2-SNAPSHOT/persistence-2.4.2-SNAPSHOT.jar"/>
-</launchConfiguration>
diff --git a/admin.services/eclipse-runconfigs/VerifyModelAndMappingsTest.launch b/admin.services/eclipse-runconfigs/VerifyModelAndMappingsTest.launch
deleted file mode 100644
index 742a440..0000000
--- a/admin.services/eclipse-runconfigs/VerifyModelAndMappingsTest.launch
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.jdt.junit.launchconfig">
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/MySports Admin Services/src/test/java/eclipselink/example/mysports/admin/services/test/VerifyModelAndMappingsTest.java"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
-<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
-<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
-<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
-<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
-<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.m2e.launchconfig.classpathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="eclipselink.example.mysports.admin.services.test.VerifyModelAndMappingsTest"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="MySports Admin Services"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.m2e.launchconfig.sourcepathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-javaagent:${system_property:user.home}/.m2/repository/org/eclipse/persistence/eclipselink/2.4.2-SNAPSHOT/eclipselink-2.4.2-SNAPSHOT.jar"/>
-</launchConfiguration>
diff --git a/admin.services/ejbModule/META-INF/MANIFEST.MF b/admin.services/ejbModule/META-INF/MANIFEST.MF
deleted file mode 100644
index 5e94951..0000000
--- a/admin.services/ejbModule/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,3 +0,0 @@
-Manifest-Version: 1.0
-Class-Path:
-
diff --git a/admin.services/pom.xml b/admin.services/pom.xml
deleted file mode 100644
index 0f5f666..0000000
--- a/admin.services/pom.xml
+++ /dev/null
@@ -1,161 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>eclipselink.example.mysports</groupId>
- <artifactId>bom</artifactId>
- <version>2.4.2-SNAPSHOT</version>
- <relativePath>..</relativePath>
- </parent>
-
- <artifactId>admin.services</artifactId>
- <packaging>jar</packaging>
- <name>MySports Admin Services</name>
-
- <dependencies>
-
- <dependency>
- <groupId>${eclipselink.groupid}</groupId>
- <artifactId>eclipselink</artifactId>
- <version>${eclipselink.version}</version>
- <exclusions>
- <exclusion>
- <artifactId>commonj.sdo</artifactId>
- <groupId>commonj.sdo</groupId>
- </exclusion>
- </exclusions>
- <scope>provided</scope>
- </dependency>
-
- <dependency>
- <groupId>javax</groupId>
- <artifactId>javaee-api</artifactId>
- <version>6.0</version>
- <scope>provided</scope>
- </dependency>
-
- <dependency>
- <groupId>com.sun.jersey</groupId>
- <artifactId>jersey-client</artifactId>
- <version>1.16</version>
- </dependency>
-
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.11</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.derby</groupId>
- <artifactId>derby</artifactId>
- <version>10.9.1.0</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>mysql</groupId>
- <artifactId>mysql-connector-java</artifactId>
- <version>5.1.22</version>
- <scope>test</scope>
- </dependency>
-
- </dependencies>
-
- <build>
- <defaultGoal>install</defaultGoal>
-
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>3.0</version>
- <configuration>
- <source>1.6</source>
- <target>1.6</target>
- </configuration>
- </plugin>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <version>2.12.4</version>
- <configuration>
- <argLine>-javaagent:../persistence/target/persistence-${project.version}.jar</argLine>
- <excludedGroups>eclipselink.example.mysports.admin.services.test.services.ServerTests</excludedGroups>
- <systemProperties>
- <property>
- <name>derby.stream.error.file</name>
- <value>target/derby.log</value>
- </property>
- </systemProperties>
- </configuration>
- </plugin>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <version>2.4</version>
- <executions>
- <execution>
- <goals>
- <goal>test-jar</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-
- <profiles>
- <profile>
- <id>mysql</id>
- <activation>
- <property>
- <name>mysql</name>
- </property>
- </activation>
- <dependencies>
- <dependency>
- <groupId>mysql</groupId>
- <artifactId>mysql-connector-java</artifactId>
- <version>5.1.22</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <version>2.12.4</version>
- <configuration>
- <systemProperties>
- <property>
- <name>javax.persistence.jdbc.url</name>
- <value>jdbc:mysql://localhost:3306/mysports</value>
- </property>
- <property>
- <name>javax.persistence.jdbc.driver</name>
- <value>com.mysql.jdbc.Driver</value>
- </property>
- <property>
- <name>javax.persistence.jdbc.user</name>
- <value>mysports</value>
- </property>
- <property>
- <name>javax.persistence.jdbc.password</name>
- <value>mysports</value>
- </property>
- </systemProperties>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
-
-</project>
diff --git a/admin.services/src/main/java/eclipselink/example/mysports/admin/examples/ExampleLeagueDefinition.java b/admin.services/src/main/java/eclipselink/example/mysports/admin/examples/ExampleLeagueDefinition.java
deleted file mode 100644
index 2c2905c..0000000
--- a/admin.services/src/main/java/eclipselink/example/mysports/admin/examples/ExampleLeagueDefinition.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * dclarke - EclipseLink 2.4 - MySports Demo Bug 344608
- ******************************************************************************/
-package eclipselink.example.mysports.admin.examples;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.StringWriter;
-
-import javax.persistence.EntityManager;
-import javax.persistence.EntityManagerFactory;
-
-import eclipselink.example.mysports.admin.model.HostedLeague;
-import eclipselink.example.mysports.admin.services.HostedLeagueRepository;
-
-/**
- * TODO
- *
- * @author dclarke
- * @since EclipseLink 2.4.2
- */
-public abstract class ExampleLeagueDefinition {
-
- private HostedLeague league;
-
- public ExampleLeagueDefinition(String id, String name, String scheme, String logoUrl, String dataSource) {
- this.league = new HostedLeague(id, name, scheme);
- this.league.setLogoUrl(logoUrl);
- this.league.setDatasourceName(dataSource);
- addExtensions();
- }
-
- public HostedLeague getLeague() {
- return league;
- }
-
- protected abstract void addExtensions();
-
- public static ExampleLeagueDefinition OSL = new ExampleLeagueDefinition("OSL", "Ottawa Soccer League", "black", "/logos/osl.png", "jdbc/MySports") {
- @Override
- protected void addExtensions() {
- getLeague().addPlayerExtension("allergies", "java.lang.String", "FLEX_1");
- }
- };
-
- public static ExampleLeagueDefinition HTHL = new ExampleLeagueDefinition("HTHL", "High Tech Hockey League", "red", "/logos/hthl.png", "jdbc/MySports") {
- @Override
- protected void addExtensions() {
- getLeague().addPlayerExtension("position", "java.lang.String", "FLEX_1");
- getLeague().addPlayerExtension("penaltyMinutes", "java.lang.Integer", "FLEX_2");
- }
- };
-
- public static ExampleLeagueDefinition KFL = new ExampleLeagueDefinition("KFL", "Kid's Football League", "green", "/logos/kfl.png", "jdbc/MySports") {
- @Override
- protected void addExtensions() {
- getLeague().addPlayerExtension("position", "java.lang.String", "FLEX_1");
- }
- };
-
- public static ExampleLeagueDefinition MHL = new ExampleLeagueDefinition("MHL", "Minor Hockey League", "red", "/logos/mhl.png", "jdbc/MySportsMHL") {
- @Override
- protected void addExtensions() {
- getLeague().addPlayerExtension("position", "java.lang.String", "FLEX_1");
- }
- };
-
- public static void populateAll(HostedLeagueRepository repository) {
- repository.create(OSL.getLeague());
- repository.create(KFL.getLeague());
- repository.create(MHL.getLeague());
- repository.create(HTHL.getLeague());
- createStyles(repository);
- }
-
- public static void clearDatabase(EntityManagerFactory emf) {
- EntityManager em = emf.createEntityManager();
-
- try {
- em.getTransaction().begin();
- em.createNativeQuery("DELETE FROM mys_admin_player_ext").executeUpdate();
- em.createNativeQuery("DELETE FROM mys_admin_team_ext").executeUpdate();
- em.createNativeQuery("DELETE FROM mys_admin_div_ext").executeUpdate();
- em.createQuery("DELETE FROM HostedLeague").executeUpdate();
- em.createQuery("DELETE FROM Style").executeUpdate();
- em.getTransaction().commit();
- } finally {
- em.close();
- }
- }
-
- public static void createStyles(HostedLeagueRepository repository) {
- repository.createStyle("default", load("blue"));
- repository.createStyle("red", load("red"));
- repository.createStyle("black", load("black"));
- repository.createStyle("blue", load("blue"));
- repository.createStyle("green", load("green"));
- }
-
- private static String load(String name) {
- String resource = name + ".css";
- InputStream in = Thread.currentThread().getContextClassLoader().getResourceAsStream(resource);
-
- if (in == null) {
- throw new IllegalArgumentException("Could not find CSS for '" + name + " @ " + resource);
- }
- try {
- StringWriter writer = new StringWriter(in.available());
- for (int ch = in.read(); ch >= 0; ch = in.read()) {
- writer.write(ch);
- }
- return writer.toString();
- } catch (IOException ioe) {
- throw new RuntimeException(ioe);
- } finally {
- try {
- in.close();
- } catch (IOException e) {
- }
- }
-
- }
-
-}
diff --git a/admin.services/src/main/java/eclipselink/example/mysports/admin/model/DataIsolation.java b/admin.services/src/main/java/eclipselink/example/mysports/admin/model/DataIsolation.java
deleted file mode 100644
index 70cab3c..0000000
--- a/admin.services/src/main/java/eclipselink/example/mysports/admin/model/DataIsolation.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * dclarke - EclipseLink 2.4 - MySports Demo Bug 344608
- ******************************************************************************/
-package eclipselink.example.mysports.admin.model;
-
-import org.eclipse.persistence.annotations.Multitenant;
-
-/**
- * This enum describes the various data isolation modes the MySports example
- * application supports. It leverages the {@link Multitenant} types supported by
- * EclipseLink combined with application specific usage.
- *
- * @author dclarke
- * @since EclipseLink 2.4
- */
-public enum DataIsolation {
-
- /**
- * The data for this league in the same table as other leagues.
- *
- * @Multitenant(SINGLE_TABLE)
- */
- ROW,
-
- /**
- * The data for this league is stored in its own table within a shared
- * schema using the league identifier as a suffix to the default table name
- *
- * @Multitenant(TABLE_PER_TENANT)
- * @TenantTableDiscriminator(type=SUFFIX)
- */
- TABLE,
-
- /**
- * The data for this league is stored in its own table within a shared
- * schema using the league identifier as the schema name
- *
- * @Multitenant(TABLE_PER_TENANT)
- * @TenantTableDiscriminator(type=SCHEMA)
- */
- SCHEMA,
-
- /**
- * The data for this league is stored in a dedicated database. It is the
- * responsibility of the deployer to ensure that a data source is specified
- * that is dedicated to this tenant.
- */
- DATABASE
-}
diff --git a/admin.services/src/main/java/eclipselink/example/mysports/admin/model/Datasource.java b/admin.services/src/main/java/eclipselink/example/mysports/admin/model/Datasource.java
deleted file mode 100644
index 98cc24b..0000000
--- a/admin.services/src/main/java/eclipselink/example/mysports/admin/model/Datasource.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * dclarke - EclipseLink 2.4 - MySports Demo Bug 344608
- ******************************************************************************/
-package eclipselink.example.mysports.admin.model;
-
-
-/**
- * Represents an application's datasource. Within the admin application each
- * data source is managed with both the name in host container as well as the
- * detailed JDBC information to support schema provisioning.
- *
- * @author dclarke
- * @since EclipseLink 2.4
- */
-public class Datasource {
- /**
- * Data source JNDI name
- */
- private String name;
-
- private String description;
-
- private String driver;
-
- private String url;
-
- private String user;
-
- private String password;
-
- private long version;
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public String getDescription() {
- return description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public String getDriver() {
- return driver;
- }
-
- public void setDriver(String driver) {
- this.driver = driver;
- }
-
- public String getUrl() {
- return url;
- }
-
- public void setUrl(String url) {
- this.url = url;
- }
-
- public String getUser() {
- return user;
- }
-
- public void setUser(String user) {
- this.user = user;
- }
-
- public String getPassword() {
- return password;
- }
-
- public void setPassword(String password) {
- this.password = password;
- }
-
- public long getVersion() {
- return version;
- }
-
- public String toString() {
- return "DataSource[" + getName() + "]";
- }
-}
diff --git a/admin.services/src/main/java/eclipselink/example/mysports/admin/model/Extension.java b/admin.services/src/main/java/eclipselink/example/mysports/admin/model/Extension.java
deleted file mode 100644
index ae9c5c9..0000000
--- a/admin.services/src/main/java/eclipselink/example/mysports/admin/model/Extension.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * dclarke - EclipseLink 2.3 - MySports Demo Bug 344608
- ******************************************************************************/
-package eclipselink.example.mysports.admin.model;
-
-import java.io.Serializable;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.Id;
-import javax.persistence.IdClass;
-import javax.persistence.Table;
-
-/**
- * An extension represents an additional 'virtual' attribute that an entity in
- * the MySports application can store.
- *
- * @author dclarke
- * @since EclipseLink 2.3.0
- */
-@Entity
-@IdClass(Extension.ID.class)
-@Table(name = "MYS_ADMIN_EXT")
-public class Extension {
-
- @Id
- private HostedLeague league;
-
- @Id
- private String type;
-
- @Id
- private String name = "";
-
- @Column(name = "JTYPE")
- private String javaType = "java.lang.String";
-
- private String columnName;
-
- public Extension() {
- }
-
- public Extension(String name, String javaType, String columnName) {
- setName(name);
- setJavaType(javaType);
- setColumnName(columnName);
- }
-
- public HostedLeague getLeague() {
- return league;
- }
-
- public String getType() {
- return type;
- }
-
- protected void setLeague(HostedLeague league, String type) {
- this.league = league;
- this.type = type;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public String getJavaType() {
- return javaType;
- }
-
- public void setJavaType(String javaType) {
- this.javaType = javaType;
- }
-
- public String getColumnName() {
- return columnName;
- }
-
- public void setColumnName(String columnName) {
- this.columnName = columnName;
- }
-
- public static class ID implements Serializable {
- private static final long serialVersionUID = 1L;
- private String league;
- private String type;
- private String name;
-
- public ID() {
- super();
- }
-
- public ID(String league, String type, String name) {
- super();
- this.league = league;
- this.type = type;
- this.name = name;
- }
-
- public String getLeague() {
- return league;
- }
-
- public String getType() {
- return type;
- }
-
- public String getName() {
- return name;
- }
-
- @Override
- public int hashCode() {
- return getLeague().hashCode() + getType().hashCode() + getName().hashCode();
- }
-
- @Override
- public boolean equals(Object obj) {
- if (obj != null && getClass().isAssignableFrom(obj.getClass())) {
- ID id = (ID) obj;
- return getLeague().equals(id.getLeague()) && getType().equals(id.getType()) && getName().equals(id.getName());
- }
- return false;
- }
-
- }
-}
diff --git a/admin.services/src/main/java/eclipselink/example/mysports/admin/model/GlassFish.java b/admin.services/src/main/java/eclipselink/example/mysports/admin/model/GlassFish.java
deleted file mode 100644
index 186e904..0000000
--- a/admin.services/src/main/java/eclipselink/example/mysports/admin/model/GlassFish.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * dclarke - EclipseLink 2.4 - MySports Demo Bug 344608
- ******************************************************************************/
-package eclipselink.example.mysports.admin.model;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.persistence.DiscriminatorValue;
-import javax.persistence.Entity;
-
-import eclipselink.example.mysports.admin.services.glassfish.JDBCResource;
-import eclipselink.example.mysports.admin.services.glassfish.RESTOperations;
-
-/**
- * Represents a single GlassFish instance.
- *
- * @author dclarke
- * @since EclipseLink 2.4
- */
-@Entity
-@DiscriminatorValue("GlassFish")
-public class GlassFish extends HostEnvironment {
-
- public List<Datasource> getDatasources() {
- List<Datasource> datasources = new ArrayList<Datasource>();
- RESTOperations ops = new RESTOperations("localhost");
- String[] resourceNames = JDBCResource.getJDBCResourceNames(ops);
-
- for (String name : resourceNames) {
- Datasource ds = new Datasource();
- ds.setName(name);
- datasources.add(ds);
- }
- return datasources;
- }
-}
diff --git a/admin.services/src/main/java/eclipselink/example/mysports/admin/model/HostEnvironment.java b/admin.services/src/main/java/eclipselink/example/mysports/admin/model/HostEnvironment.java
deleted file mode 100644
index 7cb7828..0000000
--- a/admin.services/src/main/java/eclipselink/example/mysports/admin/model/HostEnvironment.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * dclarke - EclipseLink 2.4 - MySports Demo Bug 344608
- ******************************************************************************/
-package eclipselink.example.mysports.admin.model;
-
-import java.util.Collection;
-
-import javax.persistence.DiscriminatorColumn;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.Id;
-import javax.persistence.Inheritance;
-import javax.persistence.InheritanceType;
-import javax.persistence.NamedQuery;
-import javax.persistence.Table;
-
-/**
- * Represents a target environment where the MySports application can be
- * deployed to. This could be a specific web or application server, a
- * cluster/grid of servers, or a cloud implementation.
- *
- * @author dclarke
- * @since EclipseLink 2.4
- */
-@Entity
-@Table(name="MYS_ADMIN_ENV")
-@Inheritance(strategy=InheritanceType.JOINED)
-@DiscriminatorColumn(name="ENV_TYPE")
-@NamedQuery(name="HostEnvironment.all", query="SELECT he FROM HostEnvironment he ORDER BY he.id")
-public abstract class HostEnvironment {
-
- @Id
- @GeneratedValue
- private int id;
-
- private String name;
-
- private String description;
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public String getDescription() {
- return description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public int getId() {
- return id;
- }
-
- public abstract Collection<Datasource> getDatasources();
-
-
-}
diff --git a/admin.services/src/main/java/eclipselink/example/mysports/admin/model/HostedLeague.java b/admin.services/src/main/java/eclipselink/example/mysports/admin/model/HostedLeague.java
deleted file mode 100644
index 5a8af27..0000000
--- a/admin.services/src/main/java/eclipselink/example/mysports/admin/model/HostedLeague.java
+++ /dev/null
@@ -1,265 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * dclarke - EclipseLink 2.3 - MySports Demo Bug 344608
- ******************************************************************************/
-package eclipselink.example.mysports.admin.model;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-import javax.persistence.CascadeType;
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.EnumType;
-import javax.persistence.Enumerated;
-import javax.persistence.Id;
-import javax.persistence.NamedQueries;
-import javax.persistence.NamedQuery;
-import javax.persistence.OneToMany;
-import javax.persistence.Table;
-import javax.persistence.Transient;
-import javax.persistence.Version;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlTransient;
-
-import org.eclipse.persistence.annotations.Customizer;
-
-import eclipselink.example.mysports.admin.model.persistence.ExtensionMappingsCustomizer;
-
-/**
- * A HostedLeague represents a sports league that is configured in the MySports
- * Admin application. It contains the league's (tenant) configuration with
- * respect to EclipseLink customization of data source, multi-tenancy, table
- * names, and extended attributes. It also contains Look-and-Feel configuration
- * for color scheme (CSS) and logo.
- *
- * @author dclarke
- * @since EclipseLink 2.3.0
- */
-@Entity
-@Table(name = "MYS_ADMIN_LEAGUE")
-@NamedQueries({ @NamedQuery(name = "HostedLeague.findAll", query = "SELECT l FROM HostedLeague l ORDER BY l.name"), @NamedQuery(name = "HostedLeague.findAllShared", query = "SELECT l FROM HostedLeague l WHERE l.shared = TRUE ORDER BY l.name") })
-@Customizer(ExtensionMappingsCustomizer.class)
-@XmlRootElement
-public class HostedLeague {
-
- public static final String PLAYER = "Player";
- public static final String TEAM = "Team";
- public static final String DIVISION = "Division";
-
- /**
- * Unique identifier for the league. This must be a simple string with just
- * characters that can be used within a URI.
- */
- @Id
- private String id;
-
- /**
- * Descriptive name of league. This string is used for display purposes only
- * and can contain spaces and punctuation.
- */
- private String name;
-
- private String colourScheme = "default";
-
- private String logoUrl;
-
- @Transient
- private String uri;
-
- @Column(name = "DATA_SOURCE")
- private String datasourceName;
-
- /**
- * Indicates that the league is hosted on a shared application instance
- * using a SaaS approach. If False the league requires its own dedicated
- * application instances to be packaged and deployed.
- */
- private boolean shared = true;
-
- @Enumerated(EnumType.STRING)
- @Column(name = "DATA_ISOLATION")
- private DataIsolation dataIsolation = DataIsolation.ROW;
-
- @OneToMany(mappedBy = "league", cascade = CascadeType.ALL)
- @XmlTransient
- private List<Extension> playerExtensions = new ArrayList<Extension>();
-
- @OneToMany(mappedBy = "league", cascade = CascadeType.ALL)
- @XmlTransient
- private List<Extension> teamExtensions = new ArrayList<Extension>();
-
- @OneToMany(mappedBy = "league", cascade = CascadeType.ALL)
- @XmlTransient
- private List<Extension> divisionExtensions = new ArrayList<Extension>();
-
- @Version
- private long version;
-
- public HostedLeague() {
- }
-
- public HostedLeague(String id, String name, String scheme) {
- this();
-
- this.id = id;
- this.name = name;
- this.colourScheme = scheme;
- }
-
- public String getId() {
- return id;
- }
-
- public void setId(String id) {
- this.id = id;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public String getColourScheme() {
- return colourScheme;
- }
-
- public void setColourScheme(String colourScheme) {
- this.colourScheme = colourScheme;
- }
-
- public String getLogoUrl() {
- return logoUrl;
- }
-
- public void setLogoUrl(String logoUrl) {
- this.logoUrl = logoUrl;
- }
-
- public String getUri() {
- return uri;
- }
-
- public void setUri(String uri) {
- this.uri = uri;
- }
-
- public long getVersion() {
- return version;
- }
-
- public String getDatasourceName() {
- return datasourceName;
- }
-
- public void setDatasourceName(String datasourceName) {
- this.datasourceName = datasourceName;
- }
-
- public void addPlayerExtension(Extension extension) {
-
- }
-
- public Collection<Extension> getPlayerExtensions() {
- return this.playerExtensions;
- }
-
- public void addPlayerExtension(String name, String javaType, String columnName) {
- Extension ext = new Extension(name, javaType, columnName);
- ext.setLeague(this, "Player");
- getPlayerExtensions().add(ext);
- }
-
- public Extension getPlayerExtension(String columnName) {
- for (Extension ext : getPlayerExtensions()) {
- if (ext.getColumnName().equals(columnName)) {
- return ext;
- }
- }
- return null;
- }
-
- public Collection<Extension> getTeamExtensions() {
- return this.teamExtensions;
- }
-
- public void addTeamExtension(String name, String javaType, String columnName) {
- Extension ext = new Extension(name, javaType, columnName);
- ext.setLeague(this, "Team");
- getTeamExtensions().add(ext);
- }
-
- public Extension getTeamExtension(String columnName) {
- for (Extension ext : getTeamExtensions()) {
- if (ext.getColumnName().equals(columnName)) {
- return ext;
- }
- }
- return null;
- }
-
- public Collection<Extension> getDivisionExtensions() {
- return this.divisionExtensions;
- }
-
- public void addDivisionExtension(String name, String javaType, String columnName) {
- Extension ext = new Extension(name, javaType, columnName);
- ext.setLeague(this, "Division");
- getDivisionExtensions().add(ext);
- }
-
- public Extension getDivisionExtension(String columnName) {
- for (Extension ext : getPlayerExtensions()) {
- if (ext.getColumnName().equals(columnName)) {
- return ext;
- }
- }
- return null;
- }
-
- public boolean isShared() {
- return shared;
- }
-
- public void setShared(boolean shared) {
- this.shared = shared;
- }
-
- public DataIsolation getDataIsolation() {
- return dataIsolation;
- }
-
- public void setDataIsolation(DataIsolation dataIsolation) {
- this.dataIsolation = dataIsolation;
- }
-
- protected void setVersion(long version) {
- this.version = version;
- }
-
- public Collection<Extension> getExtensions(String type) {
- if (PLAYER.equals(type)) {
- return getPlayerExtensions();
- }
- if (TEAM.equals(type)) {
- return getTeamExtensions();
- }
- if (DIVISION.equals(type)) {
- return getDivisionExtensions();
- }
- throw new IllegalArgumentException("No HostedLeague extensions for type: " + type);
- }
-
-}
diff --git a/admin.services/src/main/java/eclipselink/example/mysports/admin/model/Style.java b/admin.services/src/main/java/eclipselink/example/mysports/admin/model/Style.java
deleted file mode 100644
index 4aa8f70..0000000
--- a/admin.services/src/main/java/eclipselink/example/mysports/admin/model/Style.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * dclarke - EclipseLink 2.4 - MySports Demo Bug 344608
- ******************************************************************************/
-package eclipselink.example.mysports.admin.model;
-
-import javax.persistence.Entity;
-import javax.persistence.Id;
-import javax.persistence.Lob;
-import javax.persistence.Table;
-
-import org.eclipse.persistence.annotations.Cache;
-import org.eclipse.persistence.annotations.CacheType;
-
-/**
- * @author dclarke
- * @since EclipseLink 2.3.0
- */
-@Entity
-@Table(name = "MYS_ADMIN_STYLE")
-@Cache(type=CacheType.FULL, size=10)
-public class Style {
-
- @Id
- private String name;
-
- @Lob
- private String css;
-
- public Style() {
- }
- public Style(String name, String css) {
- this.name = name;
- this.css = css;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public String getCss() {
- return css;
- }
-
- public void setCss(String css) {
- this.css = css;
- }
-
-}
diff --git a/admin.services/src/main/java/eclipselink/example/mysports/admin/model/WebLogic.java b/admin.services/src/main/java/eclipselink/example/mysports/admin/model/WebLogic.java
deleted file mode 100644
index cfda340..0000000
--- a/admin.services/src/main/java/eclipselink/example/mysports/admin/model/WebLogic.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * dclarke - EclipseLink 2.4 - MySports Demo Bug 344608
- ******************************************************************************/
-package eclipselink.example.mysports.admin.model;
-
-import java.util.List;
-
-import javax.persistence.DiscriminatorValue;
-import javax.persistence.Entity;
-
-/**
- * Represents a single WebLogic instance.
- *
- * @author dclarke
- * @since EclipseLink 2.4
- */
-@Entity
-@DiscriminatorValue("WEBLOGIC")
-public class WebLogic extends HostEnvironment {
-
- @Override
- public List<Datasource> getDatasources() {
- // TODO Auto-generated method stub
- return null;
- }
-
-}
diff --git a/admin.services/src/main/java/eclipselink/example/mysports/admin/model/jaxb.properties b/admin.services/src/main/java/eclipselink/example/mysports/admin/model/jaxb.properties
deleted file mode 100644
index 5837a4c..0000000
--- a/admin.services/src/main/java/eclipselink/example/mysports/admin/model/jaxb.properties
+++ /dev/null
@@ -1 +0,0 @@
-javax.xml.bind.context.factory=org.eclipse.persistence.jaxb.JAXBContextFactory \ No newline at end of file
diff --git a/admin.services/src/main/java/eclipselink/example/mysports/admin/model/persistence/ExtensionMappingsCustomizer.java b/admin.services/src/main/java/eclipselink/example/mysports/admin/model/persistence/ExtensionMappingsCustomizer.java
deleted file mode 100644
index 12b59e0..0000000
--- a/admin.services/src/main/java/eclipselink/example/mysports/admin/model/persistence/ExtensionMappingsCustomizer.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package eclipselink.example.mysports.admin.model.persistence;
-
-import org.eclipse.persistence.descriptors.ClassDescriptor;
-import org.eclipse.persistence.expressions.Expression;
-import org.eclipse.persistence.expressions.ExpressionBuilder;
-import org.eclipse.persistence.mappings.OneToManyMapping;
-import org.eclipse.persistence.sessions.factories.DescriptorCustomizer;
-
-import eclipselink.example.mysports.admin.model.Extension;
-import eclipselink.example.mysports.admin.model.HostedLeague;
-
-public class ExtensionMappingsCustomizer implements DescriptorCustomizer {
-
- @Override
- public void customize(ClassDescriptor descriptor) throws Exception {
- OneToManyMapping playerMapping = (OneToManyMapping) descriptor.getMappingForAttributeName("playerExtensions");
- ExpressionBuilder eb = new ExpressionBuilder(Extension.class);
- Expression fkExp = eb.getField(descriptor.getMappingForAttributeName("league").getField()).equal(eb.getParameter("id"));
- Expression typeExp = eb.getField(descriptor.getMappingForAttributeName("type").getField()).equal(HostedLeague.PLAYER);
- playerMapping.setSelectionCriteria(fkExp.and(typeExp));
-
- OneToManyMapping teamMapping = (OneToManyMapping) descriptor.getMappingForAttributeName("teamExtensions");
- eb = new ExpressionBuilder(Extension.class);
- fkExp = eb.getField(descriptor.getMappingForAttributeName("league").getField()).equal(eb.getParameter("id"));
- typeExp = eb.getField(descriptor.getMappingForAttributeName("type").getField()).equal(HostedLeague.TEAM);
- teamMapping.setSelectionCriteria(fkExp.and(typeExp));
-
- OneToManyMapping divisionMapping = (OneToManyMapping) descriptor.getMappingForAttributeName("divisionExtensions");
- eb = new ExpressionBuilder(Extension.class);
- fkExp = eb.getField(descriptor.getMappingForAttributeName("league").getField()).equal(eb.getParameter("id"));
- typeExp = eb.getField(descriptor.getMappingForAttributeName("type").getField()).equal(HostedLeague.DIVISION);
- divisionMapping.setSelectionCriteria(fkExp.and(typeExp));
- }
-
-}
diff --git a/admin.services/src/main/java/eclipselink/example/mysports/admin/services/AdminSchemaManager.java b/admin.services/src/main/java/eclipselink/example/mysports/admin/services/AdminSchemaManager.java
deleted file mode 100644
index 0340600..0000000
--- a/admin.services/src/main/java/eclipselink/example/mysports/admin/services/AdminSchemaManager.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * dclarke - EclipseLink 2.4.2 - MySports Demo Bug 344608
- ******************************************************************************/
-package eclipselink.example.mysports.admin.services;
-
-import javax.persistence.EntityManagerFactory;
-
-import org.eclipse.persistence.jpa.JpaHelper;
-import org.eclipse.persistence.sessions.server.Server;
-import org.eclipse.persistence.tools.schemaframework.DefaultTableGenerator;
-import org.eclipse.persistence.tools.schemaframework.SchemaManager;
-import org.eclipse.persistence.tools.schemaframework.TableCreator;
-
-public class AdminSchemaManager {
-
- public static void createTables(EntityManagerFactory emf) {
- Server session = JpaHelper.getServerSession(emf);
- SchemaManager sm = new SchemaManager(session);
-
- sm.replaceDefaultTables();
- sm.createSequences();
- }
-
- public static void dropTables(EntityManagerFactory emf) {
- Server session = JpaHelper.getServerSession(emf);
- SchemaManager sm = new SchemaManager(session);
-
- TableCreator tc = new DefaultTableGenerator(session.getProject(), true).generateDefaultTableCreator();
- tc.setIgnoreDatabaseException(true);
- tc.dropTables(session, sm, true);
- }
-}
diff --git a/admin.services/src/main/java/eclipselink/example/mysports/admin/services/HostEnvironmentRepository.java b/admin.services/src/main/java/eclipselink/example/mysports/admin/services/HostEnvironmentRepository.java
deleted file mode 100644
index 6c2cf7b..0000000
--- a/admin.services/src/main/java/eclipselink/example/mysports/admin/services/HostEnvironmentRepository.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package eclipselink.example.mysports.admin.services;
-
-import java.util.List;
-
-import javax.ejb.Local;
-
-import eclipselink.example.mysports.admin.model.HostEnvironment;
-
-@Local
-public interface HostEnvironmentRepository {
-
- void create(HostEnvironment env);
-
- void delete(HostEnvironment env);
-
- HostEnvironment find(String name);
-
- List<HostEnvironment> getEnvironments();
-} \ No newline at end of file
diff --git a/admin.services/src/main/java/eclipselink/example/mysports/admin/services/HostEnvironmentRepositoryBean.java b/admin.services/src/main/java/eclipselink/example/mysports/admin/services/HostEnvironmentRepositoryBean.java
deleted file mode 100644
index d8aed50..0000000
--- a/admin.services/src/main/java/eclipselink/example/mysports/admin/services/HostEnvironmentRepositoryBean.java
+++ /dev/null
@@ -1,52 +0,0 @@
-package eclipselink.example.mysports.admin.services;
-
-import java.util.List;
-
-import javax.ejb.Stateless;
-import javax.persistence.EntityManager;
-import javax.persistence.PersistenceContext;
-
-import eclipselink.example.mysports.admin.model.HostEnvironment;
-
-/**
- * Repository providing the admin application with read and write access for
- * {@link HostEnvironment} definitions.
- *
- * @author dclarke
- * @since EclipseLInk 2.4
- */
-@Stateless
-public class HostEnvironmentRepositoryBean implements HostEnvironmentRepository {
-
- @PersistenceContext(unitName = "MySportsAdmin")
- private EntityManager entityManager;
-
- public EntityManager getEntityManager() {
- return entityManager;
- }
-
- public void setEntityManager(EntityManager entityManager) {
- this.entityManager = entityManager;
- }
-
- // TODO: maintain a list versus query every time?
- public List<HostEnvironment> getEnvironments() {
- return getEntityManager().createNamedQuery("HostEnvironment.all", HostEnvironment.class).getResultList();
- }
-
- @Override
- public void create(HostEnvironment env) {
- getEntityManager().persist(env);
- }
-
- @Override
- public void delete(HostEnvironment env) {
- getEntityManager().remove(env);
- }
-
- @Override
- public HostEnvironment find(String name) {
- // TODO Auto-generated method stub
- return null;
- }
-}
diff --git a/admin.services/src/main/java/eclipselink/example/mysports/admin/services/HostedLeagueRepository.java b/admin.services/src/main/java/eclipselink/example/mysports/admin/services/HostedLeagueRepository.java
deleted file mode 100644
index 06a227f..0000000
--- a/admin.services/src/main/java/eclipselink/example/mysports/admin/services/HostedLeagueRepository.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * dclarke - EclipseLink 2.4 - MySports Demo Bug 344608
- ******************************************************************************/
-package eclipselink.example.mysports.admin.services;
-
-import eclipselink.example.mysports.admin.model.HostedLeague;
-import eclipselink.example.mysports.admin.model.Style;
-
-import java.io.InputStream;
-import java.util.List;
-import javax.ejb.Local;
-
-/**
- *
- * @author dclarke
- * @since EclipseLink 2.4
- */
-@Local
-public interface HostedLeagueRepository {
-
- List<HostedLeague> allLeagues();
-
- List<HostedLeague> allSharedLeagues();
-
- HostedLeague getLeague(String leagueId);
-
- String getORM(String leagueId);
-
- String getCSS(String leagueId);
-
- InputStream getLogo(String leagueId);
-
- HostedLeague merge(HostedLeague league);
-
- Style createStyle(String name, String css);
-
- void create(HostedLeague league);
-}
diff --git a/admin.services/src/main/java/eclipselink/example/mysports/admin/services/HostedLeagueRepositoryBean.java b/admin.services/src/main/java/eclipselink/example/mysports/admin/services/HostedLeagueRepositoryBean.java
deleted file mode 100644
index 684d5af..0000000
--- a/admin.services/src/main/java/eclipselink/example/mysports/admin/services/HostedLeagueRepositoryBean.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * dclarke - EclipseLink 2.4 - MySports Demo Bug 344608
- ******************************************************************************/
-package eclipselink.example.mysports.admin.services;
-
-import java.io.InputStream;
-import java.util.List;
-
-import javax.ejb.Stateless;
-import javax.persistence.EntityManager;
-import javax.persistence.PersistenceContext;
-
-import org.eclipse.persistence.logging.SessionLog;
-import org.eclipse.persistence.sessions.server.Server;
-
-import eclipselink.example.mysports.admin.model.HostedLeague;
-import eclipselink.example.mysports.admin.model.Style;
-
-/**
- *
- * @author dclarke
- * @since EclipseLink 2.4
- */
-@Stateless
-public class HostedLeagueRepositoryBean implements HostedLeagueRepository {
-
- @PersistenceContext(unitName = "MySportsAdmin")
- private EntityManager entityManager;
-
- public EntityManager getEntityManager() {
- return this.entityManager;
- }
-
- public void setEntityManager(EntityManager em) {
- this.entityManager = em;
- }
-
- public List<HostedLeague> allLeagues() {
- return getEntityManager().createNamedQuery("HostedLeague.findAll", HostedLeague.class).getResultList();
- }
-
- public List<HostedLeague> allSharedLeagues() {
- return getEntityManager().createNamedQuery("HostedLeague.findAllShared", HostedLeague.class).getResultList();
- }
-
- public HostedLeague getLeague(String leagueId) {
- getEntityManager().unwrap(Server.class).getSessionLog().log(SessionLog.FINE, "HostedLeagueRepositoryBean.getLeague::" + leagueId);
- return getEntityManager().find(HostedLeague.class, leagueId);
- }
-
- public HostedLeague merge(HostedLeague league) {
- HostedLeague existingLeague = getEntityManager().find(HostedLeague.class, league.getId());
-
- if (existingLeague == null) {
- throw new IllegalStateException("Could not find league: " + league.getId());
- }
- return getEntityManager().merge(league);
- }
-
- @Override
- public void create(HostedLeague league) {
- getEntityManager().persist(league);
- }
-
- @Override
- public Style createStyle(String name, String css) {
- Style style = new Style(name, css);
- return getEntityManager().merge(style);
- }
-
- public String getORM(String leagueId) {
- return MappingsLoader.getORMapping(getEntityManager(), leagueId);
- }
-
- public String getCSS(String leagueId) {
- EntityManager em = getEntityManager();
-
- HostedLeague league = em.find(HostedLeague.class, leagueId);
-
- if (league == null) {
- throw new IllegalArgumentException("Unknown League: " + leagueId);
- }
-
- Style style = null;
-
- if (league != null && league.getColourScheme() != null) {
- style = em.find(Style.class, league.getColourScheme());
- }
- if (style == null) {
- style = em.find(Style.class, "default");
- }
-
- return style.getCss();
- }
-
- public InputStream getLogo(String leagueId) {
- return Thread.currentThread().getContextClassLoader().getResourceAsStream(leagueId.toLowerCase() + ".png");
- }
-
-}
diff --git a/admin.services/src/main/java/eclipselink/example/mysports/admin/services/MappingsLoader.java b/admin.services/src/main/java/eclipselink/example/mysports/admin/services/MappingsLoader.java
deleted file mode 100644
index 83eccdd..0000000
--- a/admin.services/src/main/java/eclipselink/example/mysports/admin/services/MappingsLoader.java
+++ /dev/null
@@ -1,158 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * dclarke - EclipseLink 2.3 - MySports Demo Bug 344608
- ******************************************************************************/
-package eclipselink.example.mysports.admin.services;
-
-import java.io.StringWriter;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.persistence.EntityManager;
-
-import org.eclipse.persistence.Version;
-import org.eclipse.persistence.annotations.MultitenantType;
-import org.eclipse.persistence.annotations.TenantTableDiscriminatorType;
-import org.eclipse.persistence.internal.jpa.metadata.accessors.classes.EmbeddableAccessor;
-import org.eclipse.persistence.internal.jpa.metadata.accessors.classes.EntityAccessor;
-import org.eclipse.persistence.internal.jpa.metadata.accessors.classes.MappedSuperclassAccessor;
-import org.eclipse.persistence.internal.jpa.metadata.accessors.classes.XMLAttributes;
-import org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.BasicAccessor;
-import org.eclipse.persistence.internal.jpa.metadata.columns.ColumnMetadata;
-import org.eclipse.persistence.internal.jpa.metadata.columns.TenantDiscriminatorColumnMetadata;
-import org.eclipse.persistence.internal.jpa.metadata.multitenant.MultitenantMetadata;
-import org.eclipse.persistence.internal.jpa.metadata.multitenant.TenantTableDiscriminatorMetadata;
-import org.eclipse.persistence.internal.jpa.metadata.xml.XMLEntityMappings;
-import org.eclipse.persistence.internal.jpa.metadata.xml.XMLEntityMappingsWriter;
-
-import eclipselink.example.mysports.admin.model.Extension;
-import eclipselink.example.mysports.admin.model.HostedLeague;
-
-/**
- * Load the {@link Extension} from the database and generate the ORM and OXM
- * mapping files for the extensions.
- *
- * @author dclarke
- * @since EclipseLink 2.3.0
- */
-public class MappingsLoader {
-
- private static final String MODEL_PACKAGE = "eclipselink.example.mysports.application.model";
-
- public static XMLEntityMappings getXMLEntityMappings(EntityManager em, String leagueId) {
- HostedLeague league = em.find(HostedLeague.class, leagueId);
-
- if (league == null) {
- throw new IllegalArgumentException("Unknown League: " + leagueId);
- }
-
- return getXMLEntityMappings(league);
- }
-
- public static XMLEntityMappings getXMLEntityMappings(HostedLeague league) {
- XMLEntityMappings mappings = new XMLEntityMappings();
- mappings.setVersion(Version.getVersion());
- mappings.setEntities(new ArrayList<EntityAccessor>());
- mappings.setEmbeddables(new ArrayList<EmbeddableAccessor>());
- mappings.setMappedSuperclasses(new ArrayList<MappedSuperclassAccessor>());
-
- mappings.setPackage(MODEL_PACKAGE);
-
- addEntity(league, "Division", mappings);
- addEntity(league, "Team", mappings);
- addEntity(league, "Player", mappings);
-
- return mappings;
- }
-
- public static String getORMapping(EntityManager em, String leagueId) {
- XMLEntityMappings mappings = getXMLEntityMappings(em, leagueId);
-
- StringWriter writer = new StringWriter();
- XMLEntityMappingsWriter.write(mappings, writer);
-
- return writer.toString();
- }
-
- public static void addEntity(HostedLeague league, String entityType, XMLEntityMappings mappings) {
-
- EntityAccessor accessor = new EntityAccessor();
- accessor.setClassName(entityType);
- mappings.getEntities().add(accessor);
-
- switch (league.getDataIsolation()) {
- case ROW:
- // Add @Multitenant(SINGLE_TABLE)
- MultitenantMetadata multitenant = new MultitenantMetadata();
- multitenant.setType(MultitenantType.SINGLE_TABLE.name());
- List<TenantDiscriminatorColumnMetadata> tenantDiscriminatorColumns = new ArrayList<TenantDiscriminatorColumnMetadata>(1);
- TenantDiscriminatorColumnMetadata tenantDiscColumn = new TenantDiscriminatorColumnMetadata();
- tenantDiscColumn.setName("LEAGUE_ID");
- tenantDiscColumn.setContextProperty("league");
- tenantDiscColumn.setLength(5);
- tenantDiscriminatorColumns.add(tenantDiscColumn);
- multitenant.setTenantDiscriminatorColumns(tenantDiscriminatorColumns);
- accessor.setMultitenant(multitenant);
- break;
- case TABLE:
- // Add @Multitenant(TABLE_PER_TENANT) with
- // @TenenatTableDisciminator(SUFFIX)
- multitenant = new MultitenantMetadata();
- multitenant.setType(MultitenantType.TABLE_PER_TENANT.name());
- TenantTableDiscriminatorMetadata tenantTableDiscriminator = new TenantTableDiscriminatorMetadata();
- tenantTableDiscriminator.setType(TenantTableDiscriminatorType.SUFFIX.name());
- tenantTableDiscriminator.setContextProperty("league");
- multitenant.setTenantTableDiscriminator(tenantTableDiscriminator);
- accessor.setMultitenant(multitenant);
- break;
- case SCHEMA:
- // Add @Multitenant(TABLE_PER_TENANT) with
- // @TenenatTableDisciminator(SCHEMA)
- multitenant = new MultitenantMetadata();
- multitenant.setType(MultitenantType.TABLE_PER_TENANT.name());
- tenantTableDiscriminator = new TenantTableDiscriminatorMetadata();
- tenantTableDiscriminator.setType(TenantTableDiscriminatorType.SCHEMA.name());
- tenantTableDiscriminator.setContextProperty("league");
- multitenant.setTenantTableDiscriminator(tenantTableDiscriminator);
- accessor.setMultitenant(multitenant);
- break;
-
- // TODO
- case DATABASE:
- throw new RuntimeException("DataIsolation.DATABASE::NOT YET SUPPORTED");
- }
-
- if (league != null) {
-
- for (Extension ext : league.getExtensions(entityType)) {
- BasicAccessor allergies = new BasicAccessor();
- allergies.setName(ext.getName());
- allergies.setAttributeType(ext.getJavaType());
- allergies.setAccess("VIRTUAL");
-
- ColumnMetadata column = new ColumnMetadata();
- column.setName(ext.getColumnName());
- allergies.setColumn(column);
-
- if (accessor.getAttributes() == null) {
- accessor.setAttributes(new XMLAttributes());
- }
- if (accessor.getAttributes().getBasics() == null) {
- accessor.getAttributes().setBasics(new ArrayList<BasicAccessor>());
- }
- accessor.getAttributes().getBasics().add(allergies);
- }
-
- }
-
- }
-
-}
diff --git a/admin.services/src/main/java/eclipselink/example/mysports/admin/services/glassfish/JDBCResource.java b/admin.services/src/main/java/eclipselink/example/mysports/admin/services/glassfish/JDBCResource.java
deleted file mode 100644
index 042d08c..0000000
--- a/admin.services/src/main/java/eclipselink/example/mysports/admin/services/glassfish/JDBCResource.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * dclarke - EclipseLink 2.4 - MySports Demo Bug 344608
- ******************************************************************************/
-package eclipselink.example.mysports.admin.services.glassfish;
-
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-
-import org.eclipse.persistence.oxm.MediaType;
-import org.eclipse.persistence.oxm.annotations.XmlPath;
-
-/**
- * Represents a JDBC Resource in GlassFish. Used to interact with GlassFish over
- * REST.
- *
- * @author dclarke
- * @since EclipseLink 2.4
- */
-@XmlAccessorType(XmlAccessType.FIELD)
-public class JDBCResource extends Result {
-
- /**
- * Management URI extension to get list of JDBC resources
- */
- public static final String LIST_URI = "/domain/resources/list-jdbc-resources";
-
- /**
- * Management URI extension to get details of a specific JDBC resource
- */
- public static final String RESOURCE_URI = "/domain/resources/jdbc-resource/";
-
- @XmlPath("extraProperties/entity/description/text()")
- private String description;
-
- @XmlPath("extraProperties/entity/enabled/text()")
- private String enabled;
-
- @XmlPath("extraProperties/entity/jndiName/text()")
- private String jndiName;
-
- @XmlPath("extraProperties/entity/objectType/text()")
- private String objectType;
-
- @XmlPath("extraProperties/entity/poolName/text()")
- private String poolName;
-
- public String getDescription() {
- return description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public String getEnabled() {
- return enabled;
- }
-
- public void setEnabled(String enabled) {
- this.enabled = enabled;
- }
-
- public String getJndiName() {
- return jndiName;
- }
-
- public void setJndiName(String jndiName) {
- this.jndiName = jndiName;
- }
-
- public String getObjectType() {
- return objectType;
- }
-
- public void setObjectType(String objectType) {
- this.objectType = objectType;
- }
-
- public String getPoolName() {
- return poolName;
- }
-
- public void setPoolName(String poolName) {
- this.poolName = poolName;
- }
-
- /**
- * TODO
- */
- public static String[] getJDBCResourceNames(RESTOperations ops) {
- try {
- Result result = ops.get(LIST_URI, MediaType.APPLICATION_JSON, Result.class);
- return result.getChildrenMessages();
- } catch (JAXBException e) {
- throw new RuntimeException("Failure to get JDBC resource from GlassFish@" + ops.getServer(), e);
- }
- }
-
- /**
- * TODO
- */
- public static JDBCResource getJDBResource(RESTOperations ops, String name) {
- try {
- return ops.get(RESOURCE_URI + name.replace("/", "%2F"), MediaType.APPLICATION_JSON, JDBCResource.class);
- } catch (JAXBException e) {
- throw new RuntimeException("Failure to get JDBC resource from GlassFish@" + ops.getServer(), e);
- }
- }
-}
diff --git a/admin.services/src/main/java/eclipselink/example/mysports/admin/services/glassfish/MOXyContextHelper.java b/admin.services/src/main/java/eclipselink/example/mysports/admin/services/glassfish/MOXyContextHelper.java
deleted file mode 100644
index 02c46e1..0000000
--- a/admin.services/src/main/java/eclipselink/example/mysports/admin/services/glassfish/MOXyContextHelper.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * dclarke - EclipseLink 2.4 - MySports Demo Bug 344608
- ******************************************************************************/
-package eclipselink.example.mysports.admin.services.glassfish;
-
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Marshaller;
-import javax.xml.bind.Unmarshaller;
-import static org.eclipse.persistence.jaxb.MarshallerProperties.MEDIA_TYPE;
-import static org.eclipse.persistence.jaxb.UnmarshallerProperties.JSON_INCLUDE_ROOT;
-
-import org.eclipse.persistence.jaxb.JAXBContextFactory;
-import org.eclipse.persistence.oxm.MediaType;
-
-/**
- * Helper class to simplify the XML/JSON conversions.
- *
- * @author dclarke
- * @since EclipseLink 2.4
- */
-public class MOXyContextHelper {
-
- /**
- * Cache the {@link JAXBContext} to avoid recreating it each time. The
- * context is thread safe.
- */
- private static JAXBContext context = null;
-
- public static JAXBContext createContext() throws JAXBException {
- if (context == null) {
- context = JAXBContextFactory.createContext(new Class[] { Result.class, JDBCResource.class }, null);
- }
- return context;
- }
-
- public static Marshaller createMarshaller(MediaType mediaType) throws JAXBException {
- Marshaller marshaller = createContext().createMarshaller();
- marshaller.setProperty(MEDIA_TYPE, mediaType.getMediaType());
- return marshaller;
- }
-
- public static Unmarshaller createUnmarshaller(MediaType mediaType) throws JAXBException {
- Unmarshaller unmarshaller = createContext().createUnmarshaller();
- unmarshaller.setProperty(MEDIA_TYPE, mediaType.getMediaType());
- unmarshaller.setProperty(JSON_INCLUDE_ROOT, false);
- return unmarshaller;
- }
-}
diff --git a/admin.services/src/main/java/eclipselink/example/mysports/admin/services/glassfish/Message.java b/admin.services/src/main/java/eclipselink/example/mysports/admin/services/glassfish/Message.java
deleted file mode 100644
index 1c6ef50..0000000
--- a/admin.services/src/main/java/eclipselink/example/mysports/admin/services/glassfish/Message.java
+++ /dev/null
@@ -1,29 +0,0 @@
-package eclipselink.example.mysports.admin.services.glassfish;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-
-@XmlAccessorType(XmlAccessType.FIELD)
-public class Message {
-
- private String message;
-
- private Properties properties;
-
- public String getMessage() {
- return message;
- }
-
- public void setMessage(String message) {
- this.message = message;
- }
-
- public Properties getProperties() {
- return properties;
- }
-
- public void setProperties(Properties properties) {
- this.properties = properties;
- }
-
-}
diff --git a/admin.services/src/main/java/eclipselink/example/mysports/admin/services/glassfish/Properties.java b/admin.services/src/main/java/eclipselink/example/mysports/admin/services/glassfish/Properties.java
deleted file mode 100644
index b32bedd..0000000
--- a/admin.services/src/main/java/eclipselink/example/mysports/admin/services/glassfish/Properties.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package eclipselink.example.mysports.admin.services.glassfish;
-
-public class Properties {
-
- private String name;
-
- private String value;
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public String getValue() {
- return value;
- }
-
- public void setValue(String value) {
- this.value = value;
- }
-
-}
diff --git a/admin.services/src/main/java/eclipselink/example/mysports/admin/services/glassfish/Property.java b/admin.services/src/main/java/eclipselink/example/mysports/admin/services/glassfish/Property.java
deleted file mode 100644
index 6fcf1f1..0000000
--- a/admin.services/src/main/java/eclipselink/example/mysports/admin/services/glassfish/Property.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package eclipselink.example.mysports.admin.services.glassfish;
-
-public class Property {
-
- private String name;
-
- private String value;
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public String getValue() {
- return value;
- }
-
- public void setValue(String value) {
- this.value = value;
- }
-
-}
diff --git a/admin.services/src/main/java/eclipselink/example/mysports/admin/services/glassfish/RESTOperations.java b/admin.services/src/main/java/eclipselink/example/mysports/admin/services/glassfish/RESTOperations.java
deleted file mode 100644
index c449e94..0000000
--- a/admin.services/src/main/java/eclipselink/example/mysports/admin/services/glassfish/RESTOperations.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * dclarke - EclipseLink 2.4 - MySports Demo Bug 344608
- ******************************************************************************/
-package eclipselink.example.mysports.admin.services.glassfish;
-
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Unmarshaller;
-import javax.xml.transform.stream.StreamSource;
-
-import org.eclipse.persistence.oxm.MediaType;
-
-import com.sun.jersey.api.client.Client;
-import com.sun.jersey.api.client.ClientResponse;
-import com.sun.jersey.api.client.WebResource;
-
-/**
- * Helper to invoke management REST operations against a GlassFish instance
- * using the Jersey client library.
- *
- * @author dclarke
- * @since EclipseLink 2.4
- */
-public class RESTOperations {
-
- private String server;
-
- private int port = 4848;
-
- public RESTOperations(String server) {
- super();
- this.server = server;
- }
-
- public int getPort() {
- return port;
- }
-
- public void setPort(int port) {
- this.port = port;
- }
-
- public String getServer() {
- return server;
- }
-
- private static final String ADMINISTRATION_URL = "/management";
-
- protected WebResource getWebResource(Client client, String resourcePath) {
- return client.resource("http://" + getServer() + ":" + getPort() + ADMINISTRATION_URL + resourcePath);
- }
-
- public <T> T get(String resourcePath, MediaType mediaType, Class<T> resultClass) throws JAXBException {
- Client client = Client.create();
- WebResource webResource = getWebResource(client, resourcePath);
- ClientResponse response = webResource.accept(mediaType.getMediaType()).get(ClientResponse.class);
-
- if (response.getStatus() != 200) {
- throw new RuntimeException("Failed : HTTP error code : " + response.getStatus());
- }
-
- Unmarshaller unmarshaller = MOXyContextHelper.createUnmarshaller(mediaType);
- return unmarshaller.unmarshal(new StreamSource(response.getEntityInputStream()), resultClass).getValue();
- }
-
-}
diff --git a/admin.services/src/main/java/eclipselink/example/mysports/admin/services/glassfish/Result.java b/admin.services/src/main/java/eclipselink/example/mysports/admin/services/glassfish/Result.java
deleted file mode 100644
index 58ecb8d..0000000
--- a/admin.services/src/main/java/eclipselink/example/mysports/admin/services/glassfish/Result.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * dclarke - EclipseLink 2.4 - MySports Demo Bug 344608
- ******************************************************************************/
-package eclipselink.example.mysports.admin.services.glassfish;
-
-import java.util.List;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlSeeAlso;
-
-import org.eclipse.persistence.oxm.annotations.XmlPath;
-
-/**
- * TODO
- *
- * @author dclarke
- * @since EclipseLink 2.4
- */
-@XmlAccessorType(XmlAccessType.FIELD)
-@XmlSeeAlso({ JDBCResource.class })
-public class Result {
-
- private String message;
-
- private String command;
-
- @XmlElement(name = "exit_code")
- private String exitCode;
-
- private List<Message> children;
-
- private Properties properties;
-
- @XmlPath("extraProperties/properties")
- private List<Property> extraProperties;
-
- public String getMessage() {
- return message;
- }
-
- public void setMessage(String message) {
- this.message = message;
- }
-
- public String getCommand() {
- return command;
- }
-
- public void setCommand(String command) {
- this.command = command;
- }
-
- public String getExitCode() {
- return exitCode;
- }
-
- public void setExitCode(String exitCode) {
- this.exitCode = exitCode;
- }
-
- public List<Message> getChildren() {
- return children;
- }
-
- public String[] getChildrenMessages() {
- String[] messages = new String[getChildren().size()];
- for (int index = 0; index < getChildren().size(); index++) {
- messages[index] = getChildren().get(index).getMessage();
- }
- return messages;
- }
-
- public Properties getProperties() {
- return properties;
- }
-
- public List<Property> getExtraProperties() {
- return extraProperties;
- }
-
- public String toString() {
- return "RESTResult(" + getCommand() + ")";
- }
-}
diff --git a/admin.services/src/main/java/eclipselink/example/mysports/admin/services/glassfish/jaxb.properties b/admin.services/src/main/java/eclipselink/example/mysports/admin/services/glassfish/jaxb.properties
deleted file mode 100644
index 5837a4c..0000000
--- a/admin.services/src/main/java/eclipselink/example/mysports/admin/services/glassfish/jaxb.properties
+++ /dev/null
@@ -1 +0,0 @@
-javax.xml.bind.context.factory=org.eclipse.persistence.jaxb.JAXBContextFactory \ No newline at end of file
diff --git a/admin.services/src/main/jpa-modelgen/eclipselink/example/mysports/admin/model/Extension_.java b/admin.services/src/main/jpa-modelgen/eclipselink/example/mysports/admin/model/Extension_.java
deleted file mode 100644
index 2dcc360..0000000
--- a/admin.services/src/main/jpa-modelgen/eclipselink/example/mysports/admin/model/Extension_.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package eclipselink.example.mysports.admin.model;
-
-import javax.annotation.Generated;
-import javax.persistence.metamodel.SingularAttribute;
-import javax.persistence.metamodel.StaticMetamodel;
-
-@Generated(value="Dali", date="2013-02-22T10:11:27.052-0500")
-@StaticMetamodel(Extension.class)
-public class Extension_ {
- public static volatile SingularAttribute<Extension, HostedLeague> league;
- public static volatile SingularAttribute<Extension, String> type;
- public static volatile SingularAttribute<Extension, String> name;
- public static volatile SingularAttribute<Extension, String> javaType;
- public static volatile SingularAttribute<Extension, String> columnName;
-}
diff --git a/admin.services/src/main/jpa-modelgen/eclipselink/example/mysports/admin/model/GlassFish_.java b/admin.services/src/main/jpa-modelgen/eclipselink/example/mysports/admin/model/GlassFish_.java
deleted file mode 100644
index c9290d3..0000000
--- a/admin.services/src/main/jpa-modelgen/eclipselink/example/mysports/admin/model/GlassFish_.java
+++ /dev/null
@@ -1,9 +0,0 @@
-package eclipselink.example.mysports.admin.model;
-
-import javax.annotation.Generated;
-import javax.persistence.metamodel.StaticMetamodel;
-
-@Generated(value="Dali", date="2013-02-22T10:11:27.055-0500")
-@StaticMetamodel(GlassFish.class)
-public class GlassFish_ extends HostEnvironment_ {
-}
diff --git a/admin.services/src/main/jpa-modelgen/eclipselink/example/mysports/admin/model/HostEnvironment_.java b/admin.services/src/main/jpa-modelgen/eclipselink/example/mysports/admin/model/HostEnvironment_.java
deleted file mode 100644
index dc99855..0000000
--- a/admin.services/src/main/jpa-modelgen/eclipselink/example/mysports/admin/model/HostEnvironment_.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package eclipselink.example.mysports.admin.model;
-
-import javax.annotation.Generated;
-import javax.persistence.metamodel.SingularAttribute;
-import javax.persistence.metamodel.StaticMetamodel;
-
-@Generated(value="Dali", date="2013-02-22T10:11:27.056-0500")
-@StaticMetamodel(HostEnvironment.class)
-public class HostEnvironment_ {
- public static volatile SingularAttribute<HostEnvironment, Integer> id;
- public static volatile SingularAttribute<HostEnvironment, String> name;
- public static volatile SingularAttribute<HostEnvironment, String> description;
-}
diff --git a/admin.services/src/main/jpa-modelgen/eclipselink/example/mysports/admin/model/HostedLeague_.java b/admin.services/src/main/jpa-modelgen/eclipselink/example/mysports/admin/model/HostedLeague_.java
deleted file mode 100644
index b833d44..0000000
--- a/admin.services/src/main/jpa-modelgen/eclipselink/example/mysports/admin/model/HostedLeague_.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package eclipselink.example.mysports.admin.model;
-
-import javax.annotation.Generated;
-import javax.persistence.metamodel.ListAttribute;
-import javax.persistence.metamodel.SingularAttribute;
-import javax.persistence.metamodel.StaticMetamodel;
-
-@Generated(value="Dali", date="2013-02-22T10:11:27.055-0500")
-@StaticMetamodel(HostedLeague.class)
-public class HostedLeague_ {
- public static volatile SingularAttribute<HostedLeague, String> id;
- public static volatile SingularAttribute<HostedLeague, String> name;
- public static volatile SingularAttribute<HostedLeague, String> colourScheme;
- public static volatile SingularAttribute<HostedLeague, String> logoUrl;
- public static volatile SingularAttribute<HostedLeague, String> datasourceName;
- public static volatile SingularAttribute<HostedLeague, Boolean> shared;
- public static volatile SingularAttribute<HostedLeague, DataIsolation> dataIsolation;
- public static volatile ListAttribute<HostedLeague, Extension> playerExtensions;
- public static volatile ListAttribute<HostedLeague, Extension> teamExtensions;
- public static volatile ListAttribute<HostedLeague, Extension> divisionExtensions;
- public static volatile SingularAttribute<HostedLeague, Long> version;
-}
diff --git a/admin.services/src/main/jpa-modelgen/eclipselink/example/mysports/admin/model/Style_.java b/admin.services/src/main/jpa-modelgen/eclipselink/example/mysports/admin/model/Style_.java
deleted file mode 100644
index b12fd68..0000000
--- a/admin.services/src/main/jpa-modelgen/eclipselink/example/mysports/admin/model/Style_.java
+++ /dev/null
@@ -1,12 +0,0 @@
-package eclipselink.example.mysports.admin.model;
-
-import javax.annotation.Generated;
-import javax.persistence.metamodel.SingularAttribute;
-import javax.persistence.metamodel.StaticMetamodel;
-
-@Generated(value="Dali", date="2013-02-22T10:11:27.057-0500")
-@StaticMetamodel(Style.class)
-public class Style_ {
- public static volatile SingularAttribute<Style, String> name;
- public static volatile SingularAttribute<Style, String> css;
-}
diff --git a/admin.services/src/main/jpa-modelgen/eclipselink/example/mysports/admin/model/WebLogic_.java b/admin.services/src/main/jpa-modelgen/eclipselink/example/mysports/admin/model/WebLogic_.java
deleted file mode 100644
index 284d7ec..0000000
--- a/admin.services/src/main/jpa-modelgen/eclipselink/example/mysports/admin/model/WebLogic_.java
+++ /dev/null
@@ -1,9 +0,0 @@
-package eclipselink.example.mysports.admin.model;
-
-import javax.annotation.Generated;
-import javax.persistence.metamodel.StaticMetamodel;
-
-@Generated(value="Dali", date="2013-02-22T10:11:27.058-0500")
-@StaticMetamodel(WebLogic.class)
-public class WebLogic_ extends HostEnvironment_ {
-}
diff --git a/admin.services/src/main/resources/META-INF/eclipselink-oxm.xml b/admin.services/src/main/resources/META-INF/eclipselink-oxm.xml
deleted file mode 100644
index e1ffdc1..0000000
--- a/admin.services/src/main/resources/META-INF/eclipselink-oxm.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0"?>
-<xml-bindings version="2.4"
- xmlns="http://www.eclipse.org/eclipselink/xsds/persistence/oxm"
- package-name="eclipselink.example.mysports.admin.model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.eclipse.org/eclipselink/xsds/persistence/oxm http://www.eclipse.org/eclipselink/xsds/eclipselink_oxm_2_4.xsd">
- <java-types>
- <java-type name="HostedLeague" xml-accessor-type="FIELD" >
- <xml-root-element name="league"/>
- <java-attributes>
- <xml-attribute java-attribute="id" />
- <xml-attribute java-attribute="version" />
- <xml-element java-attribute="name" />
- <xml-element java-attribute="colourScheme"/>
- <xml-element java-attribute="logoUrl"/>
- <xml-element java-attribute="uri" xml-path="link/@href"/>
- <xml-transient java-attribute="extensions"/>
- <xml-transient java-attribute="dataIsolation"/>
- <xml-transient java-attribute="datasource"/>
- <xml-transient java-attribute="shared"/>
- </java-attributes>
- </java-type>
- </java-types>
-</xml-bindings> \ No newline at end of file
diff --git a/admin.services/src/main/resources/META-INF/persistence.xml b/admin.services/src/main/resources/META-INF/persistence.xml
deleted file mode 100644
index 9384ed4..0000000
--- a/admin.services/src/main/resources/META-INF/persistence.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
- <persistence-unit name="MySportsAdmin">
- <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
- <jta-data-source>java:global/mysports</jta-data-source>
- <class>eclipselink.example.mysports.admin.model.WebLogic</class>
- <class>eclipselink.example.mysports.admin.model.Style</class>
- <class>eclipselink.example.mysports.admin.model.Extension</class>
- <class>eclipselink.example.mysports.admin.model.GlassFish</class>
- <class>eclipselink.example.mysports.admin.model.HostedLeague</class>
- <class>eclipselink.example.mysports.admin.model.HostEnvironment</class>
- <validation-mode>NONE</validation-mode>
- <properties>
- <property name="eclipselink.weaving" value="true"/>
- <property name="eclipselink.logging.level" value="FINE"/>
- <property name="eclipselink.logging.timestamp" value="false"/>
- <property name="eclipselink.logging.thread" value="false"/>
- <property name="eclipselink.logging.session" value="false"/>
- <property name="eclipselink.logging.exceptions" value="false"/>
- <property name="eclipselink.logging.connection" value="false"/>
- <property name="eclipselink.logging.level.metadata" value="WARNING"/>
- <property name="eclipselink.logging.logger" value="DefaultLogger"/>
- </properties>
- </persistence-unit>
-</persistence>
diff --git a/admin.services/src/main/resources/black.css b/admin.services/src/main/resources/black.css
deleted file mode 100644
index d646aa3..0000000
--- a/admin.services/src/main/resources/black.css
+++ /dev/null
@@ -1,209 +0,0 @@
-#*******************************************************************************
-# * Copyright (c) 2010 Oracle. All rights reserved.
-# * This program and the accompanying materials are made available under the
-# * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
-# * which accompanies this distribution.
-# * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
-# * and the Eclipse Distribution License is available at
-# * http://www.eclipse.org/org/documents/edl-v10.php.
-# *
-# * Contributors:
-# * dclarke - MySports Example for EclipseLink 2.3
-# ******************************************************************************/
-BODY, P, LI, UL, OL {
- font-family: Arial, Helvetica, sans-serif;
- font-size: 50%;
- color:#000000;
- list-style-position: outside;
-}
-
-A:link {
- font-family: Arial, Helvetica, sans-serif;
- color:#663300;
-}
-
-A:active {
- font-family: Arial, Helvetica, sans-serif;
- color:#ff6600;
-
-}
-
-A:visited {
- font-family: Arial, Helvetica, sans-serif;
- color:#996633;
-
-}
-
-A.navigation:link
-{
- font-family: Arial, Helvetica, sans-serif;
- font-size:65%;
- color:#996633;
-}
-
-A.navigation:active
-{
- font-family: Arial, Helvetica, sans-serif;
- font-size:65%;
- color:#996633;
-}
-
-A.navigation:visited
-{
- font-family: Arial, Helvetica, sans-serif;
- font-size:65%;
- color:#996633;
-}
-
-.clear { /* generic container (i.e. div) for floating buttons */
- overflow: hidden;
- width: 100%;
-}
-
-c.button {
- background: transparent url('../images/bg_button_a.gif') no-repeat scroll top right;
- color: #444;
- display: block;
- float: left;
- font: normal 12px arial, sans-serif;
- height: 24px;
- margin-right: 6px;
- padding-right: 18px; /* sliding doors padding */
- text-decoration: none;
-}
-
-a.button span {
- background: transparent url('../images/bg_button_span.gif') no-repeat;
- display: block;
- line-height: 14px;
- padding: 5px 0 5px 18px;
-}
-
-a.button:active {
- background-position: bottom right;
- color: #000;
- outline: none; /* hide dotted outline in Firefox */
-}
-
-a.button:active span {
- background-position: bottom left;
- padding: 6px 0 4px 18px; /* push text down 1px */
-}
-p.listpara
-{text-indent: 15%}
-
-H1 {
- font-family: Arial, Helvetica, sans-serif;
- font-size:200%;
- color: red;
- width : 100%;
- border-width : 0px 0px 2px 0px;
- margin-left: 20px;
-}
-
-H2 {
- font-family: Arial, Helvetica, sans-serif;
- font-size:130%;
- font-style: italic;
- color: white;
- width : 100%;
- margin-left: 20px;
-}
-
-H3 {
- font-family: Arial, Helvetica, sans-serif;
- font-size:110%;
- color: red;
- border : solid #CCCC99;
- width : 100%;
- border-width : 0px 0px 2px 0px;
-}
-
-H4 {
- font-family: Arial, Helvetica, sans-serif;
- font-size:92%;
- color:#000000;
- font-weight: bold;
- width : 100%;
-}
-
-.code_no_color {
- color : #000000;
- font-family : "Courier New", "Courier", "monospace";
-}
-
-code {
- color : #336699;
- font-family : "Courier New", "Courier", "monospace";
-}
-
-P.indent {
- text-indent: 9%;
-}
-
-table.borders {
- border : 1% solid #BDB76B;
-}
-
-TR {
- text-align : left;
- vertical-align : top;
-}
-
-TH {
- font-family: Arial, Helvetica, sans-serif;
- font-size: 11pt;
- color:#000000;
- font-weight: bold;
-}
-
-TD {
- font-family: Arial, Helvetica, sans-serif;
- font-size: 11pt;
- color:#000000;
-}
-
-.smalltext {
- font-size:80%;
-}
-
-p.note {
- display: block;
- font-family: Arial, Helvetica, Geneva, sans-serif;
- font-size: 95%;
-}
-
-p.warning {
- display: block;
- font-family: Arial, Helvetica, Geneva, sans-serif;
- font-size: 95%;
-}
-
-pre {
- font-family: "Courier New", Courier, mono;
- font-size: 92%;
- text-indent : 15%;
-}
-
-table.pretty {
- background: whitesmoke;
- border-collapse: collapse;
-}
-table.pretty th, table.pretty td {
- border: 1px silver solid;
- padding: 0.2em;
- font-size: 10pt;
-}
-table.pretty th {
- background: black;
- text-align: left;
- color: white;
-}
-table.pretty caption {
- margin-left: inherit;
- margin-right: inherit;
-}
-
-table.accent {
- background: black;
-}
diff --git a/admin.services/src/main/resources/blue.css b/admin.services/src/main/resources/blue.css
deleted file mode 100644
index 7f228a4..0000000
--- a/admin.services/src/main/resources/blue.css
+++ /dev/null
@@ -1,212 +0,0 @@
-#*******************************************************************************
-# * Copyright (c) 2010 Oracle. All rights reserved.
-# * This program and the accompanying materials are made available under the
-# * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
-# * which accompanies this distribution.
-# * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
-# * and the Eclipse Distribution License is available at
-# * http://www.eclipse.org/org/documents/edl-v10.php.
-# *
-# * Contributors:
-# * dclarke - MySports Example for EclipseLink 2.3
-# ******************************************************************************/
-BODY, P, LI, UL, OL {
- font-family: Arial, Helvetica, sans-serif;
- font-size: 50%;
- color:#000000;
- list-style-position: outside;
-}
-
-A:link {
- font-family: Arial, Helvetica, sans-serif;
- color:#663300;
-
-}
-
-A:active {
- font-family: Arial, Helvetica, sans-serif;
- color:#ff6600;
-
-}
-
-A:visited {
- font-family: Arial, Helvetica, sans-serif;
- color:#996633;
-
-}
-
-A.navigation:link
-{
- font-family: Arial, Helvetica, sans-serif;
- font-size:65%;
- color:#996633;
-}
-
-A.navigation:active
-{
- font-family: Arial, Helvetica, sans-serif;
- font-size:65%;
- color:#996633;
-}
-
-A.navigation:visited
-{
- font-family: Arial, Helvetica, sans-serif;
- font-size:65%;
- color:#996633;
-}
-
-.clear { /* generic container (i.e. div) for floating buttons */
- overflow: hidden;
- width: 100%;
-}
-
-c.button {
- background: transparent url('../images/bg_button_a.gif') no-repeat scroll top right;
- color: #444;
- display: block;
- float: left;
- font: normal 12px arial, sans-serif;
- height: 24px;
- margin-right: 6px;
- padding-right: 18px; /* sliding doors padding */
- text-decoration: none;
-}
-
-a.button span {
- background: transparent url('../images/bg_button_span.gif') no-repeat;
- display: block;
- line-height: 14px;
- padding: 5px 0 5px 18px;
-}
-
-a.button:active {
- background-position: bottom right;
- color: #000;
- outline: none; /* hide dotted outline in Firefox */
-}
-
-a.button:active span {
- background-position: bottom left;
- padding: 6px 0 4px 18px; /* push text down 1px */
-}
-p.listpara
-{text-indent: 15%}
-
-H1 {
- font-family: Arial, Helvetica, sans-serif;
- font-size:170%;
- color:#336699;
- border : solid ##3333CC;
- width : 100%;
- border-width : 0px 0px 2px 0px;
- margin-left: 20px;
-}
-
-H2 {
- font-family: Arial, Helvetica, sans-serif;
- font-size:130%;
- font-style: italic;
- color: white;
- width : 100%;
- margin-left: 20px;
-}
-
-H3 {
- font-family: Arial, Helvetica, sans-serif;
- font-size:110%;
- color:#336699;
- border : solid #CCCC99;
- width : 100%;
- border-width : 0px 0px 2px 0px;
-}
-
-H4 {
- font-family: Arial, Helvetica, sans-serif;
- font-size:92%;
- color:#000000;
- font-weight: bold;
- width : 100%;
-}
-
-.code_no_color {
- color : #000000;
- font-family : "Courier New", "Courier", "monospace";
-}
-
-code {
- color : #336699;
- font-family : "Courier New", "Courier", "monospace";
-}
-
-P.indent {
- text-indent: 9%;
-}
-
-table.borders {
- border : 1% solid #BDB76B;
-}
-
-TR {
- text-align : left;
- vertical-align : top;
-}
-
-TH {
- font-family: Arial, Helvetica, sans-serif;
- font-size: 11pt;
- color:#000000;
- font-weight: bold;
-}
-
-TD {
- font-family: Arial, Helvetica, sans-serif;
- font-size: 11pt;
- color:#000000;
-}
-
-.smalltext {
- font-size:80%;
-}
-
-p.note {
- display: block;
- font-family: Arial, Helvetica, Geneva, sans-serif;
- font-size: 95%;
-}
-
-p.warning {
- display: block;
- font-family: Arial, Helvetica, Geneva, sans-serif;
- font-size: 95%;
-}
-
-pre {
- font-family: "Courier New", Courier, mono;
- font-size: 92%;
- text-indent : 15%;
-}
-
-table.pretty {
- background: whitesmoke;
- border-collapse: collapse;
-}
-table.pretty th, table.pretty td {
- border: 1px silver solid;
- padding: 0.2em;
- font-size: 10pt;
-}
-table.pretty th {
- background: blue;
- text-align: left;
- color: white;
-}
-table.pretty caption {
- margin-left: inherit;
- margin-right: inherit;
-}
-
-table.accent {
- background: blue;
-}
-
diff --git a/admin.services/src/main/resources/default.css b/admin.services/src/main/resources/default.css
deleted file mode 100644
index 8136a7a..0000000
--- a/admin.services/src/main/resources/default.css
+++ /dev/null
@@ -1,212 +0,0 @@
-#*******************************************************************************
-# * Copyright (c) 2010 Oracle. All rights reserved.
-# * This program and the accompanying materials are made available under the
-# * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
-# * which accompanies this distribution.
-# * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
-# * and the Eclipse Distribution License is available at
-# * http://www.eclipse.org/org/documents/edl-v10.php.
-# *
-# * Contributors:
-# * dclarke - MySports Example for EclipseLink 2.3
-# ******************************************************************************/
-BODY, P, LI, UL, OL {
- font-family: Arial, Helvetica, sans-serif;
- font-size: 50%;
- color:#000000;
- list-style-position: outside;
-}
-
-A:link {
- font-family: Arial, Helvetica, sans-serif;
- color:#663300;
-
-}
-
-A:active {
- font-family: Arial, Helvetica, sans-serif;
- color:#ff6600;
-
-}
-
-A:visited {
- font-family: Arial, Helvetica, sans-serif;
- color:#996633;
-
-}
-
-A.navigation:link
-{
- font-family: Arial, Helvetica, sans-serif;
- font-size:65%;
- color:#996633;
-}
-
-A.navigation:active
-{
- font-family: Arial, Helvetica, sans-serif;
- font-size:65%;
- color:#996633;
-}
-
-A.navigation:visited
-{
- font-family: Arial, Helvetica, sans-serif;
- font-size:65%;
- color:#996633;
-}
-
-.clear { /* generic container (i.e. div) for floating buttons */
- overflow: hidden;
- width: 100%;
-}
-
-c.button {
- background: transparent url('../images/bg_button_a.gif') no-repeat scroll top right;
- color: #444;
- display: block;
- float: left;
- font: normal 12px arial, sans-serif;
- height: 24px;
- margin-right: 6px;
- padding-right: 18px; /* sliding doors padding */
- text-decoration: none;
-}
-
-a.button span {
- background: transparent url('../images/bg_button_span.gif') no-repeat;
- display: block;
- line-height: 14px;
- padding: 5px 0 5px 18px;
-}
-
-a.button:active {
- background-position: bottom right;
- color: #000;
- outline: none; /* hide dotted outline in Firefox */
-}
-
-a.button:active span {
- background-position: bottom left;
- padding: 6px 0 4px 18px; /* push text down 1px */
-}
-p.listpara
-{text-indent: 15%}
-
-H1 {
- font-family: Arial, Helvetica, sans-serif;
- font-size:170%;
- color:#336699;
- border : solid ##3333CC;
- width : 100%;
- border-width : 0px 0px 2px 0px;
- margin-left: 20px;
-}
-
-H2 {
- font-family: Arial, Helvetica, sans-serif;
- font-size:130%;
- font-style: italic;
- color: white;
- width : 100%;
- margin-left: 20px;
-}
-
-H3 {
- font-family: Arial, Helvetica, sans-serif;
- font-size:110%;
- color:#336699;
- border : solid #CCCC99;
- width : 100%;
- border-width : 0px 0px 2px 0px;
-}
-
-H4 {
- font-family: Arial, Helvetica, sans-serif;
- font-size:92%;
- color:#000000;
- font-weight: bold;
- width : 100%;
-}
-
-.code_no_color {
- color : #000000;
- font-family : "Courier New", "Courier", "monospace";
-}
-
-code {
- color : #336699;
- font-family : "Courier New", "Courier", "monospace";
-}
-
-P.indent {
- text-indent: 9%;
-}
-
-table.borders {
- border : 1% solid #BDB76B;
-}
-
-TR {
- text-align : left;
- vertical-align : top;
-}
-
-TH {
- font-family: Arial, Helvetica, sans-serif;
- font-size: 11pt;
- color:#000000;
- font-weight: bold;
-}
-
-TD {
- font-family: Arial, Helvetica, sans-serif;
- font-size: 11pt;
- color:#000000;
-}
-
-.smalltext {
- font-size:80%;
-}
-
-p.note {
- display: block;
- font-family: Arial, Helvetica, Geneva, sans-serif;
- font-size: 95%;
-}
-
-p.warning {
- display: block;
- font-family: Arial, Helvetica, Geneva, sans-serif;
- font-size: 95%;
-}
-
-pre {
- font-family: "Courier New", Courier, mono;
- font-size: 92%;
- text-indent : 15%;
-}
-
-table.pretty {
- background: whitesmoke;
- border-collapse: collapse;
-}
-table.pretty th, table.pretty td {
- border: 1px silver solid;
- padding: 0.2em;
- font-size: 10pt;
-}
-table.pretty th {
- background: green;
- text-align: left;
- color: white;
-}
-table.pretty caption {
- margin-left: inherit;
- margin-right: inherit;
-}
-
-table.accent {
- background: green;
-}
-
diff --git a/admin.services/src/main/resources/green.css b/admin.services/src/main/resources/green.css
deleted file mode 100644
index 8136a7a..0000000
--- a/admin.services/src/main/resources/green.css
+++ /dev/null
@@ -1,212 +0,0 @@
-#*******************************************************************************
-# * Copyright (c) 2010 Oracle. All rights reserved.
-# * This program and the accompanying materials are made available under the
-# * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
-# * which accompanies this distribution.
-# * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
-# * and the Eclipse Distribution License is available at
-# * http://www.eclipse.org/org/documents/edl-v10.php.
-# *
-# * Contributors:
-# * dclarke - MySports Example for EclipseLink 2.3
-# ******************************************************************************/
-BODY, P, LI, UL, OL {
- font-family: Arial, Helvetica, sans-serif;
- font-size: 50%;
- color:#000000;
- list-style-position: outside;
-}
-
-A:link {
- font-family: Arial, Helvetica, sans-serif;
- color:#663300;
-
-}
-
-A:active {
- font-family: Arial, Helvetica, sans-serif;
- color:#ff6600;
-
-}
-
-A:visited {
- font-family: Arial, Helvetica, sans-serif;
- color:#996633;
-
-}
-
-A.navigation:link
-{
- font-family: Arial, Helvetica, sans-serif;
- font-size:65%;
- color:#996633;
-}
-
-A.navigation:active
-{
- font-family: Arial, Helvetica, sans-serif;
- font-size:65%;
- color:#996633;
-}
-
-A.navigation:visited
-{
- font-family: Arial, Helvetica, sans-serif;
- font-size:65%;
- color:#996633;
-}
-
-.clear { /* generic container (i.e. div) for floating buttons */
- overflow: hidden;
- width: 100%;
-}
-
-c.button {
- background: transparent url('../images/bg_button_a.gif') no-repeat scroll top right;
- color: #444;
- display: block;
- float: left;
- font: normal 12px arial, sans-serif;
- height: 24px;
- margin-right: 6px;
- padding-right: 18px; /* sliding doors padding */
- text-decoration: none;
-}
-
-a.button span {
- background: transparent url('../images/bg_button_span.gif') no-repeat;
- display: block;
- line-height: 14px;
- padding: 5px 0 5px 18px;
-}
-
-a.button:active {
- background-position: bottom right;
- color: #000;
- outline: none; /* hide dotted outline in Firefox */
-}
-
-a.button:active span {
- background-position: bottom left;
- padding: 6px 0 4px 18px; /* push text down 1px */
-}
-p.listpara
-{text-indent: 15%}
-
-H1 {
- font-family: Arial, Helvetica, sans-serif;
- font-size:170%;
- color:#336699;
- border : solid ##3333CC;
- width : 100%;
- border-width : 0px 0px 2px 0px;
- margin-left: 20px;
-}
-
-H2 {
- font-family: Arial, Helvetica, sans-serif;
- font-size:130%;
- font-style: italic;
- color: white;
- width : 100%;
- margin-left: 20px;
-}
-
-H3 {
- font-family: Arial, Helvetica, sans-serif;
- font-size:110%;
- color:#336699;
- border : solid #CCCC99;
- width : 100%;
- border-width : 0px 0px 2px 0px;
-}
-
-H4 {
- font-family: Arial, Helvetica, sans-serif;
- font-size:92%;
- color:#000000;
- font-weight: bold;
- width : 100%;
-}
-
-.code_no_color {
- color : #000000;
- font-family : "Courier New", "Courier", "monospace";
-}
-
-code {
- color : #336699;
- font-family : "Courier New", "Courier", "monospace";
-}
-
-P.indent {
- text-indent: 9%;
-}
-
-table.borders {
- border : 1% solid #BDB76B;
-}
-
-TR {
- text-align : left;
- vertical-align : top;
-}
-
-TH {
- font-family: Arial, Helvetica, sans-serif;
- font-size: 11pt;
- color:#000000;
- font-weight: bold;
-}
-
-TD {
- font-family: Arial, Helvetica, sans-serif;
- font-size: 11pt;
- color:#000000;
-}
-
-.smalltext {
- font-size:80%;
-}
-
-p.note {
- display: block;
- font-family: Arial, Helvetica, Geneva, sans-serif;
- font-size: 95%;
-}
-
-p.warning {
- display: block;
- font-family: Arial, Helvetica, Geneva, sans-serif;
- font-size: 95%;
-}
-
-pre {
- font-family: "Courier New", Courier, mono;
- font-size: 92%;
- text-indent : 15%;
-}
-
-table.pretty {
- background: whitesmoke;
- border-collapse: collapse;
-}
-table.pretty th, table.pretty td {
- border: 1px silver solid;
- padding: 0.2em;
- font-size: 10pt;
-}
-table.pretty th {
- background: green;
- text-align: left;
- color: white;
-}
-table.pretty caption {
- margin-left: inherit;
- margin-right: inherit;
-}
-
-table.accent {
- background: green;
-}
-
diff --git a/admin.services/src/main/resources/red.css b/admin.services/src/main/resources/red.css
deleted file mode 100644
index 23f0864..0000000
--- a/admin.services/src/main/resources/red.css
+++ /dev/null
@@ -1,209 +0,0 @@
-#*******************************************************************************
-# * Copyright (c) 2010 Oracle. All rights reserved.
-# * This program and the accompanying materials are made available under the
-# * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
-# * which accompanies this distribution.
-# * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
-# * and the Eclipse Distribution License is available at
-# * http://www.eclipse.org/org/documents/edl-v10.php.
-# *
-# * Contributors:
-# * dclarke - MySports Example for EclipseLink 2.3
-# ******************************************************************************/
-BODY, P, LI, UL, OL {
- font-family: Arial, Helvetica, sans-serif;
- font-size: 50%;
- color:#000000;
- list-style-position: outside;
-}
-
-A:link {
- font-family: Arial, Helvetica, sans-serif;
- color:#663300;
-}
-
-A:active {
- font-family: Arial, Helvetica, sans-serif;
- color:#ff6600;
-
-}
-
-A:visited {
- font-family: Arial, Helvetica, sans-serif;
- color:#996633;
-
-}
-
-A.navigation:link
-{
- font-family: Arial, Helvetica, sans-serif;
- font-size:65%;
- color:#996633;
-}
-
-A.navigation:active
-{
- font-family: Arial, Helvetica, sans-serif;
- font-size:65%;
- color:#996633;
-}
-
-A.navigation:visited
-{
- font-family: Arial, Helvetica, sans-serif;
- font-size:65%;
- color:#996633;
-}
-
-.clear { /* generic container (i.e. div) for floating buttons */
- overflow: hidden;
- width: 100%;
-}
-
-c.button {
- background: transparent url('../images/bg_button_a.gif') no-repeat scroll top right;
- color: #444;
- display: block;
- float: left;
- font: normal 12px arial, sans-serif;
- height: 24px;
- margin-right: 6px;
- padding-right: 18px; /* sliding doors padding */
- text-decoration: none;
-}
-
-a.button span {
- background: transparent url('../images/bg_button_span.gif') no-repeat;
- display: block;
- line-height: 14px;
- padding: 5px 0 5px 18px;
-}
-
-a.button:active {
- background-position: bottom right;
- color: #000;
- outline: none; /* hide dotted outline in Firefox */
-}
-
-a.button:active span {
- background-position: bottom left;
- padding: 6px 0 4px 18px; /* push text down 1px */
-}
-p.listpara
-{text-indent: 15%}
-
-H1 {
- font-family: Arial, Helvetica, sans-serif;
- font-size:200%;
- color: red;
- width : 100%;
- border-width : 0px 0px 2px 0px;
- margin-left: 20px;
-}
-
-H2 {
- font-family: Arial, Helvetica, sans-serif;
- font-size:130%;
- font-style: italic;
- color: white;
- width : 100%;
- margin-left: 20px;
-}
-
-H3 {
- font-family: Arial, Helvetica, sans-serif;
- font-size:110%;
- color: red;
- border : solid #CCCC99;
- width : 100%;
- border-width : 0px 0px 2px 0px;
-}
-
-H4 {
- font-family: Arial, Helvetica, sans-serif;
- font-size:92%;
- color:#000000;
- font-weight: bold;
- width : 100%;
-}
-
-.code_no_color {
- color : #000000;
- font-family : "Courier New", "Courier", "monospace";
-}
-
-code {
- color : #336699;
- font-family : "Courier New", "Courier", "monospace";
-}
-
-P.indent {
- text-indent: 9%;
-}
-
-table.borders {
- border : 1% solid #BDB76B;
-}
-
-TR {
- text-align : left;
- vertical-align : top;
-}
-
-TH {
- font-family: Arial, Helvetica, sans-serif;
- font-size: 11pt;
- color:#000000;
- font-weight: bold;
-}
-
-TD {
- font-family: Arial, Helvetica, sans-serif;
- font-size: 11pt;
- color:#000000;
-}
-
-.smalltext {
- font-size:80%;
-}
-
-p.note {
- display: block;
- font-family: Arial, Helvetica, Geneva, sans-serif;
- font-size: 95%;
-}
-
-p.warning {
- display: block;
- font-family: Arial, Helvetica, Geneva, sans-serif;
- font-size: 95%;
-}
-
-pre {
- font-family: "Courier New", Courier, mono;
- font-size: 92%;
- text-indent : 15%;
-}
-
-table.pretty {
- background: whitesmoke;
- border-collapse: collapse;
-}
-table.pretty th, table.pretty td {
- border: 1px silver solid;
- padding: 0.2em;
- font-size: 10pt;
-}
-table.pretty th {
- background: red;
- text-align: left;
- color: white;
-}
-table.pretty caption {
- margin-left: inherit;
- margin-right: inherit;
-}
-
-table.accent {
- background: red;
-}
diff --git a/admin.services/src/test/java/eclipselink/example/mysports/admin/services/test/AdminPersistenceTesting.java b/admin.services/src/test/java/eclipselink/example/mysports/admin/services/test/AdminPersistenceTesting.java
deleted file mode 100644
index f9a4028..0000000
--- a/admin.services/src/test/java/eclipselink/example/mysports/admin/services/test/AdminPersistenceTesting.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * dclarke - EclipseLink 2.4 - MySports Demo Bug 344608
- ******************************************************************************/
-package eclipselink.example.mysports.admin.services.test;
-
-import java.lang.reflect.Proxy;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.persistence.EntityManagerFactory;
-import javax.persistence.Persistence;
-
-import org.eclipse.persistence.config.PersistenceUnitProperties;
-import org.eclipse.persistence.jpa.JpaHelper;
-import org.eclipse.persistence.sessions.server.Server;
-import org.eclipse.persistence.tools.schemaframework.DefaultTableGenerator;
-import org.eclipse.persistence.tools.schemaframework.SchemaManager;
-import org.eclipse.persistence.tools.schemaframework.TableCreator;
-
-import eclipselink.example.mysports.admin.examples.ExampleLeagueDefinition;
-import eclipselink.example.mysports.admin.services.AdminSchemaManager;
-import eclipselink.example.mysports.admin.services.HostedLeagueRepository;
-
-public class AdminPersistenceTesting {
-
- public static Map<String, Object> add(Map<String, Object> properties) {
- Map<String, Object> props = properties;
-
- if (props == null) {
- props = new HashMap<String, Object>();
- }
- // Ensure the persistence.xml provided data source are ignored for Java
- // SE testing
- props.put(PersistenceUnitProperties.NON_JTA_DATASOURCE, "");
- props.put(PersistenceUnitProperties.JTA_DATASOURCE, "");
-
- // Configure the use of embedded derby for the tests allowing system
- // properties of the same name to override
- setProperty(props, PersistenceUnitProperties.JDBC_DRIVER, "org.apache.derby.jdbc.EmbeddedDriver");
- setProperty(props, PersistenceUnitProperties.JDBC_URL, "jdbc:derby:target/derby/mysports;create=true");
- setProperty(props, PersistenceUnitProperties.JDBC_USER, "app");
- setProperty(props, PersistenceUnitProperties.JDBC_PASSWORD, "app");
-
- // Ensure weaving is used
- props.put(PersistenceUnitProperties.WEAVING, "true");
-
- return props;
- }
-
- public static Map<String, Object> get() {
- return add(null);
- }
-
- public static HostedLeagueRepository createTestRepository(boolean replaceSchema, boolean populate) {
- EntityManagerFactory emf = Persistence.createEntityManagerFactory("MySportsAdmin", get());
- if (replaceSchema) {
- AdminSchemaManager.createTables(emf);
- }
- HostedLeagueRepository repository = (HostedLeagueRepository) Proxy.newProxyInstance(Thread.currentThread().getContextClassLoader(), new Class[] { HostedLeagueRepository.class }, new HostedLeagueRepositoryHandler(emf));
-
- if (populate) {
- ExampleLeagueDefinition.populateAll(repository);
- }
- return repository;
- }
-
- public static HostedLeagueRepository createTestRepository(boolean replaceSchema) {
- return createTestRepository(replaceSchema, true);
- }
-
- public static EntityManagerFactory getEMF(HostedLeagueRepository repository) {
- HostedLeagueRepositoryHandler handler = (HostedLeagueRepositoryHandler) Proxy.getInvocationHandler(repository);
- return handler.getEmf();
- }
-
- public static void closeTestingRepository(HostedLeagueRepository repository, boolean dropTables) {
- EntityManagerFactory emf = getEMF(repository);
- if (dropTables) {
- dropTables(emf);
- }
- emf.close();
- }
-
- public static void dropTables(EntityManagerFactory emf) {
- Server session = JpaHelper.getServerSession(emf);
- SchemaManager sm = new SchemaManager(session);
-
- TableCreator tc = new DefaultTableGenerator(session.getProject(), true).generateDefaultTableCreator();
- tc.setIgnoreDatabaseException(true);
- tc.dropTables(session, sm, true);
- }
-
-
- /**
- * Add the system property value if it exists, otherwise use the default
- * value.
- */
- private static void setProperty(Map<String, Object> props, String key, String defaultValue) {
- String value = defaultValue;
- if (System.getProperties().containsKey(key)) {
- value = System.getProperty(key);
- }
- props.put(key, value);
- }
-
-}
diff --git a/admin.services/src/test/java/eclipselink/example/mysports/admin/services/test/CreateDatabaseTest.java b/admin.services/src/test/java/eclipselink/example/mysports/admin/services/test/CreateDatabaseTest.java
deleted file mode 100644
index 6000d01..0000000
--- a/admin.services/src/test/java/eclipselink/example/mysports/admin/services/test/CreateDatabaseTest.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * dclarke - EclipseLink 2.3 - MySports Demo Bug 344608
- ******************************************************************************/
-package eclipselink.example.mysports.admin.services.test;
-
-import java.util.Map;
-
-import javax.persistence.EntityManager;
-import javax.persistence.EntityManagerFactory;
-import javax.persistence.Persistence;
-
-import org.eclipse.persistence.config.PersistenceUnitProperties;
-import org.eclipse.persistence.config.SessionCustomizer;
-import org.eclipse.persistence.exceptions.IntegrityChecker;
-import org.eclipse.persistence.jpa.JpaHelper;
-import org.eclipse.persistence.sessions.Session;
-import org.eclipse.persistence.sessions.server.Server;
-import org.junit.Assert;
-import org.junit.Test;
-
-import eclipselink.example.mysports.admin.services.HostedLeagueRepository;
-
-/**
- * Create Schema and verify using integrity checker.
- *
- * @author dclarke
- * @since EclipseLink 2.3.0
- */
-public class CreateDatabaseTest {
-
- /**
- * Using EclipseLink's schema generation when the
- * {@link EntityManagerFactory} is created to drop and create the tables and
- * sequences.
- */
- @Test
- public void createMySportsAdminSchema() throws Exception {
- HostedLeagueRepository repository= null;
-
- try {
- repository = AdminPersistenceTesting.createTestRepository(true, false);
- } finally {
- if (repository != null) {
- AdminPersistenceTesting.closeTestingRepository(repository, false);
- }
- }
- }
-
- /**
- * Verify that the database is empty with multitenancy disabled
- */
- @Test
- public void verifyEmpty() throws Exception {
- HostedLeagueRepository repository= null;
-
- try {
- repository = AdminPersistenceTesting.createTestRepository(true, false);
- EntityManagerFactory emf = AdminPersistenceTesting.getEMF(repository);
- EntityManager em = emf.createEntityManager();
-
- try {
- Assert.assertEquals(0, em.createQuery("SELECT COUNT(o) FROM HostedLeague o", Number.class).getSingleResult().intValue());
- } finally {
- em.close();
- }
- } finally {
- if (repository != null) {
- AdminPersistenceTesting.closeTestingRepository(repository, false);
- }
- }
- }
-
- /**
- * Verify the schema using the integrity checker to compare database
- * structure to that expected in the mappings.
- */
- @Test
- public void verifyMySportsAdminSchema() {
- Map<String, Object> properties = AdminPersistenceTesting.get();
-
- properties.put(PersistenceUnitProperties.SESSION_CUSTOMIZER, EnableIntegrityChecker.class.getName());
- properties.put(PersistenceUnitProperties.DEPLOY_ON_STARTUP, Boolean.TRUE.toString());
- properties.put(PersistenceUnitProperties.DDL_GENERATION, PersistenceUnitProperties.DROP_AND_CREATE);
- properties.put(PersistenceUnitProperties.DDL_GENERATION_MODE, PersistenceUnitProperties.DDL_DATABASE_GENERATION);
-
- EntityManagerFactory emf = null;
- try {
- emf = Persistence.createEntityManagerFactory("MySportsAdmin", properties);
-
- Server session = JpaHelper.getServerSession(emf);
- IntegrityChecker ic = session.getIntegrityChecker();
- Assert.assertNotNull(ic);
- Assert.assertTrue(ic.getCaughtExceptions().isEmpty());
- } finally {
- if (emf != null) {
- emf.close();
- }
- }
- }
-
- /**
- * {@link SessionCustomizer} that enables the {@link IntegrityChecker}.
- *
- * NOTE: If another {@link SessionCustomizer} is specified in the
- * persistence.xml this one will replace it.
- */
- public static class EnableIntegrityChecker implements SessionCustomizer {
-
- public void customize(Session session) throws Exception {
- IntegrityChecker ic = new IntegrityChecker();
- ic.setShouldCheckDatabase(true);
- session.setIntegrityChecker(ic);
- }
-
- }
-}
diff --git a/admin.services/src/test/java/eclipselink/example/mysports/admin/services/test/HostedLeagueRepositoryHandler.java b/admin.services/src/test/java/eclipselink/example/mysports/admin/services/test/HostedLeagueRepositoryHandler.java
deleted file mode 100644
index 5e60910..0000000
--- a/admin.services/src/test/java/eclipselink/example/mysports/admin/services/test/HostedLeagueRepositoryHandler.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * dclarke - EclipseLink 2.4 - MySports Demo Bug 344608
- ******************************************************************************/
-package eclipselink.example.mysports.admin.services.test;
-
-import java.lang.reflect.InvocationHandler;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-
-import javax.persistence.EntityManager;
-import javax.persistence.EntityManagerFactory;
-
-import eclipselink.example.mysports.admin.services.HostedLeagueRepositoryBean;
-
-/**
- * TODO
- *
- * @since EclipseLink 2.4.2
- * @author dclarke
- */
-class HostedLeagueRepositoryHandler implements InvocationHandler {
-
- private EntityManagerFactory emf;
-
- private HostedLeagueRepositoryBean repositoryBean;
-
- protected HostedLeagueRepositoryHandler(EntityManagerFactory emf) {
- super();
- this.emf = emf;
- this.repositoryBean = new HostedLeagueRepositoryBean();
- }
-
- public EntityManagerFactory getEmf() {
- return emf;
- }
-
- HostedLeagueRepositoryBean getRepositoryBean() {
- return repositoryBean;
- }
-
- @Override
- public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
- EntityManager em = getEmf().createEntityManager();
-
- try {
- em.getTransaction().begin();
- getRepositoryBean().setEntityManager(em);
- return method.invoke(getRepositoryBean(), args);
- } catch (InvocationTargetException ite) {
- if (em.getTransaction().isActive()) {
- em.getTransaction().rollback();
- }
- throw ite.getTargetException();
- } finally {
- if (em.getTransaction().isActive()) {
- em.getTransaction().commit();
- }
- em.close();
- getRepositoryBean().setEntityManager(null);
- }
- }
-
-}
diff --git a/admin.services/src/test/java/eclipselink/example/mysports/admin/services/test/TestCreateHostEnvironments.java b/admin.services/src/test/java/eclipselink/example/mysports/admin/services/test/TestCreateHostEnvironments.java
deleted file mode 100644
index 8ef6e20..0000000
--- a/admin.services/src/test/java/eclipselink/example/mysports/admin/services/test/TestCreateHostEnvironments.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * dclarke - EclipseLink 2.3 - MySports Demo Bug 344608
- ******************************************************************************/
-package eclipselink.example.mysports.admin.services.test;
-
-import javax.persistence.EntityManager;
-import javax.persistence.EntityManagerFactory;
-import javax.persistence.Persistence;
-
-import org.junit.After;
-import org.junit.AfterClass;
-import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-import eclipselink.example.mysports.admin.model.Datasource;
-import eclipselink.example.mysports.admin.model.GlassFish;
-import eclipselink.example.mysports.admin.model.HostEnvironment;
-import eclipselink.example.mysports.admin.services.AdminSchemaManager;
-import eclipselink.example.mysports.admin.services.HostEnvironmentRepository;
-import eclipselink.example.mysports.admin.services.HostEnvironmentRepositoryBean;
-
-/**
- * Create initial {@link Datasource} instances.
- *
- * @author dclarke
- * @since EclipseLink 2.3.0
- */
-public class TestCreateHostEnvironments {
-
- private static EntityManagerFactory emf;
-
- private EntityManager entityManager;
-
- private HostEnvironmentRepositoryBean repository;
-
- public HostEnvironmentRepository getRepository() {
- return repository;
- }
-
- @Test
- public void createEnvironments() {
- HostEnvironment gf = new GlassFish();
- gf.setName("GlassFish@localhost");
- gf.setDescription("GlassFish 3.1.2 instance");
-
- getRepository().create(gf);
- }
-
- @Before
- public void setupRespoitory() {
- repository = new HostEnvironmentRepositoryBean();
- entityManager = emf.createEntityManager();
- entityManager.getTransaction().begin();
- repository.setEntityManager(entityManager);
- }
-
- @After
- public void completeTransaction() {
- if (this.entityManager != null && this.entityManager.isOpen()) {
- if (this.entityManager.getTransaction().isActive()) {
- this.entityManager.getTransaction().commit();
- }
- this.entityManager.close();
- }
- this.entityManager = null;
- this.repository = null;
- }
-
- @BeforeClass
- public static void createReposirory() {
- emf = Persistence.createEntityManagerFactory("MySportsAdmin", AdminPersistenceTesting.get());
- AdminSchemaManager.createTables(emf);
-
- EntityManager em = emf.createEntityManager();
- try {
- em.getTransaction().begin();
- em.createQuery("DELETE FROM HostEnvironment").executeUpdate();
- em.getTransaction().commit();
- } finally {
- em.close();
- }
- }
-
- @AfterClass
- public static void shutdown() {
- if (emf != null && emf.isOpen()) {
- emf.close();
- }
- emf = null;
- }
-
-}
diff --git a/admin.services/src/test/java/eclipselink/example/mysports/admin/services/test/TestCreateLeagues.java b/admin.services/src/test/java/eclipselink/example/mysports/admin/services/test/TestCreateLeagues.java
deleted file mode 100644
index b06a5bc..0000000
--- a/admin.services/src/test/java/eclipselink/example/mysports/admin/services/test/TestCreateLeagues.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * dclarke - EclipseLink 2.3 - MySports Demo Bug 344608
- ******************************************************************************/
-package eclipselink.example.mysports.admin.services.test;
-
-import javax.persistence.EntityManagerFactory;
-
-import org.eclipse.persistence.jpa.JpaHelper;
-import org.eclipse.persistence.sessions.server.Server;
-import org.junit.AfterClass;
-import org.junit.Assert;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-import eclipselink.example.mysports.admin.examples.ExampleLeagueDefinition;
-import eclipselink.example.mysports.admin.services.HostedLeagueRepository;
-
-/**
- * Create initial league entities.
- *
- * @author dclarke
- * @since EclipseLink 2.3.0
- */
-public class TestCreateLeagues {
-
- @Test
- public void verifySession() {
- EntityManagerFactory emf = AdminPersistenceTesting.getEMF(repository);
- Assert.assertNotNull(emf);
-
- Server session = JpaHelper.getServerSession(emf);
- Assert.assertNotNull(session);
- Assert.assertTrue(session.isServerSession());
- }
-
- @Test
- public void createLeagues() {
- ExampleLeagueDefinition.populateAll(repository);
- }
-
- private static HostedLeagueRepository repository;
-
- @BeforeClass
- public static void createRespository() {
- repository = AdminPersistenceTesting.createTestRepository(true, false);
- }
-
- @AfterClass
- public static void closeRepository() {
- AdminPersistenceTesting.closeTestingRepository(repository, false);
- }
-
-}
diff --git a/admin.services/src/test/java/eclipselink/example/mysports/admin/services/test/TestHostedLeagueRepository.java b/admin.services/src/test/java/eclipselink/example/mysports/admin/services/test/TestHostedLeagueRepository.java
deleted file mode 100644
index cdca89b..0000000
--- a/admin.services/src/test/java/eclipselink/example/mysports/admin/services/test/TestHostedLeagueRepository.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * dclarke - EclipseLink 2.4 - MySports Demo Bug 344608
- ******************************************************************************/
-package eclipselink.example.mysports.admin.services.test;
-
-import java.lang.reflect.Proxy;
-import java.util.List;
-
-import org.junit.AfterClass;
-import org.junit.Assert;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-import eclipselink.example.mysports.admin.examples.ExampleLeagueDefinition;
-import eclipselink.example.mysports.admin.model.HostedLeague;
-import eclipselink.example.mysports.admin.services.HostedLeagueRepository;
-
-/**
- * TODO
- *
- * @since EclipseLink 2.4.2
- * @author dclarke
- */
-public class TestHostedLeagueRepository {
-
- @Test
- public void verifyProxy() {
- Assert.assertTrue(Proxy.isProxyClass(repository.getClass()));
- }
-
- @Test
- public void verifySchema() {
- //EntityManagerFactory emf = AdminPersistenceTesting.getEMF(repository);
-
- }
-
- @Test
- public void verifyAllLeagues() {
- List<HostedLeague> allLeagues = repository.allLeagues();
-
- Assert.assertNotNull(allLeagues);
- }
-
- @Test
- public void verifyAllSharedLeagues() {
- List<HostedLeague> allLeagues = repository.allSharedLeagues();
-
- Assert.assertNotNull(allLeagues);
- }
-
- //@Test
- public void getValidLogos() {
- Assert.assertNotNull(repository.getLogo(ExampleLeagueDefinition.HTHL.getLeague().getId()));
- Assert.assertNotNull(repository.getLogo(ExampleLeagueDefinition.KFL.getLeague().getId()));
- Assert.assertNotNull(repository.getLogo(ExampleLeagueDefinition.MHL.getLeague().getId()));
- Assert.assertNotNull(repository.getLogo(ExampleLeagueDefinition.OSL.getLeague().getId()));
- }
-
- //@Test
- public void getInValidLogo() {
- try {
- repository.getLogo("XXX");
- } catch (IllegalArgumentException e) {
- return;
- }
- Assert.fail("IllegalArgumentException expected but not thrown");
-
- }
-
- @Test
- public void getValidCSS() {
- Assert.assertNotNull(repository.getCSS(ExampleLeagueDefinition.HTHL.getLeague().getId()));
- Assert.assertNotNull(repository.getCSS(ExampleLeagueDefinition.KFL.getLeague().getId()));
- Assert.assertNotNull(repository.getCSS(ExampleLeagueDefinition.MHL.getLeague().getId()));
- Assert.assertNotNull(repository.getCSS(ExampleLeagueDefinition.OSL.getLeague().getId()));
- }
-
- @Test
- public void getInValidCSS() {
- try {
- repository.getCSS("XXX");
- } catch (IllegalArgumentException e) {
- return;
- }
- Assert.fail("IllegalArgumentException expected but not thrown");
- }
-
- @Test
- public void getValidORM() {
- Assert.assertNotNull(repository.getORM(ExampleLeagueDefinition.HTHL.getLeague().getId()));
- Assert.assertNotNull(repository.getORM(ExampleLeagueDefinition.KFL.getLeague().getId()));
- Assert.assertNotNull(repository.getORM(ExampleLeagueDefinition.MHL.getLeague().getId()));
- Assert.assertNotNull(repository.getORM(ExampleLeagueDefinition.OSL.getLeague().getId()));
- }
-
- @Test
- public void getInvalidORM() {
- try {
- repository.getORM("XXX");
- } catch (IllegalArgumentException e) {
- return;
- }
- Assert.fail("IllegalArgumentException expected but not thrown");
- }
-
- private static HostedLeagueRepository repository;
-
- @BeforeClass
- public static void createRespository() {
- repository = AdminPersistenceTesting.createTestRepository(true, false);
- ExampleLeagueDefinition.populateAll(repository);
- }
-
- @AfterClass
- public static void closeRepository() {
- AdminPersistenceTesting.closeTestingRepository(repository, true);
- }
-
-}
diff --git a/admin.services/src/test/java/eclipselink/example/mysports/admin/services/test/VerifyModelAndMappingsTest.java b/admin.services/src/test/java/eclipselink/example/mysports/admin/services/test/VerifyModelAndMappingsTest.java
deleted file mode 100644
index 8bed71e..0000000
--- a/admin.services/src/test/java/eclipselink/example/mysports/admin/services/test/VerifyModelAndMappingsTest.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * dclarke - EclipseLink 2.3 - MySports Demo Bug 344608
- ******************************************************************************/
-package eclipselink.example.mysports.admin.services.test;
-
-import javax.persistence.EntityManagerFactory;
-
-import org.eclipse.persistence.descriptors.ClassDescriptor;
-import org.eclipse.persistence.internal.helper.Helper;
-import org.eclipse.persistence.jpa.JpaHelper;
-import org.eclipse.persistence.sessions.server.Server;
-import org.junit.AfterClass;
-import org.junit.Assert;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-import eclipselink.example.mysports.admin.model.Extension;
-import eclipselink.example.mysports.admin.model.HostedLeague;
-import eclipselink.example.mysports.admin.model.Style;
-import eclipselink.example.mysports.admin.services.HostedLeagueRepository;
-
-/**
- * @author dclarke
- * @since EclipseLink 2.3.0
- */
-public class VerifyModelAndMappingsTest {
-
- @Test
- public void verifySession() {
- EntityManagerFactory emf = AdminPersistenceTesting.getEMF(repository);
- Assert.assertNotNull(emf);
-
- Server session = JpaHelper.getServerSession(emf);
- Assert.assertNotNull(session);
- Assert.assertTrue(session.isServerSession());
- }
-
- @Test
- public void verifyLeague() {
- EntityManagerFactory emf = AdminPersistenceTesting.getEMF(repository);
- Server session = JpaHelper.getServerSession(emf);
- ClassDescriptor descriptor = session.getClassDescriptor(HostedLeague.class);
-
- Assert.assertNotNull(descriptor);
- Assert.assertEquals(Helper.getShortClassName(descriptor.getJavaClass()), descriptor.getAlias());
- }
-
- @Test
- public void verifyStyle() {
- EntityManagerFactory emf = AdminPersistenceTesting.getEMF(repository);
- Server session = JpaHelper.getServerSession(emf);
- ClassDescriptor descriptor = session.getClassDescriptor(Style.class);
-
- Assert.assertNotNull(descriptor);
- Assert.assertEquals(Helper.getShortClassName(descriptor.getJavaClass()), descriptor.getAlias());
- }
-
- @Test
- public void verifyExtension() {
- EntityManagerFactory emf = AdminPersistenceTesting.getEMF(repository);
- Server session = JpaHelper.getServerSession(emf);
- ClassDescriptor descriptor = session.getClassDescriptor(Extension.class);
-
- Assert.assertNotNull(descriptor);
- //Assert.assertTrue(descriptor.isAggregateDescriptor());
- }
-
- private static HostedLeagueRepository repository;
-
- @BeforeClass
- public static void createRespository() {
- repository = AdminPersistenceTesting.createTestRepository(true);
- }
-
- @AfterClass
- public static void closeRepository() {
- AdminPersistenceTesting.closeTestingRepository(repository, true);
- }
-
-}
diff --git a/admin.services/src/test/java/eclipselink/example/mysports/admin/services/test/extensions/TestCreateOrmXml.java b/admin.services/src/test/java/eclipselink/example/mysports/admin/services/test/extensions/TestCreateOrmXml.java
deleted file mode 100644
index 7b2af57..0000000
--- a/admin.services/src/test/java/eclipselink/example/mysports/admin/services/test/extensions/TestCreateOrmXml.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * dclarke - EclipseLink 2.3 - MySports Demo Bug 344608
- ******************************************************************************/
-package eclipselink.example.mysports.admin.services.test.extensions;
-
-import javax.persistence.EntityManager;
-import javax.persistence.EntityManagerFactory;
-
-import org.eclipse.persistence.internal.jpa.metadata.xml.XMLEntityMappings;
-import org.eclipse.persistence.internal.jpa.metadata.xml.XMLEntityMappingsWriter;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-import eclipselink.example.mysports.admin.services.HostedLeagueRepository;
-import eclipselink.example.mysports.admin.services.MappingsLoader;
-import eclipselink.example.mysports.admin.services.test.AdminPersistenceTesting;
-
-public class TestCreateOrmXml {
-
- @Test
- public void createEmpty() {
- XMLEntityMappings mappings = new XMLEntityMappings();
- mappings.setVersion("2.3");
-
- XMLEntityMappingsWriter.write(mappings, System.out);
- }
-
- @Test
- public void createFromDB() {
- EntityManagerFactory emf = AdminPersistenceTesting.getEMF(repository);
- EntityManager em = emf.createEntityManager();
-
- try {
- String xml = MappingsLoader.getORMapping(em, "OSL");
- System.out.println(xml);
-
- xml = MappingsLoader.getORMapping(em, "HTHL");
- System.out.println(xml);
- } finally {
- em.close();
- }
- }
-
- private static HostedLeagueRepository repository;
-
- @BeforeClass
- public static void createRespository() {
- repository = AdminPersistenceTesting.createTestRepository(true);
- }
-
- @AfterClass
- public static void closeRepository() {
- AdminPersistenceTesting.closeTestingRepository(repository, false);
- }
-}
diff --git a/admin.services/src/test/java/eclipselink/example/mysports/admin/services/test/league/TestDynamicJAXB.java b/admin.services/src/test/java/eclipselink/example/mysports/admin/services/test/league/TestDynamicJAXB.java
deleted file mode 100644
index d5307d3..0000000
--- a/admin.services/src/test/java/eclipselink/example/mysports/admin/services/test/league/TestDynamicJAXB.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * dclarke - EclipseLink 2.3 - MySports Demo Bug 344608
- ******************************************************************************/
-package eclipselink.example.mysports.admin.services.test.league;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URL;
-import java.util.List;
-
-import javax.xml.bind.JAXBException;
-
-import org.junit.Assert;
-
-import org.eclipse.persistence.dynamic.DynamicEntity;
-import org.eclipse.persistence.jaxb.dynamic.DynamicJAXBContext;
-import org.eclipse.persistence.jaxb.dynamic.DynamicJAXBContextFactory;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import eclipselink.example.mysports.admin.services.test.services.ServerTests;
-
-/**
- *
- * @author dclarke
- * @since EclipseLink 2.3.0
- */
-@Category(ServerTests.class)
-public class TestDynamicJAXB {
-
- @Test
- public void verifyContext() throws Exception {
- DynamicJAXBContext jaxbContext = createContext();
-
- Assert.assertNotNull(jaxbContext);
- }
-
- @Test
- public void verifyReadFromAdminServer() throws Exception {
- DynamicJAXBContext jaxbContext = createContext();
- URL url = new URL("http://localhost:8080/MySportsAdmin/rest/leagues");
-
- DynamicEntity allLeagues = (DynamicEntity) jaxbContext.createUnmarshaller().unmarshal(url);
-
- Assert.assertNotNull(allLeagues);
- List<DynamicEntity> leagues = allLeagues.<List<DynamicEntity>>get("league");
- Assert.assertNotNull(leagues);
-
- for (DynamicEntity league: leagues) {
- System.out.println("League(" + league.<String>get("id") + ", " + league.get("value") + ")");
- }
- }
-
- private DynamicJAXBContext createContext() throws IOException, JAXBException {
- URL url = new URL("http://localhost:8080/MySportsAdmin/xsds/leagues.xsd");
- InputStream in = url.openStream();
-
- try {
- return DynamicJAXBContextFactory.createContextFromXSD(in, null, null, null);
- } finally {
- in.close();
- }
-
- }
-}
diff --git a/admin.services/src/test/java/eclipselink/example/mysports/admin/services/test/services/ServerTests.java b/admin.services/src/test/java/eclipselink/example/mysports/admin/services/test/services/ServerTests.java
deleted file mode 100644
index 77ab4b3..0000000
--- a/admin.services/src/test/java/eclipselink/example/mysports/admin/services/test/services/ServerTests.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * dclarke - EclipseLink 2.4 - MySports Demo Bug 344608
- ******************************************************************************/
-package eclipselink.example.mysports.admin.services.test.services;
-
-
-/**
- * JUnit test category for tests that require a server to be run. these are
- * excluded form the default tests.
- *
- * @author dclarke
- * @since EclipseLink 2.4.2
- */
-public interface ServerTests {
-} \ No newline at end of file
diff --git a/admin.services/src/test/java/eclipselink/example/mysports/admin/services/test/services/glassfish/TestBaseJsonRest.java b/admin.services/src/test/java/eclipselink/example/mysports/admin/services/test/services/glassfish/TestBaseJsonRest.java
deleted file mode 100644
index 3bc32f1..0000000
--- a/admin.services/src/test/java/eclipselink/example/mysports/admin/services/test/services/glassfish/TestBaseJsonRest.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * dclarke - EclipseLink 2.4 - MySports Demo Bug 344608
- ******************************************************************************/
-package eclipselink.example.mysports.admin.services.test.services.glassfish;
-
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.net.ConnectException;
-
-import javax.xml.bind.JAXBElement;
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Marshaller;
-import javax.xml.bind.Unmarshaller;
-import javax.xml.namespace.QName;
-import javax.xml.transform.stream.StreamSource;
-
-import org.junit.Assert;
-
-import org.eclipse.persistence.oxm.MediaType;
-
-import com.sun.jersey.api.client.ClientHandlerException;
-
-import eclipselink.example.mysports.admin.services.glassfish.MOXyContextHelper;
-import eclipselink.example.mysports.admin.services.glassfish.RESTOperations;
-import eclipselink.example.mysports.admin.services.glassfish.Result;
-
-/**
- * Base class to simplify file and GlassFish admin REST calls.
- *
- * @author dclarke
- * @since EclipseLink 2.4
- */
-public abstract class TestBaseJsonRest {
-
- protected Unmarshaller createJsonUnmarshaller() throws JAXBException {
- return MOXyContextHelper.createUnmarshaller(MediaType.APPLICATION_JSON);
- }
-
- protected Marshaller createJsonMarshaller() throws JAXBException {
- return MOXyContextHelper.createMarshaller(MediaType.APPLICATION_JSON);
- }
-
- protected StreamSource openSource(String fileName) throws FileNotFoundException {
- String filePath = "src/" + getClass().getPackage().getName().replace(".", "/") + "/" + fileName;
- return new StreamSource(new FileInputStream(filePath));
- }
-
- protected <T> T getResultFromServer(String server, String resourceURL, Class<T> resultClass) throws JAXBException {
- RESTOperations ops = new RESTOperations(server);
-
- try {
- return ops.get(resourceURL, MediaType.APPLICATION_JSON, resultClass);
- } catch (ClientHandlerException e) {
- if (e.getCause() instanceof ConnectException) {
- Assert.fail("GlassFish server on localhost not running");
- }
- throw e;
- }
- }
-
- protected Result getResultFromServer(String server, String resourceURL) throws JAXBException {
- return getResultFromServer(server, resourceURL, Result.class);
- }
-
- @SuppressWarnings({ "unchecked", "rawtypes" })
- protected void printAsJson(Result result) throws JAXBException {
- Marshaller marshaller = createJsonMarshaller();
- marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
- JAXBElement<?> element = new JAXBElement(new QName(""), result.getClass(), result);
- marshaller.marshal(element, System.out);
- }
-} \ No newline at end of file
diff --git a/admin.services/src/test/java/eclipselink/example/mysports/admin/services/test/services/glassfish/TestMOXyContext.java b/admin.services/src/test/java/eclipselink/example/mysports/admin/services/test/services/glassfish/TestMOXyContext.java
deleted file mode 100644
index 8dc233d..0000000
--- a/admin.services/src/test/java/eclipselink/example/mysports/admin/services/test/services/glassfish/TestMOXyContext.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * dclarke - EclipseLink 2.4 - MySports Demo Bug 344608
- ******************************************************************************/
-package eclipselink.example.mysports.admin.services.test.services.glassfish;
-
-import java.io.StringReader;
-import java.io.StringWriter;
-
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBElement;
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Marshaller;
-import javax.xml.bind.Unmarshaller;
-import javax.xml.transform.stream.StreamSource;
-
-import org.junit.Assert;
-
-import org.eclipse.persistence.oxm.MediaType;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import eclipselink.example.mysports.admin.services.glassfish.JDBCResource;
-import eclipselink.example.mysports.admin.services.glassfish.MOXyContextHelper;
-import eclipselink.example.mysports.admin.services.test.services.ServerTests;
-
-/**
- * @author dclarke
- * @since EclipseLink 2.4
- */
-@Category(ServerTests.class)
-public class TestMOXyContext {
-
- @Test
- public void createContext() throws JAXBException {
- JAXBContext context = MOXyContextHelper.createContext();
-
- Assert.assertNotNull(context);
- Assert.assertTrue(context instanceof org.eclipse.persistence.jaxb.JAXBContext);
- }
-
- // @Test
- public void marshalJDBCResourceAsJSON() throws JAXBException {
- JDBCResource resource = new JDBCResource();
- resource.setJndiName("jdbc/MySportsX");
- resource.setPoolName("mysports");
-
- Marshaller marshaller = MOXyContextHelper.createMarshaller(MediaType.APPLICATION_JSON);
-
- StringWriter writer = new StringWriter();
- marshaller.marshal(resource, writer);
-
- Assert.assertEquals("{\"id\":\"jdbc/MySportsX\",\"poolName\":\"mysports\"}", writer.toString());
- }
-
- // @Test
- public void unmarshalJDBCResourceAsJSON() throws JAXBException {
- Unmarshaller unmarshaller = MOXyContextHelper.createUnmarshaller(MediaType.APPLICATION_JSON);
- unmarshaller.setProperty("eclipselink.json.include-root", false);
-
- JAXBElement<JDBCResource> resourceElement = unmarshaller.unmarshal(new StreamSource(new StringReader("{\"id\":\"jdbc/MySportsX\",\"poolName\":\"mysports\"}}")), JDBCResource.class);
- JDBCResource resource = resourceElement.getValue();
-
- Assert.assertNotNull(resource);
- Assert.assertEquals("jdbc/MySportsX", resource.getJndiName());
- Assert.assertEquals("mysports", resource.getPoolName());
- }
-}
diff --git a/admin.services/src/test/java/eclipselink/example/mysports/admin/services/test/services/glassfish/TestParseJDBCConnectPool_mysports.java b/admin.services/src/test/java/eclipselink/example/mysports/admin/services/test/services/glassfish/TestParseJDBCConnectPool_mysports.java
deleted file mode 100644
index 6da4be0..0000000
--- a/admin.services/src/test/java/eclipselink/example/mysports/admin/services/test/services/glassfish/TestParseJDBCConnectPool_mysports.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * dclarke - EclipseLink 2.4 - MySports Demo Bug 344608
- ******************************************************************************/
-package eclipselink.example.mysports.admin.services.test.services.glassfish;
-
-import javax.xml.bind.Marshaller;
-import javax.xml.bind.Unmarshaller;
-
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import eclipselink.example.mysports.admin.services.glassfish.Message;
-import eclipselink.example.mysports.admin.services.test.services.ServerTests;
-
-@Category(ServerTests.class)
-public class TestParseJDBCConnectPool_mysports extends TestBaseJsonRest{
-
- @Test
- public void parse() throws Exception {
- Unmarshaller unmarshaller = createJsonUnmarshaller();
- Marshaller marshaller = createJsonMarshaller();
- marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
-
- Message message = unmarshaller.unmarshal(openSource("jdbc-connection-pool_mysports.json"), Message.class).getValue();
-
-
- marshaller.marshal(message, System.out);
- }
-
-} \ No newline at end of file
diff --git a/admin.services/src/test/java/eclipselink/example/mysports/admin/services/test/services/glassfish/TestParseJDBCConnectPool_mysports_property.java b/admin.services/src/test/java/eclipselink/example/mysports/admin/services/test/services/glassfish/TestParseJDBCConnectPool_mysports_property.java
deleted file mode 100644
index b58bfc0..0000000
--- a/admin.services/src/test/java/eclipselink/example/mysports/admin/services/test/services/glassfish/TestParseJDBCConnectPool_mysports_property.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * dclarke - EclipseLink 2.4 - MySports Demo Bug 344608
- ******************************************************************************/
-package eclipselink.example.mysports.admin.services.test.services.glassfish;
-
-import javax.xml.bind.Marshaller;
-import javax.xml.bind.Unmarshaller;
-
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import eclipselink.example.mysports.admin.services.glassfish.Result;
-import eclipselink.example.mysports.admin.services.test.services.ServerTests;
-
-@Category(ServerTests.class)
-public class TestParseJDBCConnectPool_mysports_property extends TestBaseJsonRest {
-
- @Test
- public void parseJSON() throws Exception {
- Unmarshaller unmarshaller = createJsonUnmarshaller();
- Marshaller marshaller = createJsonMarshaller();
- marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
-
- Result result = unmarshaller.unmarshal(openSource("jdbc-connection-pool_mysports_property.json"), Result.class).getValue();
-
- marshaller.marshal(result, System.out);
-
- }
-
-} \ No newline at end of file
diff --git a/admin.services/src/test/java/eclipselink/example/mysports/admin/services/test/services/glassfish/TestParseJDBCResources.java b/admin.services/src/test/java/eclipselink/example/mysports/admin/services/test/services/glassfish/TestParseJDBCResources.java
deleted file mode 100644
index 32a9e0d..0000000
--- a/admin.services/src/test/java/eclipselink/example/mysports/admin/services/test/services/glassfish/TestParseJDBCResources.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * dclarke - EclipseLink 2.4 - MySports Demo Bug 344608
- ******************************************************************************/
-package eclipselink.example.mysports.admin.services.test.services.glassfish;
-
-import javax.xml.bind.JAXBElement;
-import javax.xml.bind.Marshaller;
-import javax.xml.bind.Unmarshaller;
-import javax.xml.namespace.QName;
-
-import org.junit.Assert;
-
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import eclipselink.example.mysports.admin.services.glassfish.JDBCResource;
-import eclipselink.example.mysports.admin.services.test.services.ServerTests;
-
-@Category(ServerTests.class)
-public class TestParseJDBCResources extends TestBaseJsonRest {
-
- @Test
- public void parseFromFile() throws Exception {
- Unmarshaller unmarshaller = createJsonUnmarshaller();
- Marshaller marshaller = createJsonMarshaller();
- marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
-
- JDBCResource resource = unmarshaller.unmarshal(openSource("jdbc-resource.json"), JDBCResource.class).getValue();
-
- Assert.assertNotNull(resource);
-
- JAXBElement<JDBCResource> element = new JAXBElement<JDBCResource>(new QName(""), JDBCResource.class, resource);
- marshaller.marshal(element, System.out);
- }
-
- @Test
- public void getJDBCResourceFromServer() throws Exception {
- JDBCResource result = getResultFromServer("localhost", JDBCResource.RESOURCE_URI + "jdbc%2FMySports", JDBCResource.class);
-
- Assert.assertNotNull(result);
-
- System.out.println("RESULT:\n" + result);
-
- printAsJson(result);
- }
-
- @Test
- public void getJDBCResourceFromServer2() throws Exception {
- JDBCResource result = getResultFromServer("localhost", JDBCResource.RESOURCE_URI + "jdbc%2FMySports", JDBCResource.class);
-
- Assert.assertNotNull(result);
-
- System.out.println("RESULT:\n" + result);
-
- printAsJson(result);
- }
-} \ No newline at end of file
diff --git a/admin.services/src/test/java/eclipselink/example/mysports/admin/services/test/services/glassfish/TestParseListJDBCConnectionPools.java b/admin.services/src/test/java/eclipselink/example/mysports/admin/services/test/services/glassfish/TestParseListJDBCConnectionPools.java
deleted file mode 100644
index ff80960..0000000
--- a/admin.services/src/test/java/eclipselink/example/mysports/admin/services/test/services/glassfish/TestParseListJDBCConnectionPools.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * dclarke - EclipseLink 2.4 - MySports Demo Bug 344608
- ******************************************************************************/
-package eclipselink.example.mysports.admin.services.test.services.glassfish;
-
-import javax.xml.bind.Marshaller;
-import javax.xml.bind.Unmarshaller;
-
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import eclipselink.example.mysports.admin.services.glassfish.Message;
-import eclipselink.example.mysports.admin.services.glassfish.Result;
-import eclipselink.example.mysports.admin.services.test.services.ServerTests;
-
-@Category(ServerTests.class)
-public class TestParseListJDBCConnectionPools extends TestBaseJsonRest {
-
- @Test
- public void parse() throws Exception {
- Unmarshaller unmarshaller = createJsonUnmarshaller();
- Marshaller marshaller = createJsonMarshaller();
- marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
-
- Message message = unmarshaller.unmarshal(openSource("list-jdbc-connection-pools.json"), Message.class).getValue();
-
- marshaller.marshal(message, System.out);
- }
-
- @Test
- public void getJDBCResourceFromServer() throws Exception {
- Result result = getResultFromServer("localhost", "/domain/resources/list-jdbc-connection-pools");
-
- System.out.println("RESULT:\n" + result);
-
- for (String name : result.getChildrenMessages()) {
- System.out.println("JDBC Connection Pool: \"" + name + "\"");
- }
- }
-
-} \ No newline at end of file
diff --git a/admin.services/src/test/java/eclipselink/example/mysports/admin/services/test/services/glassfish/TestParseListJDBCResources.java b/admin.services/src/test/java/eclipselink/example/mysports/admin/services/test/services/glassfish/TestParseListJDBCResources.java
deleted file mode 100644
index 0eab303..0000000
--- a/admin.services/src/test/java/eclipselink/example/mysports/admin/services/test/services/glassfish/TestParseListJDBCResources.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * dclarke - EclipseLink 2.4 - MySports Demo Bug 344608
- ******************************************************************************/
-package eclipselink.example.mysports.admin.services.test.services.glassfish;
-
-import java.net.ConnectException;
-
-import javax.xml.bind.Marshaller;
-import javax.xml.bind.Unmarshaller;
-
-import org.junit.Assert;
-
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import com.sun.jersey.api.client.ClientHandlerException;
-
-import eclipselink.example.mysports.admin.services.glassfish.JDBCResource;
-import eclipselink.example.mysports.admin.services.glassfish.RESTOperations;
-import eclipselink.example.mysports.admin.services.glassfish.Result;
-import eclipselink.example.mysports.admin.services.test.services.ServerTests;
-
-@Category(ServerTests.class)
-public class TestParseListJDBCResources extends TestBaseJsonRest {
-
- @Test
- public void unmarshalMarshal() throws Exception {
- Unmarshaller unmarshaller = createJsonUnmarshaller();
- Marshaller marshaller = createJsonMarshaller();
- marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
-
- Result resources = unmarshaller.unmarshal(openSource("list-jdbc-resources.json"), Result.class).getValue();
-
- Assert.assertNotNull(resources);
- marshaller.marshal(resources, System.out);
- }
-
- @Test
- public void getJDBCResourceNames() throws Exception {
- Unmarshaller unmarshaller = createJsonUnmarshaller();
- Marshaller marshaller = createJsonMarshaller();
- marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
-
- Result resources = unmarshaller.unmarshal(openSource("list-jdbc-resources.json"), Result.class).getValue();
-
- Assert.assertNotNull(resources);
-
- String[] names = resources.getChildrenMessages();
-
- Assert.assertNotNull(names);
- Assert.assertEquals(3, names.length);
-
- for (String name : names) {
- System.out.println("JDBC Resource: \"" + name + "\"");
- }
- }
-
- @Test
- public void getJDBCResourceListFromServer() throws Exception {
- Result result = getResultFromServer("localhost", JDBCResource.LIST_URI);
-
- Assert.assertNotNull(result);
-
- System.out.println("RESULT:\n" + result);
- for (String name : result.getChildrenMessages()) {
- System.out.println("JDBC Resource: \"" + name + "\"");
- }
- }
-
- @Test
- public void getJDBCResourceNamesFromServer() throws Exception {
- RESTOperations ops = new RESTOperations("localhost");
- String[] names = null;
-
- try {
- names = JDBCResource.getJDBCResourceNames(ops);
- } catch (ClientHandlerException e) {
- if (e.getCause() instanceof ConnectException) {
- Assert.fail("GlassFish server on localhost not running");
- }
- throw e;
- }
-
- Assert.assertNotNull(names);
- Assert.assertTrue(names.length > 0);
-
- for (String name : names) {
- System.out.println("JDBC Resource: \"" + name + "\"");
- }
- }
-} \ No newline at end of file
diff --git a/admin.services/src/test/resource/eclipselink-example-mysports.properties b/admin.services/src/test/resource/eclipselink-example-mysports.properties
deleted file mode 100644
index e3c5237..0000000
--- a/admin.services/src/test/resource/eclipselink-example-mysports.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-javax.persistence.jdbc.url=jdbc:derby:target/derby/mysports;create=true
-javax.persistence.jdbc.user=app
-javax.persistence.jdbc.password=app
-javax.persistence.jdbc.driver=org.apache.derby.jdbc.EmbeddedDriver
-
-# Ensure that the data source info in persistence.xml is replaced
-javax.persistence.jtaDataSource=
-javax.persistence.nonJtaDataSource=
-javax.persistence.transactionType=RESOURCE_LOCAL
-
-eclipselink.logging.level=FINE
-eclipselink.logging.connection=false
-eclipselink.logging.timestamp=false
-eclipselink.logging.thread=false
-eclipselink.logging.session=false
-eclipselink.logging.exceptions=false
-eclipselink.logging.level.sql=FINE
-eclipselink.logging.level.metadata=WARNING
-eclipselink.logging.parameters=true \ No newline at end of file
diff --git a/admin.services/src/test/resource/eclipselink/example/mysports/admin/services/test/services/glassfish/eclipselink-example-mysports.properties b/admin.services/src/test/resource/eclipselink/example/mysports/admin/services/test/services/glassfish/eclipselink-example-mysports.properties
deleted file mode 100644
index 07f4600..0000000
--- a/admin.services/src/test/resource/eclipselink/example/mysports/admin/services/test/services/glassfish/eclipselink-example-mysports.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-javax.persistence.jdbc.url=jdbc:derby:testmysports;create=true
-javax.persistence.jdbc.user=app
-javax.persistence.jdbc.password=app
-javax.persistence.jdbc.driver=org.apache.derby.jdbc.EmbeddedDriver
-
-# Ensure that the data source info in persistence.xml is replaced
-javax.persistence.jtaDataSource=
-javax.persistence.nonJtaDataSource=
-javax.persistence.transactionType=RESOURCE_LOCAL
-
-eclipselink.logging.level=FINE
-eclipselink.logging.connection=false
-eclipselink.logging.timestamp=false
-eclipselink.logging.thread=false
-eclipselink.logging.session=false
-eclipselink.logging.exceptions=false
-eclipselink.logging.level.sql=FINE
-eclipselink.logging.level.metadata=WARNING
-eclipselink.logging.parameters=true \ No newline at end of file
diff --git a/admin.services/src/test/resource/eclipselink/example/mysports/admin/services/test/services/glassfish/jdbc-connection-pool_mysports.json b/admin.services/src/test/resource/eclipselink/example/mysports/admin/services/test/services/glassfish/jdbc-connection-pool_mysports.json
deleted file mode 100644
index 0f9f933..0000000
--- a/admin.services/src/test/resource/eclipselink/example/mysports/admin/services/test/services/glassfish/jdbc-connection-pool_mysports.json
+++ /dev/null
@@ -1,304 +0,0 @@
-{
- "message": "",
- "command": "jdbc-connection-pool",
- "exit_code": "SUCCESS",
- "extraProperties": {
- "commands": [],
- "methods": [
- {
- "name": "GET"
- },
- {},
- {
- "name": "POST",
- "messageParameters": {
- "allowNonComponentCallers": {
- "optional": "true",
- "type": "boolean",
- "defaultValue": "false",
- "key": "false"
- },
- "associateWithThread": {
- "optional": "true",
- "type": "boolean",
- "defaultValue": "false",
- "key": "false"
- },
- "connectionCreationRetryAttempts": {
- "optional": "true",
- "type": "string",
- "defaultValue": "0",
- "key": "false"
- },
- "connectionCreationRetryIntervalInSeconds": {
- "optional": "true",
- "type": "string",
- "defaultValue": "10",
- "key": "false"
- },
- "connectionLeakReclaim": {
- "optional": "true",
- "type": "boolean",
- "defaultValue": "false",
- "key": "false"
- },
- "connectionLeakTimeoutInSeconds": {
- "optional": "true",
- "type": "string",
- "defaultValue": "0",
- "key": "false"
- },
- "connectionValidationMethod": {
- "optional": "true",
- "type": "string",
- "defaultValue": "table",
- "key": "false"
- },
- "datasourceClassname": {
- "optional": "true",
- "type": "string",
- "key": "false"
- },
- "description": {
- "optional": "true",
- "type": "string",
- "key": "false"
- },
- "driverClassname": {
- "optional": "true",
- "type": "string",
- "key": "false"
- },
- "failAllConnections": {
- "optional": "true",
- "type": "boolean",
- "defaultValue": "false",
- "key": "false"
- },
- "idleTimeoutInSeconds": {
- "optional": "true",
- "type": "string",
- "defaultValue": "300",
- "key": "false"
- },
- "initSql": {
- "optional": "true",
- "type": "string",
- "key": "false"
- },
- "isConnectionValidationRequired": {
- "optional": "true",
- "type": "boolean",
- "defaultValue": "false",
- "key": "false"
- },
- "isIsolationLevelGuaranteed": {
- "optional": "true",
- "type": "boolean",
- "defaultValue": "true",
- "key": "false"
- },
- "lazyConnectionAssociation": {
- "optional": "true",
- "type": "boolean",
- "defaultValue": "false",
- "key": "false"
- },
- "lazyConnectionEnlistment": {
- "optional": "true",
- "type": "boolean",
- "defaultValue": "false",
- "key": "false"
- },
- "matchConnections": {
- "optional": "true",
- "type": "boolean",
- "defaultValue": "false",
- "key": "false"
- },
- "maxConnectionUsageCount": {
- "optional": "true",
- "type": "string",
- "defaultValue": "0",
- "key": "false"
- },
- "maxPoolSize": {
- "optional": "true",
- "type": "string",
- "defaultValue": "32",
- "key": "false"
- },
- "maxWaitTimeInMillis": {
- "optional": "true",
- "type": "string",
- "defaultValue": "60000",
- "key": "false"
- },
- "name": {
- "optional": "true",
- "type": "string",
- "key": "true"
- },
- "nonTransactionalConnections": {
- "optional": "true",
- "type": "boolean",
- "defaultValue": "false",
- "key": "false"
- },
- "objectType": {
- "optional": "true",
- "type": "string",
- "defaultValue": "user",
- "key": "false"
- },
- "ping": {
- "optional": "true",
- "type": "boolean",
- "defaultValue": "false",
- "key": "false"
- },
- "poolResizeQuantity": {
- "optional": "true",
- "type": "string",
- "defaultValue": "2",
- "key": "false"
- },
- "pooling": {
- "optional": "true",
- "type": "boolean",
- "defaultValue": "true",
- "key": "false"
- },
- "resType": {
- "optional": "true",
- "type": "string",
- "key": "false"
- },
- "sqlTraceListeners": {
- "optional": "true",
- "type": "string",
- "key": "false"
- },
- "statementCacheSize": {
- "optional": "true",
- "type": "string",
- "defaultValue": "0",
- "key": "false"
- },
- "statementLeakReclaim": {
- "optional": "true",
- "type": "boolean",
- "defaultValue": "false",
- "key": "false"
- },
- "statementLeakTimeoutInSeconds": {
- "optional": "true",
- "type": "string",
- "defaultValue": "0",
- "key": "false"
- },
- "statementTimeoutInSeconds": {
- "optional": "true",
- "type": "int",
- "defaultValue": "-1",
- "key": "false"
- },
- "steadyPoolSize": {
- "optional": "true",
- "type": "string",
- "defaultValue": "8",
- "key": "false"
- },
- "transactionIsolationLevel": {
- "optional": "true",
- "type": "string",
- "key": "false"
- },
- "validateAtmostOncePeriodInSeconds": {
- "optional": "true",
- "type": "string",
- "defaultValue": "0",
- "key": "false"
- },
- "validationClassname": {
- "optional": "true",
- "type": "string",
- "key": "false"
- },
- "validationTableName": {
- "optional": "true",
- "type": "string",
- "key": "false"
- },
- "wrapJdbcObjects": {
- "optional": "true",
- "type": "boolean",
- "defaultValue": "true",
- "key": "false"
- }
- }
- },
- {
- "name": "DELETE",
- "messageParameters": {
- "cascade": {
- "acceptableValues": "",
- "optional": "true",
- "type": "boolean",
- "defaultValue": "false"
- },
- "target": {
- "acceptableValues": "",
- "optional": "true",
- "type": "string",
- "defaultValue": ""
- }
- }
- }
- ],
- "entity": {
- "allowNonComponentCallers": "false",
- "associateWithThread": "false",
- "connectionCreationRetryAttempts": "0",
- "connectionCreationRetryIntervalInSeconds": "10",
- "connectionLeakReclaim": "false",
- "connectionLeakTimeoutInSeconds": "0",
- "connectionValidationMethod": "table",
- "datasourceClassname": "com.mysql.jdbc.jdbc2.optional.MysqlDataSource",
- "description": "",
- "driverClassname": "",
- "failAllConnections": "false",
- "idleTimeoutInSeconds": "300",
- "initSql": null,
- "isConnectionValidationRequired": "false",
- "isIsolationLevelGuaranteed": "true",
- "lazyConnectionAssociation": "false",
- "lazyConnectionEnlistment": "false",
- "matchConnections": "false",
- "maxConnectionUsageCount": "0",
- "maxPoolSize": "32",
- "maxWaitTimeInMillis": "60000",
- "name": "mysports",
- "nonTransactionalConnections": "false",
- "objectType": "user",
- "ping": "false",
- "poolResizeQuantity": "2",
- "pooling": "true",
- "resType": "javax.sql.DataSource",
- "sqlTraceListeners": null,
- "statementCacheSize": "0",
- "statementLeakReclaim": "false",
- "statementLeakTimeoutInSeconds": "0",
- "statementTimeoutInSeconds": "-1",
- "steadyPoolSize": "8",
- "transactionIsolationLevel": null,
- "validateAtmostOncePeriodInSeconds": "0",
- "validationClassname": null,
- "validationTableName": null,
- "wrapJdbcObjects": "true"
- },
- "childResources": {
- "property": "http://localhost:4848/management/domain/resources/jdbc-connection-pool/mysports/property"
- }
- }
-} \ No newline at end of file
diff --git a/admin.services/src/test/resource/eclipselink/example/mysports/admin/services/test/services/glassfish/jdbc-connection-pool_mysports_property.json b/admin.services/src/test/resource/eclipselink/example/mysports/admin/services/test/services/glassfish/jdbc-connection-pool_mysports_property.json
deleted file mode 100644
index 1147a5a..0000000
--- a/admin.services/src/test/resource/eclipselink/example/mysports/admin/services/test/services/glassfish/jdbc-connection-pool_mysports_property.json
+++ /dev/null
@@ -1,29 +0,0 @@
-{
- "message": "",
- "command": "property",
- "exit_code": "SUCCESS",
- "extraProperties": {
- "properties": [
- {
- "name": "User",
- "value": "root"
- },
- {
- "name": "ServerName",
- "value": "localhost"
- },
- {
- "name": "Port",
- "value": "3306"
- },
- {
- "name": "DatabaseName",
- "value": "mysports"
- },
- {
- "name": "Password",
- "value": "password"
- }
- ]
- }
-} \ No newline at end of file
diff --git a/admin.services/src/test/resource/eclipselink/example/mysports/admin/services/test/services/glassfish/jdbc-resource.json b/admin.services/src/test/resource/eclipselink/example/mysports/admin/services/test/services/glassfish/jdbc-resource.json
deleted file mode 100644
index 6b792e3..0000000
--- a/admin.services/src/test/resource/eclipselink/example/mysports/admin/services/test/services/glassfish/jdbc-resource.json
+++ /dev/null
@@ -1,71 +0,0 @@
-{
- "message":"",
- "command":"jdbc-resource",
- "exit_code":"SUCCESS",
- "extraProperties":{
- "commands":[
-
- ],
- "methods":[
- {
- "name":"GET"
- },
- {
-
- },
- {
- "name":"POST",
- "messageParameters":{
- "description":{
- "optional":"true",
- "type":"string",
- "key":"false"
- },
- "enabled":{
- "optional":"true",
- "type":"boolean",
- "defaultValue":"true",
- "key":"false"
- },
- "jndiName":{
- "optional":"true",
- "type":"string",
- "key":"true"
- },
- "objectType":{
- "optional":"true",
- "type":"string",
- "defaultValue":"user",
- "key":"false"
- },
- "poolName":{
- "optional":"true",
- "type":"string",
- "key":"false"
- }
- }
- },
- {
- "name":"DELETE",
- "messageParameters":{
- "target":{
- "acceptableValues":"",
- "optional":"true",
- "type":"string",
- "defaultValue":""
- }
- }
- }
- ],
- "entity":{
- "description":"",
- "enabled":"true",
- "jndiName":"jdbc\/MySports",
- "objectType":"user",
- "poolName":"mysports"
- },
- "childResources":{
- "property":"http:\/\/localhost:4848\/management\/domain\/resources\/jdbc-resource\/jdb c%2FMySports\/property"
- }
- }
-} \ No newline at end of file
diff --git a/admin.services/src/test/resource/eclipselink/example/mysports/admin/services/test/services/glassfish/list-jdbc-connection-pools.json b/admin.services/src/test/resource/eclipselink/example/mysports/admin/services/test/services/glassfish/list-jdbc-connection-pools.json
deleted file mode 100644
index 3836efc..0000000
--- a/admin.services/src/test/resource/eclipselink/example/mysports/admin/services/test/services/glassfish/list-jdbc-connection-pools.json
+++ /dev/null
@@ -1,36 +0,0 @@
-{
- "message": "",
- "command": "list-jdbc-connection-pools AdminCommand",
- "exit_code": "SUCCESS",
- "extraProperties": {
- "methods": [
- {
- "name": "GET"
- },
- {
- "messageParameters": {
- "targetName": {
- "acceptableValues": "",
- "optional": "true",
- "type": "string",
- "defaultValue": "server"
- }
- }
- }
- ]
- },
- "children": [
- {
- "message": "__TimerPool",
- "properties": {}
- },
- {
- "message": "DerbyPool",
- "properties": {}
- },
- {
- "message": "mysports",
- "properties": {}
- }
- ]
-} \ No newline at end of file
diff --git a/admin.services/src/test/resource/eclipselink/example/mysports/admin/services/test/services/glassfish/list-jdbc-resources.json b/admin.services/src/test/resource/eclipselink/example/mysports/admin/services/test/services/glassfish/list-jdbc-resources.json
deleted file mode 100644
index 49e87bd..0000000
--- a/admin.services/src/test/resource/eclipselink/example/mysports/admin/services/test/services/glassfish/list-jdbc-resources.json
+++ /dev/null
@@ -1,36 +0,0 @@
-{
- "message": "",
- "command": "list-jdbc-resources AdminCommand",
- "exit_code": "SUCCESS",
- "extraProperties": {
- "methods": [
- {
- "name": "GET"
- },
- {
- "messageParameters": {
- "targetName": {
- "acceptableValues": "",
- "optional": "true",
- "type": "string",
- "defaultValue": "server"
- }
- }
- }
- ]
- },
- "children": [
- {
- "message": "jdbc/__TimerPool",
- "properties": {}
- },
- {
- "message": "jdbc/__default",
- "properties": {}
- },
- {
- "message": "jdbc/MySports",
- "properties": {}
- }
- ]
-} \ No newline at end of file
diff --git a/admin.services/src/test/resource/eclipselink/example/mysports/admin/services/test/style/black.css b/admin.services/src/test/resource/eclipselink/example/mysports/admin/services/test/style/black.css
deleted file mode 100644
index d646aa3..0000000
--- a/admin.services/src/test/resource/eclipselink/example/mysports/admin/services/test/style/black.css
+++ /dev/null
@@ -1,209 +0,0 @@
-#*******************************************************************************
-# * Copyright (c) 2010 Oracle. All rights reserved.
-# * This program and the accompanying materials are made available under the
-# * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
-# * which accompanies this distribution.
-# * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
-# * and the Eclipse Distribution License is available at
-# * http://www.eclipse.org/org/documents/edl-v10.php.
-# *
-# * Contributors:
-# * dclarke - MySports Example for EclipseLink 2.3
-# ******************************************************************************/
-BODY, P, LI, UL, OL {
- font-family: Arial, Helvetica, sans-serif;
- font-size: 50%;
- color:#000000;
- list-style-position: outside;
-}
-
-A:link {
- font-family: Arial, Helvetica, sans-serif;
- color:#663300;
-}
-
-A:active {
- font-family: Arial, Helvetica, sans-serif;
- color:#ff6600;
-
-}
-
-A:visited {
- font-family: Arial, Helvetica, sans-serif;
- color:#996633;
-
-}
-
-A.navigation:link
-{
- font-family: Arial, Helvetica, sans-serif;
- font-size:65%;
- color:#996633;
-}
-
-A.navigation:active
-{
- font-family: Arial, Helvetica, sans-serif;
- font-size:65%;
- color:#996633;
-}
-
-A.navigation:visited
-{
- font-family: Arial, Helvetica, sans-serif;
- font-size:65%;
- color:#996633;
-}
-
-.clear { /* generic container (i.e. div) for floating buttons */
- overflow: hidden;
- width: 100%;
-}
-
-c.button {
- background: transparent url('../images/bg_button_a.gif') no-repeat scroll top right;
- color: #444;
- display: block;
- float: left;
- font: normal 12px arial, sans-serif;
- height: 24px;
- margin-right: 6px;
- padding-right: 18px; /* sliding doors padding */
- text-decoration: none;
-}
-
-a.button span {
- background: transparent url('../images/bg_button_span.gif') no-repeat;
- display: block;
- line-height: 14px;
- padding: 5px 0 5px 18px;
-}
-
-a.button:active {
- background-position: bottom right;
- color: #000;
- outline: none; /* hide dotted outline in Firefox */
-}
-
-a.button:active span {
- background-position: bottom left;
- padding: 6px 0 4px 18px; /* push text down 1px */
-}
-p.listpara
-{text-indent: 15%}
-
-H1 {
- font-family: Arial, Helvetica, sans-serif;
- font-size:200%;
- color: red;
- width : 100%;
- border-width : 0px 0px 2px 0px;
- margin-left: 20px;
-}
-
-H2 {
- font-family: Arial, Helvetica, sans-serif;
- font-size:130%;
- font-style: italic;
- color: white;
- width : 100%;
- margin-left: 20px;
-}
-
-H3 {
- font-family: Arial, Helvetica, sans-serif;
- font-size:110%;
- color: red;
- border : solid #CCCC99;
- width : 100%;
- border-width : 0px 0px 2px 0px;
-}
-
-H4 {
- font-family: Arial, Helvetica, sans-serif;
- font-size:92%;
- color:#000000;
- font-weight: bold;
- width : 100%;
-}
-
-.code_no_color {
- color : #000000;
- font-family : "Courier New", "Courier", "monospace";
-}
-
-code {
- color : #336699;
- font-family : "Courier New", "Courier", "monospace";
-}
-
-P.indent {
- text-indent: 9%;
-}
-
-table.borders {
- border : 1% solid #BDB76B;
-}
-
-TR {
- text-align : left;
- vertical-align : top;
-}
-
-TH {
- font-family: Arial, Helvetica, sans-serif;
- font-size: 11pt;
- color:#000000;
- font-weight: bold;
-}
-
-TD {
- font-family: Arial, Helvetica, sans-serif;
- font-size: 11pt;
- color:#000000;
-}
-
-.smalltext {
- font-size:80%;
-}
-
-p.note {
- display: block;
- font-family: Arial, Helvetica, Geneva, sans-serif;
- font-size: 95%;
-}
-
-p.warning {
- display: block;
- font-family: Arial, Helvetica, Geneva, sans-serif;
- font-size: 95%;
-}
-
-pre {
- font-family: "Courier New", Courier, mono;
- font-size: 92%;
- text-indent : 15%;
-}
-
-table.pretty {
- background: whitesmoke;
- border-collapse: collapse;
-}
-table.pretty th, table.pretty td {
- border: 1px silver solid;
- padding: 0.2em;
- font-size: 10pt;
-}
-table.pretty th {
- background: black;
- text-align: left;
- color: white;
-}
-table.pretty caption {
- margin-left: inherit;
- margin-right: inherit;
-}
-
-table.accent {
- background: black;
-}
diff --git a/admin.services/src/test/resource/eclipselink/example/mysports/admin/services/test/style/blue.css b/admin.services/src/test/resource/eclipselink/example/mysports/admin/services/test/style/blue.css
deleted file mode 100644
index 7f228a4..0000000
--- a/admin.services/src/test/resource/eclipselink/example/mysports/admin/services/test/style/blue.css
+++ /dev/null
@@ -1,212 +0,0 @@
-#*******************************************************************************
-# * Copyright (c) 2010 Oracle. All rights reserved.
-# * This program and the accompanying materials are made available under the
-# * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
-# * which accompanies this distribution.
-# * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
-# * and the Eclipse Distribution License is available at
-# * http://www.eclipse.org/org/documents/edl-v10.php.
-# *
-# * Contributors:
-# * dclarke - MySports Example for EclipseLink 2.3
-# ******************************************************************************/
-BODY, P, LI, UL, OL {
- font-family: Arial, Helvetica, sans-serif;
- font-size: 50%;
- color:#000000;
- list-style-position: outside;
-}
-
-A:link {
- font-family: Arial, Helvetica, sans-serif;
- color:#663300;
-
-}
-
-A:active {
- font-family: Arial, Helvetica, sans-serif;
- color:#ff6600;
-
-}
-
-A:visited {
- font-family: Arial, Helvetica, sans-serif;
- color:#996633;
-
-}
-
-A.navigation:link
-{
- font-family: Arial, Helvetica, sans-serif;
- font-size:65%;
- color:#996633;
-}
-
-A.navigation:active
-{
- font-family: Arial, Helvetica, sans-serif;
- font-size:65%;
- color:#996633;
-}
-
-A.navigation:visited
-{
- font-family: Arial, Helvetica, sans-serif;
- font-size:65%;
- color:#996633;
-}
-
-.clear { /* generic container (i.e. div) for floating buttons */
- overflow: hidden;
- width: 100%;
-}
-
-c.button {
- background: transparent url('../images/bg_button_a.gif') no-repeat scroll top right;
- color: #444;
- display: block;
- float: left;
- font: normal 12px arial, sans-serif;
- height: 24px;
- margin-right: 6px;
- padding-right: 18px; /* sliding doors padding */
- text-decoration: none;
-}
-
-a.button span {
- background: transparent url('../images/bg_button_span.gif') no-repeat;
- display: block;
- line-height: 14px;
- padding: 5px 0 5px 18px;
-}
-
-a.button:active {
- background-position: bottom right;
- color: #000;
- outline: none; /* hide dotted outline in Firefox */
-}
-
-a.button:active span {
- background-position: bottom left;
- padding: 6px 0 4px 18px; /* push text down 1px */
-}
-p.listpara
-{text-indent: 15%}
-
-H1 {
- font-family: Arial, Helvetica, sans-serif;
- font-size:170%;
- color:#336699;
- border : solid ##3333CC;
- width : 100%;
- border-width : 0px 0px 2px 0px;
- margin-left: 20px;
-}
-
-H2 {
- font-family: Arial, Helvetica, sans-serif;
- font-size:130%;
- font-style: italic;
- color: white;
- width : 100%;
- margin-left: 20px;
-}
-
-H3 {
- font-family: Arial, Helvetica, sans-serif;
- font-size:110%;
- color:#336699;
- border : solid #CCCC99;
- width : 100%;
- border-width : 0px 0px 2px 0px;
-}
-
-H4 {
- font-family: Arial, Helvetica, sans-serif;
- font-size:92%;
- color:#000000;
- font-weight: bold;
- width : 100%;
-}
-
-.code_no_color {
- color : #000000;
- font-family : "Courier New", "Courier", "monospace";
-}
-
-code {
- color : #336699;
- font-family : "Courier New", "Courier", "monospace";
-}
-
-P.indent {
- text-indent: 9%;
-}
-
-table.borders {
- border : 1% solid #BDB76B;
-}
-
-TR {
- text-align : left;
- vertical-align : top;
-}
-
-TH {
- font-family: Arial, Helvetica, sans-serif;
- font-size: 11pt;
- color:#000000;
- font-weight: bold;
-}
-
-TD {
- font-family: Arial, Helvetica, sans-serif;
- font-size: 11pt;
- color:#000000;
-}
-
-.smalltext {
- font-size:80%;
-}
-
-p.note {
- display: block;
- font-family: Arial, Helvetica, Geneva, sans-serif;
- font-size: 95%;
-}
-
-p.warning {
- display: block;
- font-family: Arial, Helvetica, Geneva, sans-serif;
- font-size: 95%;
-}
-
-pre {
- font-family: "Courier New", Courier, mono;
- font-size: 92%;
- text-indent : 15%;
-}
-
-table.pretty {
- background: whitesmoke;
- border-collapse: collapse;
-}
-table.pretty th, table.pretty td {
- border: 1px silver solid;
- padding: 0.2em;
- font-size: 10pt;
-}
-table.pretty th {
- background: blue;
- text-align: left;
- color: white;
-}
-table.pretty caption {
- margin-left: inherit;
- margin-right: inherit;
-}
-
-table.accent {
- background: blue;
-}
-
diff --git a/admin.services/src/test/resource/eclipselink/example/mysports/admin/services/test/style/default.css b/admin.services/src/test/resource/eclipselink/example/mysports/admin/services/test/style/default.css
deleted file mode 100644
index 8136a7a..0000000
--- a/admin.services/src/test/resource/eclipselink/example/mysports/admin/services/test/style/default.css
+++ /dev/null
@@ -1,212 +0,0 @@
-#*******************************************************************************
-# * Copyright (c) 2010 Oracle. All rights reserved.
-# * This program and the accompanying materials are made available under the
-# * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
-# * which accompanies this distribution.
-# * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
-# * and the Eclipse Distribution License is available at
-# * http://www.eclipse.org/org/documents/edl-v10.php.
-# *
-# * Contributors:
-# * dclarke - MySports Example for EclipseLink 2.3
-# ******************************************************************************/
-BODY, P, LI, UL, OL {
- font-family: Arial, Helvetica, sans-serif;
- font-size: 50%;
- color:#000000;
- list-style-position: outside;
-}
-
-A:link {
- font-family: Arial, Helvetica, sans-serif;
- color:#663300;
-
-}
-
-A:active {
- font-family: Arial, Helvetica, sans-serif;
- color:#ff6600;
-
-}
-
-A:visited {
- font-family: Arial, Helvetica, sans-serif;
- color:#996633;
-
-}
-
-A.navigation:link
-{
- font-family: Arial, Helvetica, sans-serif;
- font-size:65%;
- color:#996633;
-}
-
-A.navigation:active
-{
- font-family: Arial, Helvetica, sans-serif;
- font-size:65%;
- color:#996633;
-}
-
-A.navigation:visited
-{
- font-family: Arial, Helvetica, sans-serif;
- font-size:65%;
- color:#996633;
-}
-
-.clear { /* generic container (i.e. div) for floating buttons */
- overflow: hidden;
- width: 100%;
-}
-
-c.button {
- background: transparent url('../images/bg_button_a.gif') no-repeat scroll top right;
- color: #444;
- display: block;
- float: left;
- font: normal 12px arial, sans-serif;
- height: 24px;
- margin-right: 6px;
- padding-right: 18px; /* sliding doors padding */
- text-decoration: none;
-}
-
-a.button span {
- background: transparent url('../images/bg_button_span.gif') no-repeat;
- display: block;
- line-height: 14px;
- padding: 5px 0 5px 18px;
-}
-
-a.button:active {
- background-position: bottom right;
- color: #000;
- outline: none; /* hide dotted outline in Firefox */
-}
-
-a.button:active span {
- background-position: bottom left;
- padding: 6px 0 4px 18px; /* push text down 1px */
-}
-p.listpara
-{text-indent: 15%}
-
-H1 {
- font-family: Arial, Helvetica, sans-serif;
- font-size:170%;
- color:#336699;
- border : solid ##3333CC;
- width : 100%;
- border-width : 0px 0px 2px 0px;
- margin-left: 20px;
-}
-
-H2 {
- font-family: Arial, Helvetica, sans-serif;
- font-size:130%;
- font-style: italic;
- color: white;
- width : 100%;
- margin-left: 20px;
-}
-
-H3 {
- font-family: Arial, Helvetica, sans-serif;
- font-size:110%;
- color:#336699;
- border : solid #CCCC99;
- width : 100%;
- border-width : 0px 0px 2px 0px;
-}
-
-H4 {
- font-family: Arial, Helvetica, sans-serif;
- font-size:92%;
- color:#000000;
- font-weight: bold;
- width : 100%;
-}
-
-.code_no_color {
- color : #000000;
- font-family : "Courier New", "Courier", "monospace";
-}
-
-code {
- color : #336699;
- font-family : "Courier New", "Courier", "monospace";
-}
-
-P.indent {
- text-indent: 9%;
-}
-
-table.borders {
- border : 1% solid #BDB76B;
-}
-
-TR {
- text-align : left;
- vertical-align : top;
-}
-
-TH {
- font-family: Arial, Helvetica, sans-serif;
- font-size: 11pt;
- color:#000000;
- font-weight: bold;
-}
-
-TD {
- font-family: Arial, Helvetica, sans-serif;
- font-size: 11pt;
- color:#000000;
-}
-
-.smalltext {
- font-size:80%;
-}
-
-p.note {
- display: block;
- font-family: Arial, Helvetica, Geneva, sans-serif;
- font-size: 95%;
-}
-
-p.warning {
- display: block;
- font-family: Arial, Helvetica, Geneva, sans-serif;
- font-size: 95%;
-}
-
-pre {
- font-family: "Courier New", Courier, mono;
- font-size: 92%;
- text-indent : 15%;
-}
-
-table.pretty {
- background: whitesmoke;
- border-collapse: collapse;
-}
-table.pretty th, table.pretty td {
- border: 1px silver solid;
- padding: 0.2em;
- font-size: 10pt;
-}
-table.pretty th {
- background: green;
- text-align: left;
- color: white;
-}
-table.pretty caption {
- margin-left: inherit;
- margin-right: inherit;
-}
-
-table.accent {
- background: green;
-}
-
diff --git a/admin.services/src/test/resource/eclipselink/example/mysports/admin/services/test/style/green.css b/admin.services/src/test/resource/eclipselink/example/mysports/admin/services/test/style/green.css
deleted file mode 100644
index 8136a7a..0000000
--- a/admin.services/src/test/resource/eclipselink/example/mysports/admin/services/test/style/green.css
+++ /dev/null
@@ -1,212 +0,0 @@
-#*******************************************************************************
-# * Copyright (c) 2010 Oracle. All rights reserved.
-# * This program and the accompanying materials are made available under the
-# * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
-# * which accompanies this distribution.
-# * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
-# * and the Eclipse Distribution License is available at
-# * http://www.eclipse.org/org/documents/edl-v10.php.
-# *
-# * Contributors:
-# * dclarke - MySports Example for EclipseLink 2.3
-# ******************************************************************************/
-BODY, P, LI, UL, OL {
- font-family: Arial, Helvetica, sans-serif;
- font-size: 50%;
- color:#000000;
- list-style-position: outside;
-}
-
-A:link {
- font-family: Arial, Helvetica, sans-serif;
- color:#663300;
-
-}
-
-A:active {
- font-family: Arial, Helvetica, sans-serif;
- color:#ff6600;
-
-}
-
-A:visited {
- font-family: Arial, Helvetica, sans-serif;
- color:#996633;
-
-}
-
-A.navigation:link
-{
- font-family: Arial, Helvetica, sans-serif;
- font-size:65%;
- color:#996633;
-}
-
-A.navigation:active
-{
- font-family: Arial, Helvetica, sans-serif;
- font-size:65%;
- color:#996633;
-}
-
-A.navigation:visited
-{
- font-family: Arial, Helvetica, sans-serif;
- font-size:65%;
- color:#996633;
-}
-
-.clear { /* generic container (i.e. div) for floating buttons */
- overflow: hidden;
- width: 100%;
-}
-
-c.button {
- background: transparent url('../images/bg_button_a.gif') no-repeat scroll top right;
- color: #444;
- display: block;
- float: left;
- font: normal 12px arial, sans-serif;
- height: 24px;
- margin-right: 6px;
- padding-right: 18px; /* sliding doors padding */
- text-decoration: none;
-}
-
-a.button span {
- background: transparent url('../images/bg_button_span.gif') no-repeat;
- display: block;
- line-height: 14px;
- padding: 5px 0 5px 18px;
-}
-
-a.button:active {
- background-position: bottom right;
- color: #000;
- outline: none; /* hide dotted outline in Firefox */
-}
-
-a.button:active span {
- background-position: bottom left;
- padding: 6px 0 4px 18px; /* push text down 1px */
-}
-p.listpara
-{text-indent: 15%}
-
-H1 {
- font-family: Arial, Helvetica, sans-serif;
- font-size:170%;
- color:#336699;
- border : solid ##3333CC;
- width : 100%;
- border-width : 0px 0px 2px 0px;
- margin-left: 20px;
-}
-
-H2 {
- font-family: Arial, Helvetica, sans-serif;
- font-size:130%;
- font-style: italic;
- color: white;
- width : 100%;
- margin-left: 20px;
-}
-
-H3 {
- font-family: Arial, Helvetica, sans-serif;
- font-size:110%;
- color:#336699;
- border : solid #CCCC99;
- width : 100%;
- border-width : 0px 0px 2px 0px;
-}
-
-H4 {
- font-family: Arial, Helvetica, sans-serif;
- font-size:92%;
- color:#000000;
- font-weight: bold;
- width : 100%;
-}
-
-.code_no_color {
- color : #000000;
- font-family : "Courier New", "Courier", "monospace";
-}
-
-code {
- color : #336699;
- font-family : "Courier New", "Courier", "monospace";
-}
-
-P.indent {
- text-indent: 9%;
-}
-
-table.borders {
- border : 1% solid #BDB76B;
-}
-
-TR {
- text-align : left;
- vertical-align : top;
-}
-
-TH {
- font-family: Arial, Helvetica, sans-serif;
- font-size: 11pt;
- color:#000000;
- font-weight: bold;
-}
-
-TD {
- font-family: Arial, Helvetica, sans-serif;
- font-size: 11pt;
- color:#000000;
-}
-
-.smalltext {
- font-size:80%;
-}
-
-p.note {
- display: block;
- font-family: Arial, Helvetica, Geneva, sans-serif;
- font-size: 95%;
-}
-
-p.warning {
- display: block;
- font-family: Arial, Helvetica, Geneva, sans-serif;
- font-size: 95%;
-}
-
-pre {
- font-family: "Courier New", Courier, mono;
- font-size: 92%;
- text-indent : 15%;
-}
-
-table.pretty {
- background: whitesmoke;
- border-collapse: collapse;
-}
-table.pretty th, table.pretty td {
- border: 1px silver solid;
- padding: 0.2em;
- font-size: 10pt;
-}
-table.pretty th {
- background: green;
- text-align: left;
- color: white;
-}
-table.pretty caption {
- margin-left: inherit;
- margin-right: inherit;
-}
-
-table.accent {
- background: green;
-}
-
diff --git a/admin.services/src/test/resource/eclipselink/example/mysports/admin/services/test/style/red.css b/admin.services/src/test/resource/eclipselink/example/mysports/admin/services/test/style/red.css
deleted file mode 100644
index 23f0864..0000000
--- a/admin.services/src/test/resource/eclipselink/example/mysports/admin/services/test/style/red.css
+++ /dev/null
@@ -1,209 +0,0 @@
-#*******************************************************************************
-# * Copyright (c) 2010 Oracle. All rights reserved.
-# * This program and the accompanying materials are made available under the
-# * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
-# * which accompanies this distribution.
-# * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
-# * and the Eclipse Distribution License is available at
-# * http://www.eclipse.org/org/documents/edl-v10.php.
-# *
-# * Contributors:
-# * dclarke - MySports Example for EclipseLink 2.3
-# ******************************************************************************/
-BODY, P, LI, UL, OL {
- font-family: Arial, Helvetica, sans-serif;
- font-size: 50%;
- color:#000000;
- list-style-position: outside;
-}
-
-A:link {
- font-family: Arial, Helvetica, sans-serif;
- color:#663300;
-}
-
-A:active {
- font-family: Arial, Helvetica, sans-serif;
- color:#ff6600;
-
-}
-
-A:visited {
- font-family: Arial, Helvetica, sans-serif;
- color:#996633;
-
-}
-
-A.navigation:link
-{
- font-family: Arial, Helvetica, sans-serif;
- font-size:65%;
- color:#996633;
-}
-
-A.navigation:active
-{
- font-family: Arial, Helvetica, sans-serif;
- font-size:65%;
- color:#996633;
-}
-
-A.navigation:visited
-{
- font-family: Arial, Helvetica, sans-serif;
- font-size:65%;
- color:#996633;
-}
-
-.clear { /* generic container (i.e. div) for floating buttons */
- overflow: hidden;
- width: 100%;
-}
-
-c.button {
- background: transparent url('../images/bg_button_a.gif') no-repeat scroll top right;
- color: #444;
- display: block;
- float: left;
- font: normal 12px arial, sans-serif;
- height: 24px;
- margin-right: 6px;
- padding-right: 18px; /* sliding doors padding */
- text-decoration: none;
-}
-
-a.button span {
- background: transparent url('../images/bg_button_span.gif') no-repeat;
- display: block;
- line-height: 14px;
- padding: 5px 0 5px 18px;
-}
-
-a.button:active {
- background-position: bottom right;
- color: #000;
- outline: none; /* hide dotted outline in Firefox */
-}
-
-a.button:active span {
- background-position: bottom left;
- padding: 6px 0 4px 18px; /* push text down 1px */
-}
-p.listpara
-{text-indent: 15%}
-
-H1 {
- font-family: Arial, Helvetica, sans-serif;
- font-size:200%;
- color: red;
- width : 100%;
- border-width : 0px 0px 2px 0px;
- margin-left: 20px;
-}
-
-H2 {
- font-family: Arial, Helvetica, sans-serif;
- font-size:130%;
- font-style: italic;
- color: white;
- width : 100%;
- margin-left: 20px;
-}
-
-H3 {
- font-family: Arial, Helvetica, sans-serif;
- font-size:110%;
- color: red;
- border : solid #CCCC99;
- width : 100%;
- border-width : 0px 0px 2px 0px;
-}
-
-H4 {
- font-family: Arial, Helvetica, sans-serif;
- font-size:92%;
- color:#000000;
- font-weight: bold;
- width : 100%;
-}
-
-.code_no_color {
- color : #000000;
- font-family : "Courier New", "Courier", "monospace";
-}
-
-code {
- color : #336699;
- font-family : "Courier New", "Courier", "monospace";
-}
-
-P.indent {
- text-indent: 9%;
-}
-
-table.borders {
- border : 1% solid #BDB76B;
-}
-
-TR {
- text-align : left;
- vertical-align : top;
-}
-
-TH {
- font-family: Arial, Helvetica, sans-serif;
- font-size: 11pt;
- color:#000000;
- font-weight: bold;
-}
-
-TD {
- font-family: Arial, Helvetica, sans-serif;
- font-size: 11pt;
- color:#000000;
-}
-
-.smalltext {
- font-size:80%;
-}
-
-p.note {
- display: block;
- font-family: Arial, Helvetica, Geneva, sans-serif;
- font-size: 95%;
-}
-
-p.warning {
- display: block;
- font-family: Arial, Helvetica, Geneva, sans-serif;
- font-size: 95%;
-}
-
-pre {
- font-family: "Courier New", Courier, mono;
- font-size: 92%;
- text-indent : 15%;
-}
-
-table.pretty {
- background: whitesmoke;
- border-collapse: collapse;
-}
-table.pretty th, table.pretty td {
- border: 1px silver solid;
- padding: 0.2em;
- font-size: 10pt;
-}
-table.pretty th {
- background: red;
- text-align: left;
- color: white;
-}
-table.pretty caption {
- margin-left: inherit;
- margin-right: inherit;
-}
-
-table.accent {
- background: red;
-}
diff --git a/admin.web/.classpath b/admin.web/.classpath
deleted file mode 100644
index c0f4868..0000000
--- a/admin.web/.classpath
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" output="target/classes" path="src/main/java">
- <attributes>
- <attribute name="optional" value="true"/>
- <attribute name="maven.pomderived" value="true"/>
- </attributes>
- </classpathentry>
- <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
- <attributes>
- <attribute name="maven.pomderived" value="true"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="src" output="target/test-classes" path="src/test/java">
- <attributes>
- <attribute name="optional" value="true"/>
- <attribute name="maven.pomderived" value="true"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7">
- <attributes>
- <attribute name="maven.pomderived" value="true"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
- <attributes>
- <attribute name="maven.pomderived" value="true"/>
- <attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="output" path="target/classes"/>
-</classpath>
diff --git a/admin.web/.project b/admin.web/.project
deleted file mode 100644
index ffa923d..0000000
--- a/admin.web/.project
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>MySports Admin Web</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.wst.common.project.facet.core.builder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.wst.validation.validationbuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.m2e.core.maven2Builder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
- <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.m2e.core.maven2Nature</nature>
- <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
- <nature>org.eclipse.wst.jsdt.core.jsNature</nature>
- </natures>
-</projectDescription>
diff --git a/admin.web/.settings/.jsdtscope b/admin.web/.settings/.jsdtscope
deleted file mode 100644
index 3a28de0..0000000
--- a/admin.web/.settings/.jsdtscope
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="WebContent"/>
- <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.WebProject">
- <attributes>
- <attribute name="hide" value="true"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/>
- <classpathentry kind="output" path=""/>
-</classpath>
diff --git a/admin.web/.settings/org.eclipse.jdt.core.prefs b/admin.web/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index ec4300d..0000000
--- a/admin.web/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,5 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
-org.eclipse.jdt.core.compiler.compliance=1.7
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
-org.eclipse.jdt.core.compiler.source=1.7
diff --git a/admin.web/.settings/org.eclipse.m2e.core.prefs b/admin.web/.settings/org.eclipse.m2e.core.prefs
deleted file mode 100644
index 2af59a6..0000000
--- a/admin.web/.settings/org.eclipse.m2e.core.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-activeProfiles=mysql
-eclipse.preferences.version=1
-resolveWorkspaceProjects=true
-version=1
diff --git a/admin.web/.settings/org.eclipse.wst.common.component b/admin.web/.settings/org.eclipse.wst.common.component
deleted file mode 100644
index 5fd3056..0000000
--- a/admin.web/.settings/org.eclipse.wst.common.component
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
- <wb-module deploy-name="MySports Admin Web">
- <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
- <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
- <wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
- <wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
- <dependent-module archiveName="admin.services-2.4.2-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/MySports Admin Services/MySports Admin Services">
- <dependency-type>uses</dependency-type>
- </dependent-module>
- <property name="java-output-path" value="/MySports Admin Web/target/classes"/>
- <property name="context-root" value="admin.web"/>
- </wb-module>
-</project-modules>
diff --git a/admin.web/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml b/admin.web/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml
deleted file mode 100644
index 6d59853..0000000
--- a/admin.web/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<root>
- <facet id="jst.jsf">
- <node name="libprov">
- <attribute name="provider-id" value="jsf-no-op-library-provider"/>
- </node>
- </facet>
- <facet id="jst.jaxrs">
- <node name="libprov">
- <attribute name="provider-id" value="jaxrs-no-op-library-provider"/>
- </node>
- </facet>
-</root>
diff --git a/admin.web/.settings/org.eclipse.wst.common.project.facet.core.xml b/admin.web/.settings/org.eclipse.wst.common.project.facet.core.xml
deleted file mode 100644
index 469c5a0..0000000
--- a/admin.web/.settings/org.eclipse.wst.common.project.facet.core.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<faceted-project>
- <fixed facet="wst.jsdt.web"/>
- <installed facet="java" version="1.7"/>
- <installed facet="jst.web" version="3.0"/>
- <installed facet="jst.jsf" version="2.1"/>
- <installed facet="wst.jsdt.web" version="1.0"/>
- <installed facet="jst.jaxrs" version="1.1"/>
-</faceted-project>
diff --git a/admin.web/.settings/org.eclipse.wst.jsdt.ui.superType.container b/admin.web/.settings/org.eclipse.wst.jsdt.ui.superType.container
deleted file mode 100644
index 3bd5d0a..0000000
--- a/admin.web/.settings/org.eclipse.wst.jsdt.ui.superType.container
+++ /dev/null
@@ -1 +0,0 @@
-org.eclipse.wst.jsdt.launching.baseBrowserLibrary \ No newline at end of file
diff --git a/admin.web/.settings/org.eclipse.wst.jsdt.ui.superType.name b/admin.web/.settings/org.eclipse.wst.jsdt.ui.superType.name
deleted file mode 100644
index 05bd71b..0000000
--- a/admin.web/.settings/org.eclipse.wst.jsdt.ui.superType.name
+++ /dev/null
@@ -1 +0,0 @@
-Window \ No newline at end of file
diff --git a/admin.web/pom.xml b/admin.web/pom.xml
deleted file mode 100644
index a4a2816..0000000
--- a/admin.web/pom.xml
+++ /dev/null
@@ -1,79 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>eclipselink.example.mysports</groupId>
- <artifactId>bom</artifactId>
- <version>2.4.2-SNAPSHOT</version>
- <relativePath>..</relativePath>
- </parent>
-
- <artifactId>admin.web</artifactId>
- <packaging>war</packaging>
- <name>MySports Admin WebApp</name>
-
- <dependencies>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>admin.services</artifactId>
- <version>${project.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.eclipse.persistence</groupId>
- <artifactId>eclipselink</artifactId>
- <version>${eclipselink.version}</version>
- <exclusions>
- <exclusion>
- <artifactId>commonj.sdo</artifactId>
- <groupId>commonj.sdo</groupId>
- </exclusion>
- </exclusions>
- <scope>provided</scope>
- </dependency>
-
- <dependency>
- <groupId>javax</groupId>
- <artifactId>javaee-api</artifactId>
- <version>6.0</version>
- <scope>provided</scope>
- </dependency>
-
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>admin.services</artifactId>
- <version>${project.version}</version>
- <type>test-jar</type>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.11</version>
- <scope>test</scope>
- </dependency>
-
-
- </dependencies>
-
- <build>
- <plugins>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <version>2.4</version>
- <executions>
- <execution>
- <goals>
- <goal>test-jar</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
-
- </plugins>
- </build>
-</project>
diff --git a/admin.web/src/main/java/eclipselink/example/mysports/admin/jaxrs/HostedLeaguesService.java b/admin.web/src/main/java/eclipselink/example/mysports/admin/jaxrs/HostedLeaguesService.java
deleted file mode 100644
index 7fb968a..0000000
--- a/admin.web/src/main/java/eclipselink/example/mysports/admin/jaxrs/HostedLeaguesService.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * dclarke - EclipseLink 2.3 - MySports Demo Bug 344608
- ******************************************************************************/
-package eclipselink.example.mysports.admin.jaxrs;
-
-import java.io.InputStream;
-import java.util.List;
-
-import javax.ejb.EJB;
-import javax.ejb.LocalBean;
-import javax.ejb.Stateless;
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.Context;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.UriInfo;
-
-import eclipselink.example.mysports.admin.model.HostedLeague;
-import eclipselink.example.mysports.admin.services.HostedLeagueRepository;
-
-/**
- * Session bean exposing JAX-RS methods for defining and usage of league
- * specific metadata.
- *
- * @author dclarke
- * @since EclipseLink 2.3.0
- */
-@Stateless
-@LocalBean
-@Path("league")
-public class HostedLeaguesService {
-
- @EJB
- private HostedLeagueRepository repository;
-
- public HostedLeagueRepository getRepository() {
- return repository;
- }
-
- public void setRepository(HostedLeagueRepository repository) {
- this.repository = repository;
- }
-
- @GET
- @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
- public List<HostedLeague> allLeagues(@Context UriInfo context) {
- List<HostedLeague> allLeagues = getRepository().allSharedLeagues();
-
- for (HostedLeague hl : allLeagues) {
- hl.setUri(context.getAbsolutePath() + "/" + hl.getId());
- }
- return allLeagues;
- }
-
- @GET
- @Path("{league}")
- @Produces(MediaType.APPLICATION_XML)
- public HostedLeague getLeague(@Context UriInfo context, @PathParam("league") String leagueId) {
- System.err.println("HostedLeagueService::GET/"+leagueId);
- HostedLeague league = getRepository().getLeague(leagueId);
- if (league != null && context != null) {
- league.setUri(context.getAbsolutePath() + "/" + league.getId());
- }
- return league;
-
- }
-
- @GET
- @Path("{league}/orm")
- @Produces(MediaType.APPLICATION_XML)
- public String getORM(@PathParam("league") String leagueId) {
- System.err.println("HostedLeagueService::orm-GET/"+leagueId);
- return getRepository().getORM(leagueId);
- }
-
- @GET
- @Path("{league}.css")
- @Produces("text/css")
- public String getCSS(@PathParam("league") String leagueId) {
- System.err.println("HostedLeagueService::css-GET/"+leagueId);
- return getRepository().getCSS(leagueId);
- }
-
- @GET
- @Path("{league}.png")
- @Produces("image/jpeg")
- public InputStream getLogo(@PathParam("league") String leagueId) {
- System.err.println("HostedLeagueService::logo-GET/"+leagueId);
- return getRepository().getLogo(leagueId);
- }
-
-} \ No newline at end of file
diff --git a/admin.web/src/main/java/eclipselink/example/mysports/admin/jaxrs/MySportsContextResolver.java b/admin.web/src/main/java/eclipselink/example/mysports/admin/jaxrs/MySportsContextResolver.java
deleted file mode 100644
index 1caa471..0000000
--- a/admin.web/src/main/java/eclipselink/example/mysports/admin/jaxrs/MySportsContextResolver.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * dclarke - EclipseLink 2.3 - MySports Demo Bug 344608
- ******************************************************************************/
-package eclipselink.example.mysports.admin.jaxrs;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.ext.ContextResolver;
-import javax.ws.rs.ext.Provider;
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBException;
-
-import org.eclipse.persistence.jaxb.JAXBContextFactory;
-import org.eclipse.persistence.jaxb.JAXBContextProperties;
-
-import eclipselink.example.mysports.admin.model.HostedLeague;
-
-/**
- * {@link ContextResolver} to handle using EclipseLink MOXy as the JAXB provider
- * to convert objects into XML when returned from the JAX-RS methods.
- *
- * @author dclarke
- * @since EclipseLink 2.3.0
- */
-@Provider
-@Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
-public class MySportsContextResolver implements ContextResolver<JAXBContext> {
-
- private JAXBContext jc;
-
- public MySportsContextResolver() {
- try {
- jc = createContext();
- } catch (JAXBException e) {
- throw new RuntimeException("MySportsContextResolver<init> failed: " + e.getMessage(), e);
- }
- }
-
- public JAXBContext getContext(Class<?> clazz) {
- if (HostedLeague.class == clazz || HostedLeaguesService.class == clazz) {
- return jc;
- }
- return null;
- }
-
- private static final String MAPPING_FILE = "META-INF/eclipselink-oxm.xml";
-
- public static JAXBContext createContext() throws JAXBException {
- Map<String, Object> props = new HashMap<String, Object>(1);
- props.put(JAXBContextProperties.OXM_METADATA_SOURCE, MAPPING_FILE);
- return JAXBContextFactory.createContext(new Class[] { HostedLeague.class }, props);
- }
-
-} \ No newline at end of file
diff --git a/admin.web/src/main/java/eclipselink/example/mysports/admin/jsf/CreateLeague.java b/admin.web/src/main/java/eclipselink/example/mysports/admin/jsf/CreateLeague.java
deleted file mode 100644
index 7ca5b96..0000000
--- a/admin.web/src/main/java/eclipselink/example/mysports/admin/jsf/CreateLeague.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * dclarke - EclipseLink 2.4 - MySports Demo Bug 344608
- ******************************************************************************/
-package eclipselink.example.mysports.admin.jsf;
-
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.ManagedProperty;
-import javax.faces.bean.RequestScoped;
-
-import eclipselink.example.mysports.admin.model.HostedLeague;
-
-/**
- *
- *
- * @author dclarke
- * @since EclipseLink 2.4
- */
-@ManagedBean
-@RequestScoped
-public class CreateLeague {
-
- private HostedLeague league = new HostedLeague("", "", "default");
-
- @ManagedProperty("#{leagueRepository}")
- private LeagueRepository repository;
-
- @ManagedProperty("#{viewLeague}")
- private ViewLeague viewLeague;
-
- public LeagueRepository getRepository() {
- return repository;
- }
-
- public void setRepository(LeagueRepository repository) {
- this.repository = repository;
- }
-
- public HostedLeague getLeague() {
- return league;
- }
-
- public String getId() {
- return getLeague().getId();
- }
-
- public void setId(String id) {
- getLeague().setId(id);
- }
-
- public String getName() {
- return getLeague().getName();
- }
-
- public void setName(String name) {
- getLeague().setName(name);
- }
-
- public ViewLeague getViewLeague() {
- return viewLeague;
- }
-
- public void setViewLeague(ViewLeague viewLeague) {
- this.viewLeague = viewLeague;
- }
-
- public String create() {
- getRepository().getRepository().merge(getLeague());
-
- return getViewLeague().view(getId());
- }
-
-}
diff --git a/admin.web/src/main/java/eclipselink/example/mysports/admin/jsf/CurrentUser.java b/admin.web/src/main/java/eclipselink/example/mysports/admin/jsf/CurrentUser.java
deleted file mode 100644
index 590183f..0000000
--- a/admin.web/src/main/java/eclipselink/example/mysports/admin/jsf/CurrentUser.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * dclarke - EclipseLink 2.4 - MySports Demo Bug 344608
- ******************************************************************************/
-package eclipselink.example.mysports.admin.jsf;
-
-import javax.faces.bean.ManagedBean;
-
-
-@ManagedBean
-public class CurrentUser {
-
- private String name = "Doug@" + System.currentTimeMillis();
-
- public String getName() {
- return this.name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public String doit() {
- setName("Doug@" + System.currentTimeMillis());
- return null;
- }
-}
diff --git a/admin.web/src/main/java/eclipselink/example/mysports/admin/jsf/DatasourceRepositoryBean.java b/admin.web/src/main/java/eclipselink/example/mysports/admin/jsf/DatasourceRepositoryBean.java
deleted file mode 100644
index b8cea6d..0000000
--- a/admin.web/src/main/java/eclipselink/example/mysports/admin/jsf/DatasourceRepositoryBean.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * dclarke - EclipseLink 2.4 - MySports Demo Bug 344608
- ******************************************************************************/
-package eclipselink.example.mysports.admin.jsf;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.RequestScoped;
-
-import eclipselink.example.mysports.admin.model.Datasource;
-import eclipselink.example.mysports.admin.services.glassfish.JDBCResource;
-import eclipselink.example.mysports.admin.services.glassfish.RESTOperations;
-
-@ManagedBean
-@RequestScoped
-public class DatasourceRepositoryBean {
-
- private List<Datasource> datasources;
-
- public List<Datasource> getDatasources() {
- if (this.datasources == null) {
- this.datasources = new ArrayList<Datasource>();
- RESTOperations ops = new RESTOperations("localhost");
- String[] resourceNames = JDBCResource.getJDBCResourceNames(ops);
-
- for (String name : resourceNames) {
- Datasource ds = new Datasource();
- ds.setName(name);
- this.datasources.add(ds);
-
- }
- }
- return datasources;
- }
-}
diff --git a/admin.web/src/main/java/eclipselink/example/mysports/admin/jsf/HostEnvironmentRepositoryBean.java b/admin.web/src/main/java/eclipselink/example/mysports/admin/jsf/HostEnvironmentRepositoryBean.java
deleted file mode 100644
index e899880..0000000
--- a/admin.web/src/main/java/eclipselink/example/mysports/admin/jsf/HostEnvironmentRepositoryBean.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * dclarke - EclipseLink 2.4 - MySports Demo Bug 344608
- ******************************************************************************/
-package eclipselink.example.mysports.admin.jsf;
-
-import java.util.List;
-
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.RequestScoped;
-import javax.inject.Inject;
-
-import eclipselink.example.mysports.admin.model.HostEnvironment;
-import eclipselink.example.mysports.admin.services.HostEnvironmentRepository;
-
-@ManagedBean
-@RequestScoped
-public class HostEnvironmentRepositoryBean {
-
- @Inject
- private HostEnvironmentRepository repository;
-
- public HostEnvironmentRepository getRepository() {
- return repository;
- }
-
- public void setRepository(HostEnvironmentRepository repository) {
- this.repository = repository;
- }
-
- public List<HostEnvironment> getEnvironments() {
- return getRepository().getEnvironments();
- }
-}
diff --git a/admin.web/src/main/java/eclipselink/example/mysports/admin/jsf/LeagueRepository.java b/admin.web/src/main/java/eclipselink/example/mysports/admin/jsf/LeagueRepository.java
deleted file mode 100644
index 299e65c..0000000
--- a/admin.web/src/main/java/eclipselink/example/mysports/admin/jsf/LeagueRepository.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * dclarke - EclipseLink 2.4 - MySports Demo Bug 344608
- ******************************************************************************/
-package eclipselink.example.mysports.admin.jsf;
-
-import java.util.List;
-
-import javax.ejb.EJB;
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.SessionScoped;
-
-import eclipselink.example.mysports.admin.model.HostedLeague;
-import eclipselink.example.mysports.admin.services.HostedLeagueRepository;
-
-@ManagedBean
-@SessionScoped
-public class LeagueRepository {
-
- @EJB
- private HostedLeagueRepository repository;
-
- public HostedLeagueRepository getRepository() {
- return repository;
- }
-
- public void setRepository(HostedLeagueRepository repository) {
- this.repository = repository;
- }
-
- public List<HostedLeague> getLeagues() {
- return getRepository().allLeagues();
- }
-
- public List<HostedLeague> getSharedLeagues() {
- return getRepository().allSharedLeagues();
- }
-
- public HostedLeague getLeague(String id) {
- return getRepository().getLeague(id);
- }
-
-}
diff --git a/admin.web/src/main/java/eclipselink/example/mysports/admin/jsf/MySportsPhaseListener.java b/admin.web/src/main/java/eclipselink/example/mysports/admin/jsf/MySportsPhaseListener.java
deleted file mode 100644
index 9ef9495..0000000
--- a/admin.web/src/main/java/eclipselink/example/mysports/admin/jsf/MySportsPhaseListener.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * dclarke - EclipseLink 2.3 - MySports Demo Bug 344608
- ******************************************************************************/
-package eclipselink.example.mysports.admin.jsf;
-
-import java.io.IOException;
-
-import javax.faces.context.FacesContext;
-import javax.faces.event.PhaseEvent;
-import javax.faces.event.PhaseId;
-import javax.faces.event.PhaseListener;
-
-public class MySportsPhaseListener implements PhaseListener {
- private static final long serialVersionUID = 1L;
-
- @Override
- public void afterPhase(PhaseEvent event) {
- FacesContext facesContext = event.getFacesContext();
- if(facesContext.getViewRoot()==null){
- try{
- facesContext.getExternalContext().redirect("/");
- facesContext.responseComplete();
- } catch (IOException e){
- e.printStackTrace();
- }
- }
- }
-
- @Override
- public void beforePhase(PhaseEvent arg0) {
- }
-
- @Override
- public PhaseId getPhaseId() {
- return null;
- }
-
-}
diff --git a/admin.web/src/main/java/eclipselink/example/mysports/admin/jsf/NoCacheFilter.java b/admin.web/src/main/java/eclipselink/example/mysports/admin/jsf/NoCacheFilter.java
deleted file mode 100644
index f35fb45..0000000
--- a/admin.web/src/main/java/eclipselink/example/mysports/admin/jsf/NoCacheFilter.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * dclarke - EclipseLink 2.4 - MySports Demo Bug 344608
- ******************************************************************************/
-package eclipselink.example.mysports.admin.jsf;
-
-import java.io.IOException;
-
-import javax.faces.application.ResourceHandler;
-import javax.servlet.Filter;
-import javax.servlet.FilterChain;
-import javax.servlet.FilterConfig;
-import javax.servlet.ServletException;
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
-import javax.servlet.annotation.WebFilter;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-@WebFilter(servletNames = { "Faces Servlet" })
-public class NoCacheFilter implements Filter {
-
- @Override
- public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
- HttpServletRequest req = (HttpServletRequest) request;
- HttpServletResponse res = (HttpServletResponse) response;
- // Skip JSF resources (CSS/JS/Images/etc)
- if (!req.getRequestURI().startsWith(req.getContextPath() + ResourceHandler.RESOURCE_IDENTIFIER)) {
- // HTTP 1.1.
- res.setHeader("Cache-Control", "no-cache, no-store, must-revalidate");
- // HTTP 1.0.
- res.setHeader("Pragma", "no-cache");
- // Proxies.
- res.setDateHeader("Expires", 0);
- }
-
- chain.doFilter(request, response);
- }
-
- @Override
- public void destroy() {
- }
-
- @Override
- public void init(FilterConfig arg0) throws ServletException {
- }
-}
diff --git a/admin.web/src/main/java/eclipselink/example/mysports/admin/jsf/ViewLeague.java b/admin.web/src/main/java/eclipselink/example/mysports/admin/jsf/ViewLeague.java
deleted file mode 100644
index 6a59379..0000000
--- a/admin.web/src/main/java/eclipselink/example/mysports/admin/jsf/ViewLeague.java
+++ /dev/null
@@ -1,191 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * dclarke - EclipseLink 2.4 - MySports Demo Bug 344608
- ******************************************************************************/
-package eclipselink.example.mysports.admin.jsf;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.ManagedProperty;
-import javax.faces.bean.SessionScoped;
-import javax.faces.context.FacesContext;
-import javax.servlet.http.HttpServletRequest;
-
-import eclipselink.example.mysports.admin.model.DataIsolation;
-import eclipselink.example.mysports.admin.model.Extension;
-import eclipselink.example.mysports.admin.model.HostedLeague;
-
-/**
- * TODO
- *
- * @author dclarke
- * @since EclipseLink 2.4
- */
-@ManagedBean
-@SessionScoped
-public class ViewLeague {
-
- protected static final String PAGE = "league?faces-redirect=true";
-
- private HostedLeague league;
-
- private List<ExtensionDefinition> playerExtensions;
-
- private String datasourceName;
-
- @ManagedProperty("#{leagueRepository}")
- private LeagueRepository repository;
-
- public LeagueRepository getRepository() {
- return repository;
- }
-
- public void setRepository(LeagueRepository repository) {
- this.repository = repository;
- }
-
- public HostedLeague getLeague() {
- return league;
- }
-
- public String view() {
- FacesContext facesContext = FacesContext.getCurrentInstance();
- HttpServletRequest myRequest = (HttpServletRequest) facesContext.getExternalContext().getRequest();
- String value = myRequest.getParameter("league-id");
- return view(value);
- }
-
- public String view(String id) {
- this.league = getRepository().getLeague(id);
-
- if (getLeague() != null ) {
- this.datasourceName = getLeague().getDatasourceName();
- }
-
- if (this.league == null) {
- this.datasourceName = null;
- return "index";
- }
-
- List<ExtensionDefinition> extensions = new ArrayList<ExtensionDefinition>(5);
- for (int index = 1; index <= 5; index++) {
- Extension ext = getLeague().getPlayerExtension("flex_" + index);
- extensions.add(new ExtensionDefinition(ext, "flex_" + index));
- }
- this.playerExtensions = extensions;
-
- return PAGE;
- }
-
- public String create() {
- this.league = new HostedLeague();
- this.datasourceName = null;
- return PAGE;
- }
-
- public DataIsolation[] getDataIsolations() {
- return DataIsolation.values();
- }
-
- public String[] getColourSchemes() {
- // TODO: Load from database using query on Styles
- return new String[] { "default", "red", "black", "blue", "green" };
- }
-
- public String getDatasourceName() {
- return datasourceName;
- }
-
- public void setDatasourceName(String datasourceName) {
- this.datasourceName = datasourceName;
- getLeague().setDatasourceName(getDatasourceName());
- }
-
- public String apply() {
- if (getPlayerExtensions() != null) {
- for (ExtensionDefinition ed : getPlayerExtensions()) {
- if (ed.isWriteable() && !ed.getName().isEmpty()) {
- getLeague().addPlayerExtension(ed.getName(), "java.lang.String", ed.getColumn());
- ed.setWriteable(false);
- }
- }
- }
-
- this.league = getRepository().getRepository().merge(getLeague());
-
- return null;
- }
-
- public String cancel() {
- this.league = null;
- return "index";
- }
-
- public boolean isNew() {
- return getLeague() != null && getLeague().getVersion() < 1;
- }
-
- public boolean isIdReadOnly() {
- return getLeague() != null && getLeague().getVersion() > 1;
- }
-
- public List<ExtensionDefinition> getPlayerExtensions() {
- return this.playerExtensions;
- }
-
- public class ExtensionDefinition {
- private String column;
- private String javaType;
- private String name;
- private boolean writeable = false;
-
- public ExtensionDefinition(Extension ext, String column) {
- super();
- if (ext == null) {
- this.writeable = true;
- this.column = column;
- this.javaType = "java.lang.String";
- this.name = "";
- } else {
- this.writeable = false;
- this.column = ext.getColumnName();
- this.javaType = ext.getJavaType();
- this.name = ext.getName();
- }
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public String getColumn() {
- return column;
- }
-
- public String getJavaType() {
- return javaType;
- }
-
- public boolean isWriteable() {
- return writeable;
- }
-
- public void setWriteable(boolean writeable) {
- this.writeable = writeable;
- }
- }
-}
diff --git a/admin.web/src/main/resources/hthl.png b/admin.web/src/main/resources/hthl.png
deleted file mode 100644
index 2ce522d..0000000
--- a/admin.web/src/main/resources/hthl.png
+++ /dev/null
Binary files differ
diff --git a/admin.web/src/main/resources/kfl.png b/admin.web/src/main/resources/kfl.png
deleted file mode 100644
index 806e9b0..0000000
--- a/admin.web/src/main/resources/kfl.png
+++ /dev/null
Binary files differ
diff --git a/admin.web/src/main/resources/mha.png b/admin.web/src/main/resources/mha.png
deleted file mode 100644
index 8ddc28b..0000000
--- a/admin.web/src/main/resources/mha.png
+++ /dev/null
Binary files differ
diff --git a/admin.web/src/main/resources/osl.png b/admin.web/src/main/resources/osl.png
deleted file mode 100644
index 0315dfa..0000000
--- a/admin.web/src/main/resources/osl.png
+++ /dev/null
Binary files differ
diff --git a/admin.web/src/main/webapp/META-INF/MANIFEST.MF b/admin.web/src/main/webapp/META-INF/MANIFEST.MF
deleted file mode 100644
index 254272e..0000000
--- a/admin.web/src/main/webapp/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,3 +0,0 @@
-Manifest-Version: 1.0
-Class-Path:
-
diff --git a/admin.web/src/main/webapp/WEB-INF/faces-config.xml b/admin.web/src/main/webapp/WEB-INF/faces-config.xml
deleted file mode 100644
index 0639996..0000000
--- a/admin.web/src/main/webapp/WEB-INF/faces-config.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<faces-config xmlns="http://java.sun.com/xml/ns/javaee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_1.xsd"
- version="2.1">
-
-</faces-config>
diff --git a/admin.web/src/main/webapp/WEB-INF/sun-web.xml b/admin.web/src/main/webapp/WEB-INF/sun-web.xml
deleted file mode 100644
index ba2d6f2..0000000
--- a/admin.web/src/main/webapp/WEB-INF/sun-web.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server 9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
-<sun-web-app error-url="/faces/error.xhtml">
- <context-root>/MySportsAdmin</context-root>
- <class-loader delegate="true" />
- <jsp-config>
- <property name="keepgenerated" value="true" />
- </jsp-config>
-</sun-web-app>
diff --git a/admin.web/src/main/webapp/WEB-INF/template.xhtml b/admin.web/src/main/webapp/WEB-INF/template.xhtml
deleted file mode 100644
index d5605a7..0000000
--- a/admin.web/src/main/webapp/WEB-INF/template.xhtml
+++ /dev/null
@@ -1,41 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"
- xmlns:f="http://java.sun.com/jsf/core"
- xmlns:h="http://java.sun.com/jsf/html"
- xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:fmt="http://java.sun.com/jstl/fmt">
-<head>
-<title><ui:insert name="title" /></title>
-
-<style type="text/css" media="all">
-@import "#{request.contextPath}/default.css";
-</style>
-</head>
-<body>
- <f:view>
- <div class="message-box">
- <div class="header">
- <div align="right">
- <img src="#{request.contextPath}/images/mysports.png"></img>
- </div>
- <h1>
- <ui:insert name="title" />
- </h1>
- </div>
- <div class="body">
- <table width="100%">
- <tr>
- <td height="400"><ui:insert name="body" /></td>
- </tr>
- </table>
- <hr />
- <div align="center">
- <a href="http://www.eclipse.org/eclipselink"><h:graphicImage
- url="#{request.contextPath}/images/eclipselink.png" alt="EclipseLink" /> </a>
- </div>
- </div>
- </div>
- </f:view>
-</body>
-</html>
diff --git a/admin.web/src/main/webapp/WEB-INF/web.xml b/admin.web/src/main/webapp/WEB-INF/web.xml
deleted file mode 100644
index 3946298..0000000
--- a/admin.web/src/main/webapp/WEB-INF/web.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0">
- <context-param>
- <param-name>javax.faces.CONFIG_FILES</param-name>
- <param-value>/WEB-INF/faces-config.xml</param-value>
- </context-param>
-
- <display-name>MySports Admin</display-name>
-
- <welcome-file-list>
- <welcome-file>faces/index.xhtml</welcome-file>
- </welcome-file-list>
-
- <servlet>
- <servlet-name>Faces Servlet</servlet-name>
- <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
- <load-on-startup>1</load-on-startup>
- </servlet>
- <servlet-mapping>
- <servlet-name>Faces Servlet</servlet-name>
- <url-pattern>/faces/*</url-pattern>
- </servlet-mapping>
-
- <servlet>
- <servlet-name>JAX-RS Servlet</servlet-name>
- <servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class>
- <init-param>
- <param-name>com.sun.jersey.config.property.packages</param-name>
- <param-value>eclipselink.example.mysports.admin.jaxrs</param-value>
- </init-param>
- <load-on-startup>2</load-on-startup>
- </servlet>
- <servlet-mapping>
- <servlet-name>JAX-RS Servlet</servlet-name>
- <url-pattern>/rest/*</url-pattern>
- </servlet-mapping>
-
-</web-app> \ No newline at end of file
diff --git a/admin.web/src/main/webapp/WEB-INF/weblogic.xml b/admin.web/src/main/webapp/WEB-INF/weblogic.xml
deleted file mode 100644
index 799e995..0000000
--- a/admin.web/src/main/webapp/WEB-INF/weblogic.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<wls:weblogic-web-app xmlns:wls="http://xmlns.oracle.com/weblogic/weblogic-web-app" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd http://xmlns.oracle.com/weblogic/weblogic-web-app http://xmlns.oracle.com/weblogic/weblogic-web-app/1.4/weblogic-web-app.xsd">
- <wls:context-root>admin.web</wls:context-root>
-</wls:weblogic-web-app> \ No newline at end of file
diff --git a/admin.web/src/main/webapp/about.xhtml b/admin.web/src/main/webapp/about.xhtml
deleted file mode 100644
index 751ae93..0000000
--- a/admin.web/src/main/webapp/about.xhtml
+++ /dev/null
@@ -1,14 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml"
- xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:h="http://java.sun.com/jsf/html"
- xmlns:f="http://java.sun.com/jsf/core">
-
-<ui:composition template="/WEB-INF/template.xhtml">
- <ui:define name="title">My Sports Admin: About</ui:define>
- <ui:define name="body">
- </ui:define>
-</ui:composition>
-</html>
diff --git a/admin.web/src/main/webapp/default.css b/admin.web/src/main/webapp/default.css
deleted file mode 100644
index 7956bf6..0000000
--- a/admin.web/src/main/webapp/default.css
+++ /dev/null
@@ -1,93 +0,0 @@
-body {
- background-color: #D8DCE0;
- font-family: Tahoma;
- font-size: 14px;
-}
-
-div.message-box>div.header>h1 {
- font-family: Tahoma;
- color: #fff;
- font-size: 18px;
-}
-
-h1 {
- color: #3C5F87;
- font-family: Tahoma;
- font-size: 18px;
-}
-
-div.message-box {
- padding: 0;
- margin: 40px;
- width: 90%;
-}
-
-div.message-box>div.header {
- background-color: #3C5F87;
- -moz-border-radius: 5px 5px 0 0;
- -webkit-border-radius: 5px 5px 0 0;
- padding: 10px 20px;
- position: relative;
-}
-
-div.message-box>div.header>a {
- position: absolute;
- right: 20px;
- background: url(images/mysports.png) no-repeat;
- display: block;
-}
-
-div.message-box>div.body {
- padding: 10px 20px;
- background-color: #fff;
- -moz-border-radius: 0 0 5px 5px;
- -webkit-border-radius: 0 0 5px 5px;
-}
-
-table.borders {
- border: 1% solid #BDB76B;
-}
-
-TR {
- text-align: left;
- vertical-align: top;
-}
-
-TH {
- font-family: Arial, Helvetica, sans-serif;
- font-size: 11pt;
- color: #000000;
- font-weight: bold;
-}
-
-TD {
- font-family: Arial, Helvetica, sans-serif;
- font-size: 11pt;
- color: #000000;
-}
-
-table.pretty {
- background: whitesmoke;
- border-collapse: collapse;
-}
-
-table.pretty th,table.pretty td {
- border: 1px silver solid;
- padding: 0.2em;
- font-size: 10pt;
-}
-
-table.pretty th {
- background: #3C5F87;
- text-align: left;
- color: white;
-}
-
-table.pretty caption {
- margin-left: inherit;
- margin-right: inherit;
-}
-
-table.accent {
- background: brown;
-} \ No newline at end of file
diff --git a/admin.web/src/main/webapp/images/bg_button_a.gif b/admin.web/src/main/webapp/images/bg_button_a.gif
deleted file mode 100644
index c8e740d..0000000
--- a/admin.web/src/main/webapp/images/bg_button_a.gif
+++ /dev/null
Binary files differ
diff --git a/admin.web/src/main/webapp/images/bg_button_span.gif b/admin.web/src/main/webapp/images/bg_button_span.gif
deleted file mode 100644
index 7da2e19..0000000
--- a/admin.web/src/main/webapp/images/bg_button_span.gif
+++ /dev/null
Binary files differ
diff --git a/admin.web/src/main/webapp/images/eclipselink.png b/admin.web/src/main/webapp/images/eclipselink.png
deleted file mode 100644
index 55b2a2f..0000000
--- a/admin.web/src/main/webapp/images/eclipselink.png
+++ /dev/null
Binary files differ
diff --git a/admin.web/src/main/webapp/images/mysports.png b/admin.web/src/main/webapp/images/mysports.png
deleted file mode 100644
index 5e9adff..0000000
--- a/admin.web/src/main/webapp/images/mysports.png
+++ /dev/null
Binary files differ
diff --git a/admin.web/src/main/webapp/index.xhtml b/admin.web/src/main/webapp/index.xhtml
deleted file mode 100644
index e186635..0000000
--- a/admin.web/src/main/webapp/index.xhtml
+++ /dev/null
@@ -1,63 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml"
- xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:h="http://java.sun.com/jsf/html"
- xmlns:f="http://java.sun.com/jsf/core">
-
-<ui:composition template="/WEB-INF/template.xhtml">
- <ui:define name="title">My Sports Admin</ui:define>
- <ui:define name="body">
- <div align="center">
- <h:form>
-
- <table width="100%" cellpadding="25">
- <tr>
-
- <td width="50%" align="left">
- <h2>Leagues</h2> <h:dataTable var="league"
- value="#{leagueRepository.sharedLeagues}" border="1" width="100%"
- class="pretty">
- <f:facet name="header">
- Shared Deployments (SaaS)
- </f:facet>
- <h:column>
- <f:facet name="header">League</f:facet>
- <h:commandLink value="#{league.id}" action="#{viewLeague.view}">
- <f:param name="league-id" value="#{league.id}" />
- </h:commandLink>
- </h:column>
- <h:column>
- <f:facet name="header">Name</f:facet>
- <h:outputText value="#{league.name}" />
- </h:column>
- <h:column>
- <f:facet name="header">Data Isolation</f:facet>
- <h:outputText value="#{league.dataIsolation}" />
- </h:column>
- <f:facet name="footer">
- <div align="right">
- <h:commandButton action="#{viewLeague.create}" value="Create"/>
- </div>
- </f:facet>
- </h:dataTable>
- <p />
- <h3>REST Operations</h3>
- <ul>
- <li><h:outputLink
- onclick="window.open('/MySportsAdmin/rest/league', 'popupWindowName', 'dependent=yes, menubar=no, toolbar=no'); return false;"
- value="#">
- <h:outputText value="Shared Leagues" />
- </h:outputLink></li>
- </ul>
- </td>
- </tr>
- </table>
-
-
- </h:form>
- </div>
- </ui:define>
-</ui:composition>
-</html>
diff --git a/admin.web/src/main/webapp/league.xhtml b/admin.web/src/main/webapp/league.xhtml
deleted file mode 100644
index 9200b79..0000000
--- a/admin.web/src/main/webapp/league.xhtml
+++ /dev/null
@@ -1,117 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml"
- xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:h="http://java.sun.com/jsf/html"
- xmlns:f="http://java.sun.com/jsf/core">
-
-
-<ui:composition template="/WEB-INF/template.xhtml">
- <ui:define name="title">My Sports Admin: Hosted League</ui:define>
- <ui:define name="body">
- <h:form>
- <h:commandLink value="Home" action="index?faces-redirect=true" />
- <p />
- <table width="100%">
- <tr>
- <td width="50%" align="center"><h:panelGrid width="500"
- columns="2" border="1" styleClass="pretty">
- <f:facet name="header">
- League Info
- </f:facet>
- <h:outputLabel value="League Id:" />
- <h:panelGroup>
- <h:inputText value="#{viewLeague.league.id}"
- rendered="#{!viewLeague.idReadOnly}" />
- <h:outputText value="#{viewLeague.league.id}"
- rendered="#{viewLeague.idReadOnly}" />
- </h:panelGroup>
- <h:outputLabel value="Name:" />
- <h:inputText value="#{viewLeague.league.name}" size="50" />
- <h:outputLabel value="Logo:" />
- <h:panelGroup>
- <div align="center">
- <h:graphicImage url="#{viewLeague.league.logoUrl}"></h:graphicImage>
- </div>
- URL: <h:inputText value="#{viewLeague.league.logoUrl}" />
- <h:commandButton value="Update" />
- </h:panelGroup>
- <h:outputLabel value="Colour Scheme:" />
- <h:selectOneMenu value="#{viewLeague.league.colourScheme}">
- <f:selectItems value="#{viewLeague.colourSchemes}" />
- </h:selectOneMenu>
- <h:outputLabel value="Shared Deployment" />
- <h:selectBooleanCheckbox value="#{viewLeague.league.shared}" />
-
-
- <h:outputLabel value="Data Isolation:" />
- <h:selectOneRadio layout="pageDirection"
- value="#{viewLeague.league.dataIsolation}">
- <f:selectItems value="#{viewLeague.dataIsolations}" var="di"
- itemLabel="#{di}" itemValue="#{di}" />
- </h:selectOneRadio>
- <h:outputLabel value="Data Source:" />
- <h:selectOneMenu value="#{viewLeague.datasourceName}">
- <f:selectItems value="#{datasourceRepository.datasources}"
- var="ds" itemLabel="#{ds.name}" itemValue="#{ds.name}" />
- </h:selectOneMenu>
- </h:panelGrid>
-
-
-
- <p /> <h:dataTable width="500" styleClass="pretty"
- value="#{viewLeague.playerExtensions}" var="ext">
- <f:facet name="header">
- Player Extensions
- </f:facet>
- <h:column>
- <f:facet name="header">Column</f:facet>
- <h:outputLabel value="#{ext.column}" />
- </h:column>
- <h:column>
- <f:facet name="header">Type</f:facet>
- <h:outputLabel value="#{ext.javaType}" />
- </h:column>
- <h:column>
- <f:facet name="header">Name</f:facet>
- <h:inputText value="#{ext.name}" rendered="#{ext.writeable}" />
- <h:outputLabel value="#{ext.name}" rendered="#{!ext.writeable}" />
- </h:column>
- </h:dataTable>
- <p /></td>
-
- <td width="50%" valign="top"><h:commandButton value="Apply"
- action="#{viewLeague.apply}" /> <h:commandButton value="Cancel"
- action="#{viewLeague.cancel}" /> <h:commandButton value="Delete"
- action="#{viewLeague.delete}" />
-
- <h2>
- <h:outputLabel value="REST Operations" />
- </h2>
- <ul>
- <li><h:outputLink
- onclick="window.open('/MySportsAdmin/rest/league/#{viewLeague.league.id}.css', 'popupWindowName', 'dependent=yes, menubar=no, toolbar=no'); return false;"
- value="#">
- <h:outputText value="CSS" />
- </h:outputLink></li>
- <li><h:outputLink
- onclick="window.open('/MySportsAdmin/rest/league/#{viewLeague.league.id}/orm', 'popupWindowName', 'dependent=yes, menubar=no, toolbar=no'); return false;"
- value="#">
- <h:outputText
- value="Object-Relational
- Overrides and Extensions" />
- </h:outputLink></li>
- <li><h:outputLink
- onclick="window.open('/MySportsAdmin#{viewLeague.league.logoUrl}', 'popupWindowName', 'dependent=yes, menubar=no, toolbar=no'); return false;"
- value="#">
- <h:outputText value="Logo: #{viewLeague.league.logoUrl}" />
- </h:outputLink></li>
- </ul></td>
- </tr>
- </table>
-
- </h:form>
- </ui:define>
-</ui:composition>
-</html>
diff --git a/admin.web/src/main/webapp/logos/hthl.png b/admin.web/src/main/webapp/logos/hthl.png
deleted file mode 100644
index 2ce522d..0000000
--- a/admin.web/src/main/webapp/logos/hthl.png
+++ /dev/null
Binary files differ
diff --git a/admin.web/src/main/webapp/logos/kfl.png b/admin.web/src/main/webapp/logos/kfl.png
deleted file mode 100644
index 806e9b0..0000000
--- a/admin.web/src/main/webapp/logos/kfl.png
+++ /dev/null
Binary files differ
diff --git a/admin.web/src/main/webapp/logos/osl.png b/admin.web/src/main/webapp/logos/osl.png
deleted file mode 100644
index 0315dfa..0000000
--- a/admin.web/src/main/webapp/logos/osl.png
+++ /dev/null
Binary files differ
diff --git a/admin.web/src/main/webapp/xsds/leagues.xsd b/admin.web/src/main/webapp/xsds/leagues.xsd
deleted file mode 100644
index 8f3c566..0000000
--- a/admin.web/src/main/webapp/xsds/leagues.xsd
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
-
- <xs:element name="leagues">
- <xs:complexType>
- <xs:sequence>
- <xs:element ref="league" minOccurs="0" maxOccurs="unbounded"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
-
- <xs:element name="league">
- <xs:complexType>
- <xs:simpleContent>
- <xs:extension base="xs:string">
- <xs:attribute name="id" type="xs:string"/>
- </xs:extension>
- </xs:simpleContent>
- </xs:complexType>
-
- </xs:element>
-
-</xs:schema> \ No newline at end of file
diff --git a/admin.web/src/test/java/eclipselink/example/mysports/admin/test/CreateOrmXML.java b/admin.web/src/test/java/eclipselink/example/mysports/admin/test/CreateOrmXML.java
deleted file mode 100644
index 42a207d..0000000
--- a/admin.web/src/test/java/eclipselink/example/mysports/admin/test/CreateOrmXML.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * dclarke - EclipseLink 2.3 - MySports Demo Bug 344608
- ******************************************************************************/
-package eclipselink.example.mysports.admin.test;
-
-import javax.persistence.EntityManager;
-import javax.persistence.EntityManagerFactory;
-import javax.persistence.Persistence;
-
-import org.eclipse.persistence.internal.jpa.metadata.xml.XMLEntityMappings;
-import org.eclipse.persistence.internal.jpa.metadata.xml.XMLEntityMappingsWriter;
-import org.junit.Test;
-
-import eclipselink.example.mysports.admin.services.MappingsLoader;
-import eclipselink.example.mysports.admin.services.test.AdminPersistenceTesting;
-
-public class CreateOrmXML {
-
- @Test
- public void createEmpty() {
- XMLEntityMappings mappings = new XMLEntityMappings();
- mappings.setVersion("2.3");
-
- XMLEntityMappingsWriter.write(mappings, System.out);
- }
-
- @Test
- public void createFromDB() {
- EntityManagerFactory emf = Persistence.createEntityManagerFactory("MySportsAdmin", AdminPersistenceTesting.get());
- EntityManager em = emf.createEntityManager();
-
- try {
- String xml = MappingsLoader.getORMapping(em, "OSL");
- System.out.println(xml);
-
- xml = MappingsLoader.getORMapping(em, "HTHL");
- System.out.println(xml);
- } finally {
- em.close();
- emf.close();
- }
- }
-
-}
diff --git a/admin.web/src/test/java/eclipselink/example/mysports/admin/test/CreateStyles.java b/admin.web/src/test/java/eclipselink/example/mysports/admin/test/CreateStyles.java
deleted file mode 100644
index 27fbac6..0000000
--- a/admin.web/src/test/java/eclipselink/example/mysports/admin/test/CreateStyles.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/**
- * *****************************************************************************
- * Copyright (c) 2010-2013 Oracle. All rights reserved. This program and the
- * accompanying materials are made available under the terms of the Eclipse
- * Public License v1.0 and Eclipse Distribution License v. 1.0 which accompanies
- * this distribution. The Eclipse Public License is available at
- * http://www.eclipse.org/legal/epl-v10.html and the Eclipse Distribution
- * License is available at http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors: dclarke - EclipseLink 2.3 - MySports Demo Bug 344608
- *****************************************************************************
- */
-package eclipselink.example.mysports.admin.test;
-
-import java.io.InputStream;
-import java.io.StringWriter;
-
-import javax.persistence.EntityManager;
-import javax.persistence.EntityManagerFactory;
-import javax.persistence.Persistence;
-
-import org.eclipse.persistence.jpa.JpaHelper;
-import org.eclipse.persistence.sessions.server.Server;
-import org.junit.AfterClass;
-import org.junit.Assert;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-import eclipselink.example.mysports.admin.model.Style;
-import eclipselink.example.mysports.admin.services.test.AdminPersistenceTesting;
-
-/**
- * Create initial styles.
- *
- * @author dclarke
- * @since EclipseLink 2.3.0
- */
-public class CreateStyles {
-
- private static EntityManagerFactory emf;
-
- @Test
- public void verifySession() {
- Assert.assertNotNull(emf);
-
- Server session = JpaHelper.getServerSession(emf);
- Assert.assertNotNull(session);
- Assert.assertTrue(session.isServerSession());
- }
-
- @Test
- public void createStyles() throws Exception {
- EntityManager em = emf.createEntityManager();
-
- try {
- em.getTransaction().begin();
-
- em.persist(new Style("default", load("default")));
- em.persist(new Style("red", load("red")));
- em.persist(new Style("black", load("black")));
- em.persist(new Style("blue", load("blue")));
- em.persist(new Style("green", load("green")));
-
- em.getTransaction().commit();
- } finally {
- em.close();
- }
- }
-
- @BeforeClass
- public static void createEMF() {
- emf = Persistence.createEntityManagerFactory("MySportsAdmin", AdminPersistenceTesting.get());
-
- EntityManager em = emf.createEntityManager();
- try {
- em.getTransaction().begin();
- em.createQuery("DELETE FROM Style").executeUpdate();
- em.getTransaction().commit();
- } finally {
- em.close();
- }
- }
-
- @AfterClass
- public static void closeEMF() {
- emf.close();
- }
-
- private String load(String name) throws Exception {
- InputStream in = Thread.currentThread().getContextClassLoader().getResourceAsStream("example/mysports/tests/admin/style/" + name + ".css");
- StringWriter writer = new StringWriter(in.available());
- for (int ch = in.read(); ch >= 0; ch = in.read()) {
- writer.write(ch);
- }
- in.close();
- return writer.toString();
- }
-}
diff --git a/admin.web/src/test/java/eclipselink/example/mysports/admin/test/CreateXMLBindingsTests.java b/admin.web/src/test/java/eclipselink/example/mysports/admin/test/CreateXMLBindingsTests.java
deleted file mode 100644
index 234fde3..0000000
--- a/admin.web/src/test/java/eclipselink/example/mysports/admin/test/CreateXMLBindingsTests.java
+++ /dev/null
@@ -1,17 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * dclarke - EclipseLink 2.3 - MySports Demo Bug 344608
- ******************************************************************************/
-package eclipselink.example.mysports.admin.test;
-
-public class CreateXMLBindingsTests {
- // TODO
-}
diff --git a/admin.web/src/test/java/eclipselink/example/mysports/admin/test/LeagueJAXBTests.java b/admin.web/src/test/java/eclipselink/example/mysports/admin/test/LeagueJAXBTests.java
deleted file mode 100644
index 18dbd0f..0000000
--- a/admin.web/src/test/java/eclipselink/example/mysports/admin/test/LeagueJAXBTests.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * dclarke - EclipseLink 2.3 - MySports Demo Bug 344608
- ******************************************************************************/
-package eclipselink.example.mysports.admin.test;
-
-import java.util.List;
-
-import javax.persistence.EntityManager;
-import javax.persistence.EntityManagerFactory;
-import javax.persistence.Persistence;
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Marshaller;
-
-import org.junit.AfterClass;
-import org.junit.Assert;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-import eclipselink.example.mysports.admin.jaxrs.MySportsContextResolver;
-import eclipselink.example.mysports.admin.model.HostedLeague;
-import eclipselink.example.mysports.admin.services.test.AdminPersistenceTesting;
-
-/**
- *
- * @author dclarke
- * @since EclipseLink 2.3.0
- */
-public class LeagueJAXBTests {
-
- private JAXBContext jaxbContext;
-
- private static EntityManagerFactory emf;
-
- @Test
- public void verifyCreateContext() throws Exception {
- JAXBContext jc = getJaxbContext();
-
- Assert.assertNotNull(jc);
- }
-
- @Test
- public void verifyMarshallHostedLeagues() throws Exception {
- EntityManager em = emf.createEntityManager();
-
- List<HostedLeague> leagues = em.createNamedQuery("HostedLeague.findAll", HostedLeague.class).getResultList();
-
- Marshaller marshaller = getJaxbContext().createMarshaller();
- marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
-
- for (HostedLeague hl: leagues) {
- hl.setUri("TEST");
- marshaller.marshal(hl, System.out);
- }
- }
-
- private JAXBContext getJaxbContext() throws JAXBException {
- if (this.jaxbContext == null) {
- this.jaxbContext = MySportsContextResolver.createContext();
- }
- return this.jaxbContext;
- }
-
- @BeforeClass
- public static void createEMF() {
- emf = Persistence.createEntityManagerFactory("MySportsAdmin", AdminPersistenceTesting.get());
- }
-
- @AfterClass
- public static void closeEMF() {
- if (emf != null && emf.isOpen()) {
- emf.close();
- }
- emf = null;
- }
-}
diff --git a/admin.web/src/test/java/eclipselink/example/mysports/admin/test/SchemaGenerator.java b/admin.web/src/test/java/eclipselink/example/mysports/admin/test/SchemaGenerator.java
deleted file mode 100644
index c53334d..0000000
--- a/admin.web/src/test/java/eclipselink/example/mysports/admin/test/SchemaGenerator.java
+++ /dev/null
@@ -1,33 +0,0 @@
-package eclipselink.example.mysports.admin.test;
-
-import java.io.File;
-import java.io.IOException;
-
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.SchemaOutputResolver;
-import javax.xml.transform.Result;
-import javax.xml.transform.stream.StreamResult;
-
-import org.junit.Test;
-
-import eclipselink.example.mysports.admin.jaxrs.MySportsContextResolver;
-
-public class SchemaGenerator {
-
- @Test
- public void generateLeaguesXSD() throws Exception {
- JAXBContext context = MySportsContextResolver.createContext();
- SchemaOutputResolver sor = new MySchemaOutputResolver();
- context.generateSchema(sor);
- }
-
- private class MySchemaOutputResolver extends SchemaOutputResolver {
-
- public Result createOutput(String namespaceURI, String suggestedFileName) throws IOException {
- File file = new File(suggestedFileName);
- StreamResult result = new StreamResult(file);
- result.setSystemId(file.toURI().toURL().toString());
- return result;
- }
-
- }}
diff --git a/application/.classpath b/application/.classpath
deleted file mode 100644
index c99cf86..0000000
--- a/application/.classpath
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" output="target/classes" path="src/main/java">
- <attributes>
- <attribute name="optional" value="true"/>
- <attribute name="maven.pomderived" value="true"/>
- </attributes>
- </classpathentry>
- <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
- <attributes>
- <attribute name="maven.pomderived" value="true"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="src" output="target/test-classes" path="src/test/java">
- <attributes>
- <attribute name="optional" value="true"/>
- <attribute name="maven.pomderived" value="true"/>
- </attributes>
- </classpathentry>
- <classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
- <attributes>
- <attribute name="maven.pomderived" value="true"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6">
- <attributes>
- <attribute name="maven.pomderived" value="true"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
- <attributes>
- <attribute name="maven.pomderived" value="true"/>
- <attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="output" path="target/classes"/>
-</classpath>
diff --git a/application/.project b/application/.project
deleted file mode 100644
index 4f774b4..0000000
--- a/application/.project
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>MySports Application</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.wst.common.project.facet.core.builder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.wst.validation.validationbuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.m2e.core.maven2Builder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
- <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.m2e.core.maven2Nature</nature>
- <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
- <nature>org.eclipse.wst.jsdt.core.jsNature</nature>
- </natures>
-</projectDescription>
diff --git a/application/.settings/.jsdtscope b/application/.settings/.jsdtscope
deleted file mode 100644
index b46b920..0000000
--- a/application/.settings/.jsdtscope
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src/main/webapp"/>
- <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.WebProject">
- <attributes>
- <attribute name="hide" value="true"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/>
- <classpathentry kind="output" path=""/>
-</classpath>
diff --git a/application/.settings/org.eclipse.jdt.core.prefs b/application/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 107056a..0000000
--- a/application/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,12 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.6
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
-org.eclipse.jdt.core.compiler.source=1.6
diff --git a/application/.settings/org.eclipse.jpt.core.prefs b/application/.settings/org.eclipse.jpt.core.prefs
deleted file mode 100644
index f225875..0000000
--- a/application/.settings/org.eclipse.jpt.core.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jpt.core.platform=eclipselink2_4
-org.eclipse.jpt.jpa.core.discoverAnnotatedClasses=false
-org.eclipse.jpt.jpa.core.metamodelSourceFolderName=src/main/java
-problem.PROJECT_INACTIVE_CONNECTION=info
-problem.PROJECT_NO_CONNECTION=info
-workspace_preferences_overriden=true
diff --git a/application/.settings/org.eclipse.m2e.core.prefs b/application/.settings/org.eclipse.m2e.core.prefs
deleted file mode 100644
index 2af59a6..0000000
--- a/application/.settings/org.eclipse.m2e.core.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-activeProfiles=mysql
-eclipse.preferences.version=1
-resolveWorkspaceProjects=true
-version=1
diff --git a/application/.settings/org.eclipse.wst.common.component b/application/.settings/org.eclipse.wst.common.component
deleted file mode 100644
index 0a2eaba..0000000
--- a/application/.settings/org.eclipse.wst.common.component
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
- <wb-module deploy-name="MySports Application">
- <wb-resource deploy-path="/WEB-INF/web.xml" source-path="/src/main/webapp/WEB-INF/web.xml"/>
- <wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
- <wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
- <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
- <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
- <dependent-module archiveName="persistence-2.4.2-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/MySports Persistence/MySports Persistence">
- <dependency-type>uses</dependency-type>
- </dependent-module>
- <property name="java-output-path" value="/MySports Application/target/classes"/>
- <property name="context-root" value="application"/>
- </wb-module>
-</project-modules>
diff --git a/application/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml b/application/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml
deleted file mode 100644
index d564e65..0000000
--- a/application/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<root>
- <facet id="jpt.jpa">
- <node name="libprov">
- <attribute name="provider-id" value="jpa-no-op-library-provider"/>
- </node>
- </facet>
- <facet id="jst.jaxrs">
- <node name="libprov">
- <attribute name="provider-id" value="jaxrs-no-op-library-provider"/>
- </node>
- </facet>
- <facet id="jst.jsf">
- <node name="libprov">
- <attribute name="provider-id" value="jsf-no-op-library-provider"/>
- </node>
- </facet>
-</root>
diff --git a/application/.settings/org.eclipse.wst.common.project.facet.core.xml b/application/.settings/org.eclipse.wst.common.project.facet.core.xml
deleted file mode 100644
index 6fa65b6..0000000
--- a/application/.settings/org.eclipse.wst.common.project.facet.core.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<faceted-project>
- <fixed facet="wst.jsdt.web"/>
- <installed facet="jst.web" version="3.0"/>
- <installed facet="wst.jsdt.web" version="1.0"/>
- <installed facet="java" version="1.6"/>
- <installed facet="jpt.jpa" version="2.0"/>
- <installed facet="jst.jaxrs" version="1.1"/>
- <installed facet="jst.jsf" version="2.0"/>
-</faceted-project>
diff --git a/application/.settings/org.eclipse.wst.jsdt.ui.superType.container b/application/.settings/org.eclipse.wst.jsdt.ui.superType.container
deleted file mode 100644
index 3bd5d0a..0000000
--- a/application/.settings/org.eclipse.wst.jsdt.ui.superType.container
+++ /dev/null
@@ -1 +0,0 @@
-org.eclipse.wst.jsdt.launching.baseBrowserLibrary \ No newline at end of file
diff --git a/application/.settings/org.eclipse.wst.jsdt.ui.superType.name b/application/.settings/org.eclipse.wst.jsdt.ui.superType.name
deleted file mode 100644
index 05bd71b..0000000
--- a/application/.settings/org.eclipse.wst.jsdt.ui.superType.name
+++ /dev/null
@@ -1 +0,0 @@
-Window \ No newline at end of file
diff --git a/application/eclipse-config/TestCreateTenantEMF.launch b/application/eclipse-config/TestCreateTenantEMF.launch
deleted file mode 100644
index 1bf4cf0..0000000
--- a/application/eclipse-config/TestCreateTenantEMF.launch
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.jdt.junit.launchconfig">
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/application/src/test/java/eclipselink/example/mysports/application/test/TestCreateTenantEMF.java"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
-<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
-<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
-<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
-<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="eclipselink.example.mysports.application.test.TestCreateTenantEMF"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="application"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-javaagent:${system_property:user.home}/.m2/repository/eclipselink/example/mysports/persistence/2.4.2-SNAPSHOT/persistence-2.4.2-SNAPSHOT.jar"/>
-</launchConfiguration>
diff --git a/application/eclipse-config/TestExampleLeagues (1).launch b/application/eclipse-config/TestExampleLeagues (1).launch
deleted file mode 100644
index 40e46d5..0000000
--- a/application/eclipse-config/TestExampleLeagues (1).launch
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.jdt.junit.launchconfig">
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/MySports Application/src/test/java/eclipselink/example/mysports/application/test/TestExampleLeagues.java"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
-<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
-<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
-<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
-<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
-<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.m2e.launchconfig.classpathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="eclipselink.example.mysports.application.test.TestExampleLeagues"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="MySports Application"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.m2e.launchconfig.sourcepathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-javaagent:${system_property:user.home}/.m2/repository/org/eclipse/persistence/eclipselink/2.4.2-SNAPSHOT/eclipselink-2.4.2-SNAPSHOT.jar"/>
-</launchConfiguration>
diff --git a/application/eclipse-config/TestExampleLeagues.launch b/application/eclipse-config/TestExampleLeagues.launch
deleted file mode 100644
index 48ee848..0000000
--- a/application/eclipse-config/TestExampleLeagues.launch
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.jdt.junit.launchconfig">
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/application/src/test/java/eclipselink/example/mysports/application/test/TestExampleLeagues.java"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
-<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
-<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
-<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
-<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="eclipselink.example.mysports.application.test.TestExampleLeagues"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="application"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-javaagent:${system_property:user.home}/.m2/repository/eclipselink/example/mysports/persistence/2.4.2-SNAPSHOT/persistence-2.4.2-SNAPSHOT.jar"/>
-</launchConfiguration>
diff --git a/application/eclipse-config/TestModelAndMappings.launch b/application/eclipse-config/TestModelAndMappings.launch
deleted file mode 100644
index e3f8b0f..0000000
--- a/application/eclipse-config/TestModelAndMappings.launch
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.jdt.junit.launchconfig">
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/application/src/test/java/eclipselink/example/mysports/application/test/TestModelAndMappings.java"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
-<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
-<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
-<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
-<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="eclipselink.example.mysports.application.test.TestModelAndMappings"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="application"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-javaagent:${system_property:user.home}/.m2/repository/eclipselink/example/mysports/persistence/2.4.2-SNAPSHOT/persistence-2.4.2-SNAPSHOT.jar"/>
-</launchConfiguration>
diff --git a/application/eclipse-config/TestSchemaCreation (1).launch b/application/eclipse-config/TestSchemaCreation (1).launch
deleted file mode 100644
index 768fa0c..0000000
--- a/application/eclipse-config/TestSchemaCreation (1).launch
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.jdt.junit.launchconfig">
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/MySports Application/src/test/java/eclipselink/example/mysports/application/test/TestSchemaCreation.java"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
-<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
-<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
-<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
-<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
-<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.m2e.launchconfig.classpathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="eclipselink.example.mysports.application.test.TestSchemaCreation"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="MySports Application"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.m2e.launchconfig.sourcepathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-javaagent:${system_property:user.home}/.m2/repository/org/eclipse/persistence/eclipselink/2.4.2-SNAPSHOT/eclipselink-2.4.2-SNAPSHOT.jar"/>
-</launchConfiguration>
diff --git a/application/pom.xml b/application/pom.xml
deleted file mode 100644
index 79f86cf..0000000
--- a/application/pom.xml
+++ /dev/null
@@ -1,184 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>eclipselink.example.mysports</groupId>
- <artifactId>bom</artifactId>
- <version>2.4.2-SNAPSHOT</version>
- <relativePath>..</relativePath>
- </parent>
-
- <artifactId>application</artifactId>
- <packaging>war</packaging>
- <name>MySports WebApp</name>
-
- <dependencies>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>persistence</artifactId>
- <version>${project.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.eclipse.persistence</groupId>
- <artifactId>eclipselink</artifactId>
- <version>${eclipselink.version}</version>
- <exclusions>
- <exclusion>
- <artifactId>commonj.sdo</artifactId>
- <groupId>commonj.sdo</groupId>
- </exclusion>
- </exclusions>
- <scope>provided</scope>
- </dependency>
-
- <!-- EclipseLink JPA-RS Web Fragment -->
- <dependency>
- <groupId>org.eclipse.persistence</groupId>
- <artifactId>org.eclipse.persistence.jpars</artifactId>
- <version>${eclipselink.version}</version>
- </dependency>
-
-
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.11</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>admin.services</artifactId>
- <version>${project.version}</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>admin.services</artifactId>
- <version>${project.version}</version>
- <type>test-jar</type>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.derby</groupId>
- <artifactId>derby</artifactId>
- <version>10.9.1.0</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>javax</groupId>
- <artifactId>javaee-api</artifactId>
- <version>6.0</version>
- <scope>provided</scope>
- </dependency>
-
- <dependency>
- <groupId>javax.faces</groupId>
- <artifactId>jsf-impl</artifactId>
- <version>1.2_15</version>
- <scope>provided</scope>
- </dependency>
-
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>persistence</artifactId>
- <version>${project.version}</version>
- <type>test-jar</type>
- <scope>test</scope>
- </dependency>
-
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>3.0</version>
- <configuration>
- <source>1.6</source>
- <target>1.6</target>
- </configuration>
- </plugin>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-war-plugin</artifactId>
- <version>2.3</version>
- <configuration>
- <webXml>src/main/webapp/WEB-INF/web.xml</webXml>
- </configuration>
- </plugin>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <version>2.12.4</version>
- <configuration>
- <argLine>-javaagent:../persistence/target/persistence-${eclipselink.version}.jar</argLine>
- <systemProperties>
- <property>
- <name>derby.stream.error.file</name>
- <value>target/derby.log</value>
- </property>
- </systemProperties>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
- <profiles>
- <profile>
- <id>mysql</id>
- <activation>
- <property>
- <name>mysql</name>
- </property>
- </activation>
- <dependencies>
- <dependency>
- <groupId>mysql</groupId>
- <artifactId>mysql-connector-java</artifactId>
- <version>5.1.22</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <version>2.12.4</version>
- <configuration>
- <systemProperties>
- <property>
- <name>javax.persistence.jdbc.url</name>
- <value>jdbc:mysql://localhost:3306/mysports</value>
- </property>
- <property>
- <name>javax.persistence.jdbc.driver</name>
- <value>com.mysql.jdbc.Driver</value>
- </property>
- <property>
- <name>javax.persistence.jdbc.user</name>
- <value>mysports</value>
- </property>
- <property>
- <name>javax.persistence.jdbc.password</name>
- <value>mysports</value>
- </property>
- </systemProperties>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
-
-</project>
diff --git a/application/src/main/java/eclipselink/example/mysports/application/MySportsConfig.java b/application/src/main/java/eclipselink/example/mysports/application/MySportsConfig.java
deleted file mode 100644
index 9e2f5ec..0000000
--- a/application/src/main/java/eclipselink/example/mysports/application/MySportsConfig.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- * *****************************************************************************
- * Copyright (c) 2010-2013 Oracle. All rights reserved. This program and the
- * accompanying materials are made available under the terms of the Eclipse
- * Public License v1.0 and Eclipse Distribution License v. 1.0 which accompanies
- * this distribution. The Eclipse Public License is available at
- * http://www.eclipse.org/legal/epl-v10.html and the Eclipse Distribution
- * License is available at http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors: dclarke - EclipseLink 2.3 - MySports Demo Bug 344608
- *****************************************************************************
- */
-package eclipselink.example.mysports.application;
-
-import org.eclipse.persistence.annotations.Multitenant;
-
-import eclipselink.example.mysports.application.services.LeagueRepository;
-
-/**
- * Responsible for managing application context configuration. For now this is
- * hard coded for local deployment but will be made more flexible in the future.
- *
- * @author dclarke
- * @since EclipseLink 2.3.0
- */
-public class MySportsConfig {
-
- /**
- * Context property used to specify the tenant configuration within the
- * persistence unit. A value for this property must be available within the
- * persistence context to access the {@link Multitenant} types.
- */
- public static final String LEAGUE_CONTEXT = "league";
-
- /**
- * Template persistence unit name. This is the base PU which is used as a
- * template for each tenant's persistence unit.
- *
- * @see LeagueRepository#setLeagueId(String, java.util.Map) for details of
- * how the PUs are created from template.
- */
- public static final String PU_NAME = "mysports";
-
-}
diff --git a/application/src/main/java/eclipselink/example/mysports/application/admin/AdminMetadataSource.java b/application/src/main/java/eclipselink/example/mysports/application/admin/AdminMetadataSource.java
deleted file mode 100644
index 76f6ec6..0000000
--- a/application/src/main/java/eclipselink/example/mysports/application/admin/AdminMetadataSource.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * dclarke - EclipseLink 2.3 - MySports Demo Bug 344608
- ******************************************************************************/
-package eclipselink.example.mysports.application.admin;
-
-import static eclipselink.example.mysports.application.MySportsConfig.LEAGUE_CONTEXT;
-
-import java.util.Map;
-
-import org.eclipse.persistence.config.PersistenceUnitProperties;
-import org.eclipse.persistence.exceptions.ValidationException;
-import org.eclipse.persistence.internal.jpa.metadata.xml.XMLEntityMappings;
-import org.eclipse.persistence.jpa.metadata.MetadataSource;
-import org.eclipse.persistence.jpa.metadata.XMLMetadataSource;
-import org.eclipse.persistence.logging.SessionLog;
-
-/**
- * {@link MetadataSource} which using REST calls to retrieve the league (tenant)
- * specific mappings from the MySports Admin application.
- * <p>
- * If the Admin application can not be reached a warning message is logged and
- * the contained 'local-eclipselink-orm.xml' is returned.
- *
- * @author dclarke
- * @since EclipseLink 2.3.0
- */
-public class AdminMetadataSource extends XMLMetadataSource {
-
- private AdminServerConnector connector;
-
- public AdminMetadataSource(AdminServerConnector connector) {
- super();
- this.connector = connector;
- }
-
- AdminServerConnector getConnector() {
- return connector;
- }
-
- /**
- * Default local resource. Only used when admin service cannot be accessed.
- */
- public static final String LOCAL_ECLIPSELINK_ORM = "META-INF/local-eclipselink-orm.xml";
-
- @Override
- public XMLEntityMappings getEntityMappings(Map<String, Object> properties, ClassLoader classLoader, SessionLog log) {
- String leagueId = (String) properties.get(LEAGUE_CONTEXT);
-
- if (leagueId != null) {
- if (connector != null) {
- properties.put(PersistenceUnitProperties.METADATA_SOURCE_XML_URL, getConnector().getOrmURL(leagueId));
- }
- try {
- return super.getEntityMappings(properties, classLoader, log);
- } catch (ValidationException ve) {
- } catch (NullPointerException npe) {
-
- }
-
- properties.remove(PersistenceUnitProperties.METADATA_SOURCE_XML_URL);
- properties.put(PersistenceUnitProperties.METADATA_SOURCE_XML_FILE, LOCAL_ECLIPSELINK_ORM);
- return super.getEntityMappings(properties, classLoader, log);
- }
- return null;
- }
-
-}
diff --git a/application/src/main/java/eclipselink/example/mysports/application/admin/AdminServerConnector.java b/application/src/main/java/eclipselink/example/mysports/application/admin/AdminServerConnector.java
deleted file mode 100644
index a0996b1..0000000
--- a/application/src/main/java/eclipselink/example/mysports/application/admin/AdminServerConnector.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * dclarke - EclipseLink 2.3 - MySports Demo Bug 344608
- ******************************************************************************/
-package eclipselink.example.mysports.application.admin;
-
-import java.io.IOException;
-import java.io.InputStream;
-
-/**
- * Interface to access the admin server. This abstraction is provided so the
- * runtime can use the default {@link RESTAdminServerConnector} while testing
- * outside the container can provide a local version.
- *
- * @author dclarke
- * @since EclipseLink 2.3.0
- */
-public interface AdminServerConnector {
-
- /**
- * Return the list of leagues (tenants) available.
- */
- HostedLeagues getLeagues();
-
- /**
- * Retrieve the league (name and version) from the admin server.
- */
- League getLeague(String leagueId);
-
- String getOrmURL(String leagueId);
-
- InputStream getCss(String leagueId) throws IOException;
-
- InputStream getLogo(String leagueId) throws IOException;
-
-} \ No newline at end of file
diff --git a/application/src/main/java/eclipselink/example/mysports/application/admin/HostedLeagues.java b/application/src/main/java/eclipselink/example/mysports/application/admin/HostedLeagues.java
deleted file mode 100644
index 596d1b2..0000000
--- a/application/src/main/java/eclipselink/example/mysports/application/admin/HostedLeagues.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * dclarke - EclipseLink 2.3 - MySports Demo Bug 344608
- ******************************************************************************/
-package eclipselink.example.mysports.application.admin;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Represents the list of leagues returned form the Admin service's REST call as
- * an XML document.
- *
- * @author dclarke
- * @since EclipseLink 2.3.0
- */
-public class HostedLeagues {
-
- private List<League> leagues = new ArrayList<League>();
-
- public List<League> getLeagues() {
- return leagues;
- }
-
-}
diff --git a/application/src/main/java/eclipselink/example/mysports/application/admin/League.java b/application/src/main/java/eclipselink/example/mysports/application/admin/League.java
deleted file mode 100644
index 270ec6a..0000000
--- a/application/src/main/java/eclipselink/example/mysports/application/admin/League.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * dclarke - EclipseLink 2.3 - MySports Demo Bug 344608
- ******************************************************************************/
-package eclipselink.example.mysports.application.admin;
-
-
-/**
- * League as defined on the admin server.
- *
- * @author dclarke
- * @since EclipseLink 2.3.0
- */
-public class League {
- private String id;
- private long version;
- private String name;
- private String colourScheme;
- private String logoUrl;
- private String uri;
- private String datasource;
-
- public String getId() {
- return id;
- }
-
- public String getName() {
- return name;
- }
-
- public long getVersion() {
- return version;
- }
-
- public void setId(String id) {
- this.id = id;
- }
-
- public void setVersion(long version) {
- this.version = version;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public String getColourScheme() {
- return colourScheme;
- }
-
- public void setColourScheme(String colourScheme) {
- this.colourScheme = colourScheme;
- }
-
- public String getLogoUrl() {
- return logoUrl;
- }
-
- public void setLogoUrl(String logoUrl) {
- this.logoUrl = logoUrl;
- }
-
- public String getUri() {
- return uri;
- }
-
- public void setUri(String uri) {
- this.uri = uri;
- }
-
- public String getDatasource() {
- return datasource;
- }
-
- public void setDatasource(String datasource) {
- this.datasource = datasource;
- }
-}
diff --git a/application/src/main/java/eclipselink/example/mysports/application/admin/MoxyContextHelper.java b/application/src/main/java/eclipselink/example/mysports/application/admin/MoxyContextHelper.java
deleted file mode 100644
index c3aedb3..0000000
--- a/application/src/main/java/eclipselink/example/mysports/application/admin/MoxyContextHelper.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * dclarke - EclipseLink 2.3 - MySports Demo Bug 344608
- ******************************************************************************/
-package eclipselink.example.mysports.application.admin;
-
-import static org.eclipse.persistence.jaxb.MarshallerProperties.MEDIA_TYPE;
-import static org.eclipse.persistence.jaxb.UnmarshallerProperties.JSON_INCLUDE_ROOT;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Marshaller;
-import javax.xml.bind.Unmarshaller;
-
-import org.eclipse.persistence.jaxb.JAXBContextFactory;
-import org.eclipse.persistence.jaxb.JAXBContextProperties;
-import org.eclipse.persistence.oxm.MediaType;
-
-/**
- * Utility class that provides access to the admin server using JAX-RS calls.
- *
- * @author dclarke
- * @since EclipseLink 2.4
- */
-public class MoxyContextHelper {
-
- /**
- * Cached {@link JAXBContext} for marshaling {@link HostedLeagues} and
- * {@link League} from the admin server requests.
- */
- private static JAXBContext jaxbContext;
-
- public static JAXBContext getContext() throws JAXBException {
- if (jaxbContext == null) {
- Map<String, Object> props = new HashMap<String, Object>(1);
- props.put(JAXBContextProperties.OXM_METADATA_SOURCE, "eclipselink/example/mysports/application/admin/leagues-oxm.xml");
- jaxbContext = JAXBContextFactory.createContext(new Class[] { HostedLeagues.class }, props);
- }
- return jaxbContext;
- }
-
- public static Marshaller createMarshaller(MediaType mediaType) throws JAXBException {
- Marshaller marshaller = getContext().createMarshaller();
- marshaller.setProperty(MEDIA_TYPE, mediaType.getMediaType());
- return marshaller;
- }
-
- public static Unmarshaller createUnmarshaller(MediaType mediaType) throws JAXBException {
- Unmarshaller unmarshaller = getContext().createUnmarshaller();
- unmarshaller.setProperty(MEDIA_TYPE, mediaType.getMediaType());
- unmarshaller.setProperty(JSON_INCLUDE_ROOT, false);
- return unmarshaller;
- }
-
-
-}
diff --git a/application/src/main/java/eclipselink/example/mysports/application/admin/RESTAdminServerConnector.java b/application/src/main/java/eclipselink/example/mysports/application/admin/RESTAdminServerConnector.java
deleted file mode 100644
index 53eef18..0000000
--- a/application/src/main/java/eclipselink/example/mysports/application/admin/RESTAdminServerConnector.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * dclarke - EclipseLink 2.3 - MySports Demo Bug 344608
- ******************************************************************************/
-package eclipselink.example.mysports.application.admin;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.HttpURLConnection;
-import java.net.URL;
-
-import javax.xml.bind.JAXBException;
-
-import org.eclipse.persistence.oxm.MediaType;
-
-/**
- * Utility class that provides access to the admin server using JAX-RS calls.
- *
- * @author dclarke
- * @since EclipseLink 2.3.0
- */
-public class RESTAdminServerConnector implements AdminServerConnector {
-
- /**
- * Default Root URI for the Admin application. Assumed to be hosted on the same container.
- */
- public static final String DEFAULT_ROOT_URI = "http://localhost:7001/mysportsadmin/rest/league";
-
- private String rootURI = DEFAULT_ROOT_URI;
-
- String getRootURI() {
- return rootURI;
- }
-
- void setRootURI(String rootURI) {
- this.rootURI = rootURI;
- }
-
- public HostedLeagues getLeagues() {
- InputStream in = null;
-
- try {
- in = open(null, MediaType.APPLICATION_XML.getMediaType(), null);
- return (HostedLeagues) MoxyContextHelper.createUnmarshaller(MediaType.APPLICATION_XML).unmarshal(in);
- } catch (IOException e) {
- throw new RuntimeException("Failure to retieve Leagues", e);
- } catch (JAXBException e) {
- throw new RuntimeException("Failure to unmarshal Leagues", e);
- } finally {
- if (in != null) {
- try {
- in.close();
- } catch (IOException e) {
- }
- }
- }
- }
-
- public League getLeague(String leagueId) {
- InputStream in = null;
-
- try {
- in = open(leagueId, MediaType.APPLICATION_XML.getMediaType(), null);
- return (League) MoxyContextHelper.createUnmarshaller(org.eclipse.persistence.oxm.MediaType.APPLICATION_XML).unmarshal(in);
- } catch (IOException e) {
- throw new RuntimeException("Failure to retieve League", e);
- } catch (JAXBException e) {
- throw new RuntimeException("Failure to unmarshal League", e);
- } finally {
- if (in != null) {
- try {
- in.close();
- } catch (IOException e) {
- }
- }
- }
- }
-
- /**
- * Construct a URL to access the admin server for a specified league and
- * resource result type.
- *
- * @param leagueId
- * represents an expected league or null if requesting all
- * leagues.
- * @param result
- * result resource type being requested. If null with a valid
- * league identifier then the league is being accessed. If
- * leagueId is null this should be null as well.
- */
- private String buildURL(String leagueId, String result) {
- String urlString = getRootURI();
-
- if (leagueId != null) {
- urlString = urlString + "/" + leagueId;
- }
- if (result != null) {
- urlString = urlString + "/" + result.toLowerCase();
- }
-
- return urlString;
- }
-
- private InputStream open(String leagueId, String mediaType, String result) throws IOException {
- URL url = new URL(buildURL(leagueId, result));
- HttpURLConnection connection = (HttpURLConnection) url.openConnection();
- connection.setRequestProperty("Accept", mediaType);
-
- return connection.getInputStream();
- }
-
- public InputStream getCss(String leagueId) throws IOException {
- return open(leagueId, "text/css", "css");
- }
-
- public String getOrmURL(String leagueId) {
- return buildURL(leagueId, "orm");
- }
-
- public InputStream getLogo(String leagueId) throws IOException {
- return open(leagueId, "?", "logo");
- }
-
-}
diff --git a/application/src/main/java/eclipselink/example/mysports/application/admin/leagues-oxm.xml b/application/src/main/java/eclipselink/example/mysports/application/admin/leagues-oxm.xml
deleted file mode 100644
index 41b6546..0000000
--- a/application/src/main/java/eclipselink/example/mysports/application/admin/leagues-oxm.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0"?>
-<xml-bindings version="2.3"
- xmlns="http://www.eclipse.org/eclipselink/xsds/persistence/oxm"
- package-name="eclipselink.example.mysports.application.admin" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.eclipse.org/eclipselink/xsds/persistence/oxm http://www.eclipse.org/eclipselink/xsds/eclipselink_oxm_2_3.xsd">
- <java-types>
- <java-type name="HostedLeagues" xml-accessor-type="FIELD">
- <xml-root-element name="hostedLeagues"/>
- <java-attributes>
- <xml-element java-attribute="leagues" name="league" />
- </java-attributes>
- </java-type>
- <java-type name="League" xml-accessor-type="FIELD">
- <xml-root-element />
- <java-attributes>
- <xml-attribute java-attribute="id" />
- <xml-attribute java-attribute="version" />
- <xml-element java-attribute="name" />
- <xml-element java-attribute="colourScheme" name="scheme"/>
- <xml-element java-attribute="logoUrl" name="logo"/>
- <xml-element java-attribute="datasource" name="data-source"/>
- <xml-element java-attribute="uri" xml-path="link/@href"/>
- </java-attributes>
- </java-type>
- </java-types>
-</xml-bindings> \ No newline at end of file
diff --git a/application/src/main/java/eclipselink/example/mysports/application/model/Division.java b/application/src/main/java/eclipselink/example/mysports/application/model/Division.java
deleted file mode 100644
index d0a9a92..0000000
--- a/application/src/main/java/eclipselink/example/mysports/application/model/Division.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * dclarke - EclipseLink 2.3 - MySports Demo Bug 344608
- ******************************************************************************/
-package eclipselink.example.mysports.application.model;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.persistence.CascadeType;
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.Id;
-import javax.persistence.NamedQueries;
-import javax.persistence.NamedQuery;
-import javax.persistence.OneToMany;
-import javax.persistence.QueryHint;
-import javax.persistence.Table;
-import javax.persistence.Transient;
-import javax.persistence.Version;
-
-import org.eclipse.persistence.annotations.Multitenant;
-import org.eclipse.persistence.annotations.TenantDiscriminatorColumn;
-import org.eclipse.persistence.config.HintValues;
-import org.eclipse.persistence.config.QueryHints;
-
-import eclipselink.example.mysports.application.MySportsConfig;
-
-@Entity
-@Table(name = "MYS_DIV")
-@NamedQueries({
- @NamedQuery(name="Division.findAll", query="SELECT d FROM Division d ORDER BY d.name",
- hints={@QueryHint(name=QueryHints.QUERY_RESULTS_CACHE, value=HintValues.TRUE)}),
- @NamedQuery(name="Division.findByName", query="SELECT d FROM Division d WHERE d.name = :NAME")
-})
-@Multitenant
-@TenantDiscriminatorColumn(name="LEAGUE_ID", contextProperty=MySportsConfig.LEAGUE_CONTEXT, length=5)
-public class Division implements Extensible {
-
- @Id
- @GeneratedValue
- @Column(name = "ID")
- private int id;
-
- /**
- * Flag to indicate default division for use when a league has only one
- * division.
- */
- @Column(name = "DEF_DIV")
- private boolean defaultDivision = false;
-
- @Column(name = "NAME")
- private String name;
-
- @OneToMany(mappedBy = "division", cascade = CascadeType.ALL)
- private List<Team> teams;
-
- @Version
- private long version;
-
- public long getVersion() {
- return version;
- }
-
- @Transient
- private Map<String, Object> attributes = new HashMap<String, Object>();
-
- public Division() {
- this.teams = new ArrayList<Team>();
- }
-
- public Division(String name) {
- this();
- this.name = name;
- }
-
- public int getId() {
- return id;
- }
-
- protected void setId(int id) {
- this.id = id;
- }
-
- protected void setVersion(long version) {
- this.version = version;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public List<Team> getTeams() {
- return teams;
- }
-
- public boolean isDefaultDivision() {
- return defaultDivision;
- }
-
- public void setDefaultDivision(boolean defaultDivision) {
- this.defaultDivision = defaultDivision;
- }
-
- @SuppressWarnings("unchecked")
- public <T> T get(String attributeName) {
- return (T) this.attributes.get(attributeName);
- }
-
- public Object set(String attributeName, Object value) {
- return this.attributes.put(attributeName, value);
- }
-
- public void addTeam(Team team) {
- getTeams().add(team);
- team.setDivision(this);
-
- }
-
- @Override
- public String toString() {
- return "Division [id=" + id + ", name=" + name + "]";
- }
-}
diff --git a/application/src/main/java/eclipselink/example/mysports/application/model/Division_.java b/application/src/main/java/eclipselink/example/mysports/application/model/Division_.java
deleted file mode 100644
index 6b49b9c..0000000
--- a/application/src/main/java/eclipselink/example/mysports/application/model/Division_.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package eclipselink.example.mysports.application.model;
-
-import javax.annotation.Generated;
-import javax.persistence.metamodel.ListAttribute;
-import javax.persistence.metamodel.SingularAttribute;
-import javax.persistence.metamodel.StaticMetamodel;
-
-@Generated(value="Dali", date="2013-01-08T16:39:46.133-0500")
-@StaticMetamodel(Division.class)
-public class Division_ {
- public static volatile SingularAttribute<Division, Integer> id;
- public static volatile SingularAttribute<Division, Boolean> defaultDivision;
- public static volatile SingularAttribute<Division, String> name;
- public static volatile ListAttribute<Division, Team> teams;
- public static volatile SingularAttribute<Division, Long> version;
-}
diff --git a/application/src/main/java/eclipselink/example/mysports/application/model/Extensible.java b/application/src/main/java/eclipselink/example/mysports/application/model/Extensible.java
deleted file mode 100644
index 6be1ecf..0000000
--- a/application/src/main/java/eclipselink/example/mysports/application/model/Extensible.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * dclarke - EclipseLink 2.3 - MySports Demo Bug 344608
- ******************************************************************************/
-package eclipselink.example.mysports.application.model;
-
-import eclipselink.example.mysports.application.view.ExtensibleEntity;
-
-/**
- * Application specific marker interface for an extensible type. Not required for EclipseLink JPA.
- *
- * @see ExtensibleEntity for usage in JSF
- * @author dclarke
- * @since EclipseLink 2.3.0
- */
-public interface Extensible {
-
- public <T> T get(String attributeName);
-
- public Object set(String attributeName, Object value);
-}
diff --git a/application/src/main/java/eclipselink/example/mysports/application/model/MOXyHelper.java b/application/src/main/java/eclipselink/example/mysports/application/model/MOXyHelper.java
deleted file mode 100644
index 24a445b..0000000
--- a/application/src/main/java/eclipselink/example/mysports/application/model/MOXyHelper.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * dclarke - EclipseLink 2.4 - MySports Demo Bug 344608
- ******************************************************************************/
-package eclipselink.example.mysports.application.model;
-
-import static org.eclipse.persistence.jaxb.MarshallerProperties.MEDIA_TYPE;
-import static org.eclipse.persistence.jaxb.UnmarshallerProperties.JSON_INCLUDE_ROOT;
-
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Marshaller;
-import javax.xml.bind.Unmarshaller;
-
-import org.eclipse.persistence.jaxb.JAXBContextFactory;
-import org.eclipse.persistence.oxm.MediaType;
-
-public class MOXyHelper {
-
- private static JAXBContext context;
-
- public static JAXBContext getContext() throws JAXBException {
- if (context == null) {
- context = JAXBContextFactory.createContext(new Class[] { Division.class, Team.class, Player.class }, null);
- }
- return context;
- }
-
- public static Marshaller createMarshaller(MediaType mediaType) throws JAXBException {
- Marshaller marshaller = getContext().createMarshaller();
- marshaller.setProperty(MEDIA_TYPE, mediaType.getMediaType());
- return marshaller;
- }
-
- public static Unmarshaller createUnmarshaller(MediaType mediaType) throws JAXBException {
- Unmarshaller unmarshaller = getContext().createUnmarshaller();
- unmarshaller.setProperty(MEDIA_TYPE, mediaType.getMediaType());
- unmarshaller.setProperty(JSON_INCLUDE_ROOT, false);
- return unmarshaller;
- }
-
-}
diff --git a/application/src/main/java/eclipselink/example/mysports/application/model/Player.java b/application/src/main/java/eclipselink/example/mysports/application/model/Player.java
deleted file mode 100644
index 5e2990d..0000000
--- a/application/src/main/java/eclipselink/example/mysports/application/model/Player.java
+++ /dev/null
@@ -1,185 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * dclarke - EclipseLink 2.3 - MySports Demo Bug 344608
- ******************************************************************************/
-package eclipselink.example.mysports.application.model;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.FetchType;
-import javax.persistence.GeneratedValue;
-import javax.persistence.Id;
-import javax.persistence.JoinColumn;
-import javax.persistence.ManyToOne;
-import javax.persistence.NamedQueries;
-import javax.persistence.NamedQuery;
-import javax.persistence.Table;
-import javax.persistence.Transient;
-import javax.persistence.Version;
-
-import org.eclipse.persistence.annotations.Multitenant;
-import org.eclipse.persistence.annotations.TenantDiscriminatorColumn;
-import org.eclipse.persistence.annotations.VirtualAccessMethods;
-
-import eclipselink.example.mysports.application.MySportsConfig;
-
-/**
- * In the MySports demo a Player entity represents an individual member of a
- * team.
- *
- * @author dclarke
- * @since EclipseLink 2.3.0
- */
-@Entity
-@Table(name = "MYS_PLAYER")
-@NamedQueries({
- @NamedQuery(name="Player.findByTeam", query="SELECT p FROM Player p WHERE p.team.id = :team ORDER BY p.lastName, p.firstName"),
- @NamedQuery(name="Player.findAll", query="SELECT p FROM Player p ORDER BY p.lastName, p.firstName")
-})
-@VirtualAccessMethods
-@Multitenant
-@TenantDiscriminatorColumn(name="LEAGUE_ID", contextProperty=MySportsConfig.LEAGUE_CONTEXT, length=5)
-public class Player implements Extensible {
-
- @Id
- @GeneratedValue
- @Column(name = "ID")
- private int id;
-
- @Column(name = "USER_ID")
- private String userid;
-
- @Column(name = "F_NAME")
- private String firstName;
-
- @Column(name = "L_NAME")
- private String lastName;
-
- @Column(name = "EMAIL")
- private String email;
-
- @ManyToOne(fetch=FetchType.EAGER)
- @JoinColumn(name = "TEAM_ID")
- private Team team;
-
- @Column(name = "NUM")
- private int number;
-
- @Version
- private long version;
-
- /**
- * Extended attributes
- */
- @Transient
- private Map<String, Object> attributes = new HashMap<String, Object>();
-
- public String getFirstName() {
- return firstName;
- }
-
- public void setFirstName(String firstName) {
- this.firstName = firstName;
- }
-
- public String getLastName() {
- return lastName;
- }
-
- public void setLastName(String lastName) {
- this.lastName = lastName;
- }
-
- public String getEmail() {
- return email;
- }
-
- public void setEmail(String email) {
- this.email = email;
- }
-
- public Team getTeam() {
- return team;
- }
-
- public void setTeam(Team team) {
- this.team = team;
- }
-
- public int getNumber() {
- return number;
- }
-
- public void setNumber(int number) {
- this.number = number;
- }
-
- public int getId() {
- return id;
- }
-
- public String getUserid() {
- return userid;
- }
-
- public void setUserid(String userid) {
- this.userid = userid;
- }
-
- public long getVersion() {
- return version;
- }
-
- protected void setId(int id) {
- this.id = id;
- }
-
- protected void setVersion(long version) {
- this.version = version;
- }
-
- @SuppressWarnings("unchecked")
- public <T> T get(String attributeName) {
- return (T) this.attributes.get(attributeName);
- }
-
- public Object set(String attributeName, Object value) {
- return this.attributes.put(attributeName, value);
- }
-
- /**
- * Determine if player instance is valid to be added to a team. This is true
- * if the player has a number and both names.
- *
- * @return
- */
- public boolean isValid() {
- if (getNumber() <= 0) {
- return false;
- }
- if (getFirstName() == null || getFirstName().isEmpty()) {
- return false;
- }
- if (getLastName() == null || getLastName().isEmpty()) {
- return false;
- }
- return true;
- }
-
- @Override
- public String toString() {
- return "Player [id=" + id + ", firstName=" + firstName + ", lastName=" + lastName + "]";
- }
-
-}
diff --git a/application/src/main/java/eclipselink/example/mysports/application/model/Player_.java b/application/src/main/java/eclipselink/example/mysports/application/model/Player_.java
deleted file mode 100644
index f03b13f..0000000
--- a/application/src/main/java/eclipselink/example/mysports/application/model/Player_.java
+++ /dev/null
@@ -1,18 +0,0 @@
-package eclipselink.example.mysports.application.model;
-
-import javax.annotation.Generated;
-import javax.persistence.metamodel.SingularAttribute;
-import javax.persistence.metamodel.StaticMetamodel;
-
-@Generated(value="Dali", date="2013-01-08T16:39:46.138-0500")
-@StaticMetamodel(Player.class)
-public class Player_ {
- public static volatile SingularAttribute<Player, Integer> id;
- public static volatile SingularAttribute<Player, String> userid;
- public static volatile SingularAttribute<Player, String> firstName;
- public static volatile SingularAttribute<Player, String> lastName;
- public static volatile SingularAttribute<Player, String> email;
- public static volatile SingularAttribute<Player, Team> team;
- public static volatile SingularAttribute<Player, Integer> number;
- public static volatile SingularAttribute<Player, Long> version;
-}
diff --git a/application/src/main/java/eclipselink/example/mysports/application/model/Team.java b/application/src/main/java/eclipselink/example/mysports/application/model/Team.java
deleted file mode 100644
index c730bd6..0000000
--- a/application/src/main/java/eclipselink/example/mysports/application/model/Team.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * dclarke - EclipseLink 2.3 - MySports Demo Bug 344608
- ******************************************************************************/
-package eclipselink.example.mysports.application.model;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.persistence.CascadeType;
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.FetchType;
-import javax.persistence.GeneratedValue;
-import javax.persistence.Id;
-import javax.persistence.JoinColumn;
-import javax.persistence.ManyToOne;
-import javax.persistence.NamedQueries;
-import javax.persistence.NamedQuery;
-import javax.persistence.OneToMany;
-import javax.persistence.OrderBy;
-import javax.persistence.Table;
-import javax.persistence.Transient;
-import javax.persistence.Version;
-
-import org.eclipse.persistence.annotations.Multitenant;
-import org.eclipse.persistence.annotations.TenantDiscriminatorColumn;
-
-import eclipselink.example.mysports.application.MySportsConfig;
-
-@Entity
-@Table(name = "MYS_TEAM")
-@NamedQueries({ @NamedQuery(name = "Team.findAll", query = "SELECT t FROM Team t ORDER BY t.name"), @NamedQuery(name = "Team.findByDivisionAndName", query = "SELECT t FROM Team t WHERE t.name = :NAME AND t.division.name = :DIV") })
-@Multitenant
-@TenantDiscriminatorColumn(name = "LEAGUE_ID", contextProperty = MySportsConfig.LEAGUE_CONTEXT, length = 5)
-public class Team implements Extensible {
-
- @Id
- @GeneratedValue
- @Column(name = "ID")
- private int id;
-
- @Column(name = "NAME")
- private String name;
-
- @ManyToOne(fetch = FetchType.LAZY)
- @JoinColumn(name = "DIVISION_ID")
- private Division division;
-
- @OneToMany(mappedBy = "team", cascade = CascadeType.ALL)
- @OrderBy("number ASC")
- private List<Player> players;
-
- @Version
- private long version;
- @Transient
- private Map<String, Object> attributes = new HashMap<String, Object>();
-
- public Team() {
- this.players = new ArrayList<Player>();
- this.attributes = new HashMap<String, Object>();
- }
-
- public Team(String name) {
- this();
- this.name = name;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public Division getDivision() {
- return division;
- }
-
- public void setDivision(Division division) {
- this.division = division;
- }
-
- public int getId() {
- return id;
- }
-
- protected void setId(int id) {
- this.id = id;
- }
-
- protected void setVersion(long version) {
- this.version = version;
- }
-
- public List<Player> getPlayers() {
- return players;
- }
-
- public long getVersion() {
- return version;
- }
-
- @SuppressWarnings("unchecked")
- public <T> T get(String attributeName) {
- return (T) this.attributes.get(attributeName);
- }
-
- public Object set(String attributeName, Object value) {
- return this.attributes.put(attributeName, value);
- }
-
- public void addPlayer(Player player) {
- getPlayers().add(player);
- player.setTeam(this);
- }
-
- @Override
- public String toString() {
- return "Team [id=" + id + ", name=" + name + "]";
- }
-
-}
diff --git a/application/src/main/java/eclipselink/example/mysports/application/model/Team_.java b/application/src/main/java/eclipselink/example/mysports/application/model/Team_.java
deleted file mode 100644
index dd38f30..0000000
--- a/application/src/main/java/eclipselink/example/mysports/application/model/Team_.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package eclipselink.example.mysports.application.model;
-
-import javax.annotation.Generated;
-import javax.persistence.metamodel.ListAttribute;
-import javax.persistence.metamodel.SingularAttribute;
-import javax.persistence.metamodel.StaticMetamodel;
-
-@Generated(value="Dali", date="2013-01-08T16:39:46.140-0500")
-@StaticMetamodel(Team.class)
-public class Team_ {
- public static volatile SingularAttribute<Team, Integer> id;
- public static volatile SingularAttribute<Team, String> name;
- public static volatile SingularAttribute<Team, Division> division;
- public static volatile ListAttribute<Team, Player> players;
- public static volatile SingularAttribute<Team, Long> version;
-}
diff --git a/application/src/main/java/eclipselink/example/mysports/application/model/User.java b/application/src/main/java/eclipselink/example/mysports/application/model/User.java
deleted file mode 100644
index 2342cdb..0000000
--- a/application/src/main/java/eclipselink/example/mysports/application/model/User.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * dclarke - EclipseLink 2.3 - MySports Demo Bug 344608
- ******************************************************************************/
-package eclipselink.example.mysports.application.model;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.Id;
-import javax.persistence.Table;
-
-@Entity
-@Table(name="MYS_USER")
-public class User {
-
- @Id
- @Column(name="USER_ID")
- private String id;
-
- private String firstName;
-
- private String lastName;
-
- private String email;
-
- public String getFirstName() {
- return firstName;
- }
-
- public void setFirstName(String firstName) {
- this.firstName = firstName;
- }
-
- public String getLastName() {
- return lastName;
- }
-
- public void setLastName(String lastName) {
- this.lastName = lastName;
- }
-
- public String getEmail() {
- return email;
- }
-
- public void setEmail(String email) {
- this.email = email;
- }
-
- public String getId() {
- return id;
- }
-
-}
diff --git a/application/src/main/java/eclipselink/example/mysports/application/model/User_.java b/application/src/main/java/eclipselink/example/mysports/application/model/User_.java
deleted file mode 100644
index afeafcd..0000000
--- a/application/src/main/java/eclipselink/example/mysports/application/model/User_.java
+++ /dev/null
@@ -1,14 +0,0 @@
-package eclipselink.example.mysports.application.model;
-
-import javax.annotation.Generated;
-import javax.persistence.metamodel.SingularAttribute;
-import javax.persistence.metamodel.StaticMetamodel;
-
-@Generated(value="Dali", date="2013-01-08T16:39:46.142-0500")
-@StaticMetamodel(User.class)
-public class User_ {
- public static volatile SingularAttribute<User, String> id;
- public static volatile SingularAttribute<User, String> firstName;
- public static volatile SingularAttribute<User, String> lastName;
- public static volatile SingularAttribute<User, String> email;
-}
diff --git a/application/src/main/java/eclipselink/example/mysports/application/services/LeagueRepository.java b/application/src/main/java/eclipselink/example/mysports/application/services/LeagueRepository.java
deleted file mode 100644
index b4cce98..0000000
--- a/application/src/main/java/eclipselink/example/mysports/application/services/LeagueRepository.java
+++ /dev/null
@@ -1,483 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * dclarke - EclipseLink 2.3 - MySports Demo Bug 344608
- ******************************************************************************/
-package eclipselink.example.mysports.application.services;
-
-import static eclipselink.example.mysports.application.MySportsConfig.LEAGUE_CONTEXT;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.annotation.PreDestroy;
-import javax.ejb.PostActivate;
-import javax.ejb.PrePassivate;
-import javax.ejb.Remove;
-import javax.ejb.Stateful;
-import javax.persistence.EntityManager;
-import javax.persistence.EntityManagerFactory;
-import javax.persistence.Persistence;
-import javax.persistence.TypedQuery;
-import javax.persistence.criteria.CriteriaBuilder;
-import javax.persistence.criteria.CriteriaQuery;
-import javax.persistence.criteria.Predicate;
-import javax.persistence.criteria.Root;
-import javax.persistence.metamodel.Attribute;
-import javax.persistence.metamodel.ManagedType;
-import javax.persistence.metamodel.Metamodel;
-
-import org.eclipse.persistence.annotations.Multitenant;
-import org.eclipse.persistence.config.PersistenceUnitProperties;
-import org.eclipse.persistence.config.QueryHints;
-import org.eclipse.persistence.internal.jpa.metamodel.AttributeImpl;
-import org.eclipse.persistence.jpa.JpaHelper;
-import org.eclipse.persistence.logging.SessionLog;
-import org.eclipse.persistence.mappings.AttributeAccessor;
-import org.eclipse.persistence.queries.FetchGroup;
-import org.eclipse.persistence.sessions.server.Server;
-import org.eclipse.persistence.sessions.server.ServerSession;
-import org.eclipse.persistence.tools.schemaframework.SchemaManager;
-
-import eclipselink.example.mysports.application.MySportsConfig;
-import eclipselink.example.mysports.application.admin.AdminServerConnector;
-import eclipselink.example.mysports.application.admin.League;
-import eclipselink.example.mysports.application.admin.RESTAdminServerConnector;
-import eclipselink.example.mysports.application.model.Division;
-import eclipselink.example.mysports.application.model.Division_;
-import eclipselink.example.mysports.application.model.Player;
-import eclipselink.example.mysports.application.model.Player_;
-import eclipselink.example.mysports.application.model.Team;
-import eclipselink.example.mysports.application.model.Team_;
-import eclipselink.example.mysports.persistence.TenantPerEMFProvider;
-
-/**
- * MySports Domain Model Repository providing simplified persistence facade for
- * managing the application bootstrapped {@link EntityManagerFactory} that are
- * tenant aware.
- *
- * @author dclarke
- * @since EclipseLink 2.3.0
- */
-@Stateful
-//@TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
-public class LeagueRepository implements Serializable {
- private static final long serialVersionUID = 1L;
-
- /**
- * TODO
- */
- public static final String PU_NAME = "mysports";
-
- /**
- * Current league being viewed. This value MUST be configured using
- * {@link #setLeagueId(String)} before any persistence operations can be
- * performed.
- */
- private String leagueId;
-
- /**
- * Current league's name
- */
- private String name;
-
- /**
- * Tenant specific {@link EntityManagerFactory} used to access application entities.
- *
- * @see TenantPerEMFProvider
- * @see MySportsConfig#LEAGUE_CONTEXT
- */
- private transient EntityManagerFactory emf;
-
- /**
- * TODO
- */
- private AdminServerConnector adminConnector;
-
- /**
- * Cache the current division to simplify operations within the division.
- */
- private transient Division currentDivision;
-
- protected LeagueRepository(AdminServerConnector adminConnector) {
- super();
- this.adminConnector = adminConnector;
- }
-
- public LeagueRepository() {
- this(new RESTAdminServerConnector());
- }
-
- public String getLeagueId() {
- return this.leagueId;
- }
-
- public String getName() {
- if (this.name == null) {
- return getLeagueId();
- }
- return name;
- }
-
- public AdminServerConnector getAdminConnector() {
- return adminConnector;
- }
-
- /**
- * Initialize this repository for a specific tenant. This method must be
- * called before accessing any of the other methods.
- *
- * @param leagueId
- * @param properties
- */
- public void setLeagueId(String leagueId, Map<String, Object> properties) {
- League league = null;
-
- if (leagueId != null && !leagueId.isEmpty()) {
- league = getAdminConnector().getLeague(leagueId);
- }
- if (league == null) {
- throw new IllegalArgumentException("Invalid league identifier: " + leagueId);
- }
-
- this.name = league.getName();
-
- if (this.emf == null || !leagueId.equals(getLeagueId())) {
- Map<String, Object> props = properties;
- if (props == null) {
- props = new HashMap<String, Object>();
- }
-
- // Override with the league specific data source if the properties
- // does not include one.
- if (!props.containsKey(PersistenceUnitProperties.NON_JTA_DATASOURCE)) {
- props.put(PersistenceUnitProperties.NON_JTA_DATASOURCE, league.getDatasource());
- }
-
- createEMF(leagueId, props);
- } else {
- Long preValue = (Long) JpaHelper.getServerSession(getEMF()).getProperty("league-version");
-
- // Check to see if the league version has changed
- if (preValue != null && preValue.longValue() < league.getVersion()) {
- // Create a new EMF
- createEMF(leagueId, properties);
- // Refresh the new EMF's metadata
- JpaHelper.getEntityManagerFactory(getEMF()).refreshMetadata(properties);
- }
- }
- JpaHelper.getServerSession(getEMF()).setProperty("league-version", league.getVersion());
- }
-
- public boolean hasLeague() {
- return getLeagueId() != null;
- }
-
- /**
- * Retrieve all of the divisions in this league and optionally force the
- * lazily loaded teams to be returned within the {@link Division}s.
- */
- public List<Division> getDivisions() {
- EntityManager em = getEMF().createEntityManager();
-
- try {
- TypedQuery<Division> q = em.createNamedQuery("Division.findAll", Division.class);
- return q.getResultList();
- } finally {
- em.close();
- }
- }
-
- public Division getCurrentDivision() {
- return currentDivision;
- }
-
- public void setCurrentDivision(Division currentDivision) {
- this.currentDivision = currentDivision;
- }
-
- public <T> T find(Class<T> entityClass, int id) {
- EntityManager em = getEMF().createEntityManager();
-
- try {
- return em.find(entityClass, id);
- } finally {
- em.close();
- }
- }
-
- public Division addDivision(String name) {
- EntityManager em = getEMF().createEntityManager();
-
- try {
- em.getTransaction().begin();
- Division div = new Division(name);
- em.persist(div);
- em.getTransaction().commit();
- return div;
- } finally {
- em.close();
- }
- }
-
- public Team addTeam(String name, List<Player> players, Division division) {
- EntityManager em = getEMF().createEntityManager();
- Division div = division == null ? getCurrentDivision() : division;
-
- try {
- em.getTransaction().begin();
-
- Division managedDiv = em.merge(div);
- Team team = new Team(name);
- if (players != null) {
- for (Player player : players) {
- team.addPlayer(player);
- }
- }
- em.persist(team);
- managedDiv.addTeam(team);
-
- em.getTransaction().commit();
-
- this.currentDivision = managedDiv;
- return team;
- } finally {
- em.close();
- }
- }
-
- public Team mergeTeam(Team team) {
- EntityManager em = getEMF().createEntityManager();
-
- try {
- em.getTransaction().begin();
-
- Team managedTeam = em.merge(team);
-
- em.getTransaction().commit();
-
- this.currentDivision = managedTeam.getDivision();
- return managedTeam;
- } finally {
- em.close();
- }
- }
-
- public Division getDivision(String name) {
- EntityManager em = getEMF().createEntityManager();
-
- try {
- TypedQuery<Division> q = em.createNamedQuery("Division.findByName", Division.class);
- q.setParameter("NAME", name);
-
- // Specify that all teams and all team's players should be loaded
- FetchGroup fg = new FetchGroup();
- fg.addAttribute("teams.players");
- fg.setShouldLoadAll(true);
- q.setHint(QueryHints.FETCH_GROUP, fg);
-
- return q.getSingleResult();
- } finally {
- em.close();
- }
- }
-
- public Team getTeam(String division, String name) {
- EntityManager em = getEMF().createEntityManager();
-
- try {
- TypedQuery<Team> q = em.createNamedQuery("Team.findByDivisionAndName", Team.class);
- q.setParameter("DIV", division);
- q.setParameter("NAME", name);
- return q.getSingleResult();
- } finally {
- em.close();
- }
- }
-
- /**
- * Retrieve a player using its division, team name, and jersey number using
- * JPA 2.0 criteria.
- */
- public Player getPlayerByNumber(String division, String teamId, int number) {
- EntityManager em = getEMF().createEntityManager();
-
- try {
- CriteriaBuilder qb = em.getCriteriaBuilder();
- CriteriaQuery<Player> query = qb.createQuery(Player.class);
- Root<Player> player = query.from(Player.class);
- Predicate numEqual = qb.equal(player.get(Player_.number), number);
- Predicate teamEqual = qb.equal(player.get(Player_.team).get(Team_.name), teamId);
- Predicate divEqual = qb.equal(player.get(Player_.team).get(Team_.division).get(Division_.name), division);
- query.where(qb.and(numEqual, teamEqual, divEqual));
- return em.createQuery(query).getSingleResult();
- } finally {
- em.close();
- }
- }
-
- public void remove(Object entity) {
- EntityManager em = getEMF().createEntityManager();
-
- try {
- Object managedEntity = em.merge(entity);
-
- em.getTransaction().begin();
- em.remove(managedEntity);
- em.getTransaction().commit();
- } finally {
- em.close();
- }
- }
-
- /*
- * JPA API
- */
-
- /**
- * @throws IllegalStateException
- * if the
- */
- protected EntityManagerFactory getEMF() {
- if (this.emf == null) {
- throw new IllegalStateException("LeagueRepository not initialized");
- }
- return this.emf;
- }
-
- /**
- * Determine which mapped attributes are virtual/extended attributes. Used
- * to provide dynamic access to these attributes in presentation layer.
- *
- * @return list of extended (virtual) JPA meta-model attributes
- * @throws IllegalArgumentException
- * if entityType is not a managed type
- */
- public List<Attribute<?, ?>> getAdditionalAttributes(Class<?> entityType) {
- Metamodel metamodel = getEMF().getMetamodel();
- ManagedType<?> type = metamodel.managedType(entityType);
- List<Attribute<?, ?>> addnAttrs = new ArrayList<Attribute<?, ?>>();
-
- for (Attribute<?, ?> attr : type.getAttributes()) {
- AttributeImpl<?, ?> attrImpl = (AttributeImpl<?, ?>) attr;
- AttributeAccessor accessor = attrImpl.getMapping().getAttributeAccessor();
- if (accessor.isVirtualAttributeAccessor()) {
- addnAttrs.add(attr);
- }
- }
-
- return addnAttrs;
- }
-
- /**
- * Provide access to internals of repository similar to
- * {@link EntityManager#unwrap(Class)}. Provided for access to advanced
- * capabilities of the underlying EclipseLink persistence unit as well as
- * for testing access to internals.
- */
- @SuppressWarnings("unchecked")
- public <T> T unwrap(Class<T> cls) {
- if (EntityManagerFactory.class.equals(cls)) {
- return (T) getEMF();
- } else if (cls.equals(Server.class) || cls.equals(ServerSession.class)) {
- return (T) JpaHelper.getServerSession(getEMF());
- } else if (cls.equals(SchemaManager.class)) {
- return (T) new SchemaManager(JpaHelper.getServerSession(getEMF()));
- }
- throw new RuntimeException("LeagueRepository cannot be unwrapped to: " + cls);
- }
-
- /**
- * Close this league repository forcing the underlying
- * {@link EntityManagerFactory} to be closed as well.
- */
- @PreDestroy
- @PrePassivate
- @Remove
- public void close() {
- if (this.emf != null && this.emf.isOpen()) {
- this.emf.close();
- }
- this.emf = null;
- this.currentDivision = null;
- this.leagueId = null;
- }
-
- /**
- * After the stateful session bean is activated after passivation the
- * {@link #createEMF(String, Map)}is called with the stored
- * {@link #leagueId} to populate the persistence state necessary for use.
- */
- @PostActivate
- public void initialize() {
- createEMF(getLeagueId(), null);
- }
-
- /**
- * Create the league (tenant) specific {@link EntityManagerFactory}. In
- * order to use the same persistence unit definition (persistence.xml) as a
- * template the {@link PersistenceUnitProperties#SESSION_NAME} property is
- * supplied to indicate that the backing shared EclipseLink session should
- * be cached based on the league identifier.
- *
- * The {@value MySportsConfig#LEAGUE_CONTEXT} property is supplied to
- * indicate the required context property as required by the use of
- * {@link Multitenant} on the persistent entities.
- *
- * @param leagueId
- * league (tenant) identifier
- * @param properties
- * additional {@link EntityManagerFactory} properties.
- */
- protected void createEMF(String leagueId, Map<String, Object> properties) {
- Map<String, Object> emfProps = new HashMap<String, Object>();
-
- if (properties != null) {
- emfProps.putAll(properties);
- }
-
- emfProps.put(LEAGUE_CONTEXT, leagueId);
-
- String puName = MySportsConfig.PU_NAME;
- if (leagueId != null && !"ALL".equals(leagueId)) {
- puName = getSessionName(leagueId);
- }
-
- this.emf = Persistence.createEntityManagerFactory(puName, emfProps);
- this.leagueId = leagueId;
-
- // Clear cached state
- setCurrentDivision(null);
-
- Server session = JpaHelper.getServerSession(getEMF());
- session.getSessionLog().log(SessionLog.CONFIG, "LeagueRepository[" + hashCode() + "] initialized with session named: " + session.getName());
- }
-
- public String getSessionName(String leagueId) {
- if (isMultitenant()) {
- if (leagueId == null || leagueId.isEmpty()) {
- throw new IllegalArgumentException("Multitenant instance requires leagueId");
- }
- return PU_NAME + ";league=" + leagueId;
- }
- return null;
- }
-
- /*
- * TODO - make it possible for the app to be deployed with a single fixed tenant
- */
- public boolean isMultitenant() {
- return true;
- }
-
-}
diff --git a/application/src/main/java/eclipselink/example/mysports/application/services/PersistenceWeavingBean.java b/application/src/main/java/eclipselink/example/mysports/application/services/PersistenceWeavingBean.java
deleted file mode 100644
index 813d1f2..0000000
--- a/application/src/main/java/eclipselink/example/mysports/application/services/PersistenceWeavingBean.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * dclarke - EclipseLink 2.3 - MySports Demo Bug 344608
- ******************************************************************************/
-package eclipselink.example.mysports.application.services;
-
-import javax.ejb.Singleton;
-import javax.ejb.Startup;
-import javax.persistence.EntityManagerFactory;
-import javax.persistence.PersistenceUnit;
-
-import eclipselink.example.mysports.application.MySportsConfig;
-
-
-/**
- * This utility class will cause the container to weave the persistence unit.
- * Since the {@link LeagueRepository} uses the persistence unit through the
- * application bootstrap API the container will not instrument/weave the entity
- * classes. This class is ONLY required in the application to force the weaving
- * to occur.
- *
- * @author dclarke
- * @since EclipseLink 2.3.0
- */
-@Startup
-@Singleton
-public class PersistenceWeavingBean {
-
- @PersistenceUnit(unitName = MySportsConfig.PU_NAME)
- private EntityManagerFactory emf;
-
-}
diff --git a/application/src/main/java/eclipselink/example/mysports/application/view/BaseManagedBean.java b/application/src/main/java/eclipselink/example/mysports/application/view/BaseManagedBean.java
deleted file mode 100644
index 3a8889b..0000000
--- a/application/src/main/java/eclipselink/example/mysports/application/view/BaseManagedBean.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * dclarke - EclipseLink 2.3 - MySports Demo Bug 344608
- ******************************************************************************/
-package eclipselink.example.mysports.application.view;
-
-import javax.faces.bean.ManagedProperty;
-
-import eclipselink.example.mysports.application.services.LeagueRepository;
-
-/**
- * Common managed bean to provide access required across the application.
- *
- * @author dclarke
- * @since EclipseLink 2.3.0
- */
-public abstract class BaseManagedBean {
-
- @ManagedProperty(value = "#{leagueRepositoryBean}")
- private LeagueRepositoryBean repositoryBean;
-
- public LeagueRepositoryBean getRepositoryBean() {
- return repositoryBean;
- }
-
- public void setRepositoryBean(LeagueRepositoryBean repositoryBean) {
- this.repositoryBean = repositoryBean;
- }
-
- public LeagueRepository getRepository() {
- return getRepositoryBean().getRepository();
- }
-
- public String getLeagueId() {
- return getRepository().getLeagueId();
- }
-
- public boolean isMultitenant() {
- return getRepositoryBean().getRepository().isMultitenant();
- }
-
- public String home() {
- return LeaguesList.PAGE;
- }
-
-}
diff --git a/application/src/main/java/eclipselink/example/mysports/application/view/BaseTeamBean.java b/application/src/main/java/eclipselink/example/mysports/application/view/BaseTeamBean.java
deleted file mode 100644
index 4058df7..0000000
--- a/application/src/main/java/eclipselink/example/mysports/application/view/BaseTeamBean.java
+++ /dev/null
@@ -1,193 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * dclarke - EclipseLink 2.3 - MySports Demo Bug 344608
- ******************************************************************************/
-package eclipselink.example.mysports.application.view;
-
-import java.io.StringWriter;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.el.ValueExpression;
-import javax.faces.application.FacesMessage;
-import javax.faces.component.html.HtmlColumn;
-import javax.faces.component.html.HtmlDataTable;
-import javax.faces.component.html.HtmlInputText;
-import javax.faces.component.html.HtmlOutputText;
-import javax.faces.context.FacesContext;
-import javax.persistence.metamodel.Attribute;
-import javax.servlet.http.HttpServletRequest;
-
-import eclipselink.example.mysports.application.model.Division;
-import eclipselink.example.mysports.application.model.Player;
-import eclipselink.example.mysports.application.model.Team;
-import eclipselink.example.mysports.application.services.LeagueRepository;
-
-/**
- * Base managed bean for Team operations.
- *
- * @author dclarke
- * @since EclipseLink 2.3.0
- */
-public abstract class BaseTeamBean extends BaseManagedBean {
-
- private Team team;
-
- private List<ExtensibleEntity<Player>> players;
-
- private HtmlDataTable dataTable;
-
- /**
- * Default page that will be navigated to on successful call to
- * {@link #setTeam())}
- */
- public abstract String getPage();
-
- public String getPage(String pageName) {
- return pageName + "?faces-redirect=true";
- }
-
- public Division getCurrentDivision() {
- return getRepository().getCurrentDivision();
- }
-
- public Team getTeam() {
- return this.team;
- }
-
- protected void setTeam(Team team) {
- this.team = team;
- this.dataTable = null;
-
- this.players = new ArrayList<ExtensibleEntity<Player>>();
- for (Player player : getTeam().getPlayers()) {
- this.players.add(new ExtensibleEntity<Player>(player));
- }
- }
-
- public String setTeam() {
- FacesContext facesContext = FacesContext.getCurrentInstance();
- HttpServletRequest myRequest = (HttpServletRequest) facesContext.getExternalContext().getRequest();
- String value = myRequest.getParameter("team-id");
- if (value != null && !value.isEmpty()) {
- Team newTeam = getRepository().find(Team.class, Integer.valueOf(value));
- if (newTeam == null) {
- facesContext.addMessage(null, new FacesMessage("No Team found for id: " + value));
- return null;
- }
- setTeam(newTeam);
- }
-
- return getPage();
- }
-
- public List<ExtensibleEntity<Player>> getPlayers() {
- return this.players;
- }
-
- public abstract HtmlDataTable getDataTable();
-
- /**
- * Construct a data table for {@link Player} including its extended attributes.
- *
- * @see LeagueRepository#getAdditionalAttributes(Class)
- */
- public HtmlDataTable getDataTable(String beanName, boolean writeable) {
- if (this.dataTable == null) {
- HtmlDataTable table = new HtmlDataTable();
- table.setValueExpression("value", createValueExpression("#{" + beanName + ".players}", List.class));
- table.setVar("player");
- table.setWidth("100%");
- table.setBorder(1);
- table.setStyleClass("pretty");
-
- addColumn(table, "Number", "#{player.entity.number}", Integer.class, writeable);
- addColumn(table, "First Name", "#{player.entity.firstName}", String.class, writeable);
- addColumn(table, "Last Name", "#{player.entity.lastName}", String.class, writeable);
-
- for (Attribute<?, ?> attr : getRepository().getAdditionalAttributes(Player.class)) {
- addColumn(table, label(attr.getName()), "#{player.get('" + attr.getName() + "').value}", attr.getJavaType(), writeable);
- }
-
- this.dataTable = table;
- }
- return this.dataTable;
- }
-
- public void setDataTable(HtmlDataTable dataTable) {
- this.dataTable = dataTable;
- }
-
- /**
- * Helper method to add a column to the {@link #dataTable}
- */
- private void addColumn(HtmlDataTable table, String name, String valueExpression, Class<?> valueType, boolean writeable) {
- HtmlColumn column = new HtmlColumn();
- table.getChildren().add(column);
-
- HtmlOutputText header = new HtmlOutputText();
- header.setValue(name);
- column.setHeader(header);
-
- if (writeable) {
- HtmlInputText input = new HtmlInputText();
- input.setValueExpression("value", createValueExpression(valueExpression, valueType));
- column.getChildren().add(input);
- } else {
- HtmlOutputText output = new HtmlOutputText();
- output.setValueExpression("value", createValueExpression(valueExpression, valueType));
- column.getChildren().add(output);
- }
- }
-
- private ValueExpression createValueExpression(String valueExpression, Class<?> valueType) {
- FacesContext facesContext = FacesContext.getCurrentInstance();
- return facesContext.getApplication().getExpressionFactory().createValueExpression(facesContext.getELContext(), valueExpression, valueType);
- }
-
- /**
- * Convert attributeName into String name based on Camel casing
- */
- public static String label(String attrName) {
- if (attrName == null || attrName.isEmpty()) {
- return attrName;
- }
-
- String name = attrName.substring(0, 1).toUpperCase() + attrName.substring(1);
-
- String[] lowerSegements = name.split("[A-Z_]");
- String[] upperStrings = name.split("[a-z_]");
-
- StringWriter writer = new StringWriter();
- int upperIndex = 0;
- int lowerIndex = 0;
-
- writer.write(upperStrings[upperIndex++]);
-
- while (lowerIndex < lowerSegements.length) {
- if (lowerSegements[lowerIndex].isEmpty()) {
- lowerIndex++;
- } else {
- writer.write(lowerSegements[lowerIndex++]);
- writer.write(" ");
-
- while (upperIndex < upperStrings.length && upperStrings[upperIndex].isEmpty()) {
- upperIndex++;
- }
- if (upperIndex < upperStrings.length) {
- writer.write(upperStrings[upperIndex++]);
- }
- }
- }
-
- return writer.toString().trim();
- }
-}
diff --git a/application/src/main/java/eclipselink/example/mysports/application/view/CreateDivision.java b/application/src/main/java/eclipselink/example/mysports/application/view/CreateDivision.java
deleted file mode 100644
index f3510ea..0000000
--- a/application/src/main/java/eclipselink/example/mysports/application/view/CreateDivision.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * dclarke - EclipseLink 2.3 - MySports Demo Bug 344608
- ******************************************************************************/
-package eclipselink.example.mysports.application.view;
-
-import javax.faces.application.FacesMessage;
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.RequestScoped;
-import javax.faces.context.FacesContext;
-
-import eclipselink.example.mysports.application.model.Division;
-
-/**
- * Managed JSF bean used to create a new {@link Division}
- *
- * @author dclarke
- * @since EclipseLink 2.3.0
- */
-@ManagedBean
-@RequestScoped
-public class CreateDivision extends BaseManagedBean {
-
- private String name;
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public String create() {
- FacesContext facesCtxt = FacesContext.getCurrentInstance();
-
- if (getName() == null || getName().isEmpty()) {
- facesCtxt.addMessage(null, new FacesMessage("Invalid Name"));
- return null;
- }
-
- getRepository().addDivision(getName());
- return cancel();
- }
-
- public String cancel() {
- return ViewLeague.PAGE + "?faces-redirect=true";
- }
-}
diff --git a/application/src/main/java/eclipselink/example/mysports/application/view/CreateTeam.java b/application/src/main/java/eclipselink/example/mysports/application/view/CreateTeam.java
deleted file mode 100644
index a2da175..0000000
--- a/application/src/main/java/eclipselink/example/mysports/application/view/CreateTeam.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * dclarke - EclipseLink 2.3 - MySports Demo Bug 344608
- ******************************************************************************/
-package eclipselink.example.mysports.application.view;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.faces.application.FacesMessage;
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.SessionScoped;
-import javax.faces.component.html.HtmlDataTable;
-import javax.faces.context.FacesContext;
-
-import eclipselink.example.mysports.application.model.Player;
-import eclipselink.example.mysports.application.model.Team;
-
-/**
- * JSF managed bean used to create a new {@link Team}. An empty {@link Team}
- * instance is created and used as the target in the {@link BaseTeamBean} with a
- * default set of empty {@link Player}
- *
- * @author dclarke
- * @since EclipseLink 2.3.0
- */
-@ManagedBean(name = CreateTeam.NAME)
-@SessionScoped
-public class CreateTeam extends BaseTeamBean {
-
- protected static final String NAME = "createTeam";
-
- protected static final String PAGE = "create-team?faces-redirect=true";
-
- @Override
- public String getPage() {
- return PAGE;
- }
-
- @Override
- public HtmlDataTable getDataTable() {
- return getDataTable(NAME, true);
- }
-
- @Override
- public String setTeam() {
- Team team = new Team();
- team.setName("");
- team.setDivision(getRepository().getCurrentDivision());
- team.getPlayers().clear();
- for (int index = 0; index < 12; index++) {
- team.addPlayer(new Player());
- }
- setTeam(team);
- return getPage();
- }
-
- public String create() {
- return setTeam();
- }
-
- public String save() {
- FacesContext facesCtxt = FacesContext.getCurrentInstance();
-
- if (getTeam().getName() == null || getTeam().getName().isEmpty()) {
- facesCtxt.addMessage(null, new FacesMessage("Invalid team Name"));
- }
-
- List<Player> validPlayers = getValidPlayers();
- if (validPlayers.isEmpty()) {
- facesCtxt.addMessage(null, new FacesMessage("Must have at least one player"));
- }
-
- if (!facesCtxt.getMessageList().isEmpty()) {
- return null;
- }
-
- getRepository().addTeam(getTeam().getName(), getValidPlayers(), null);
- return ViewDivision.PAGE;
- }
-
- /**
- * @return a list of players who have numbers and names
- */
- private List<Player> getValidPlayers() {
- List<Player> validPlayers = new ArrayList<Player>();
- for (Player player : getTeam().getPlayers()) {
- if (player.isValid()) {
- validPlayers.add(player);
- }
- }
- return validPlayers;
- }
-
-}
diff --git a/application/src/main/java/eclipselink/example/mysports/application/view/EditDivision.java b/application/src/main/java/eclipselink/example/mysports/application/view/EditDivision.java
deleted file mode 100644
index f9fe711..0000000
--- a/application/src/main/java/eclipselink/example/mysports/application/view/EditDivision.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * dclarke - EclipseLink 2.3 - MySports Demo Bug 344608
- ******************************************************************************/
-package eclipselink.example.mysports.application.view;
-
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.RequestScoped;
-import javax.faces.context.FacesContext;
-import javax.servlet.http.HttpServletRequest;
-
-import eclipselink.example.mysports.application.model.Division;
-
-/**
- *
- * @author dclarke
- * @since EclipseLink 2.3
- */
-@ManagedBean
-@RequestScoped
-public class EditDivision extends BaseManagedBean {
-
- protected static final String PAGE = "edit-division";
-
- public Division getDivision() {
- return getRepository().getCurrentDivision();
- }
-
- public String edit() {
- FacesContext facesContext = FacesContext.getCurrentInstance();
- HttpServletRequest myRequest = (HttpServletRequest) facesContext.getExternalContext().getRequest();
- String value = myRequest.getParameter("division-id");
-
- if (value != null && !value.isEmpty()) {
- Division div = getRepository().find(Division.class, Integer.valueOf(value));
- getRepository().setCurrentDivision(div);
- }
-
- return PAGE;
- }
-
- public String save() {
- return null;
- }
-
- public String cancel() {
- return ViewDivision.PAGE;
- }
-}
diff --git a/application/src/main/java/eclipselink/example/mysports/application/view/EditTeam.java b/application/src/main/java/eclipselink/example/mysports/application/view/EditTeam.java
deleted file mode 100644
index b056294..0000000
--- a/application/src/main/java/eclipselink/example/mysports/application/view/EditTeam.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * dclarke - EclipseLink 2.3 - MySports Demo Bug 344608
- ******************************************************************************/
-package eclipselink.example.mysports.application.view;
-
-import javax.faces.application.FacesMessage;
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.ManagedProperty;
-import javax.faces.bean.SessionScoped;
-import javax.faces.component.html.HtmlDataTable;
-import javax.faces.context.FacesContext;
-
-import eclipselink.example.mysports.application.model.Team;
-
-@ManagedBean(name = EditTeam.NAME)
-@SessionScoped
-public class EditTeam extends BaseTeamBean {
-
- protected static final String PAGE = "edit-team?faces-redirect=true";
-
- protected static final String NAME = "editTeam";
-
- @ManagedProperty(value = "#{viewTeam}")
- private ViewTeam viewTeam;
-
- @Override
- public String getPage() {
- return PAGE;
- }
-
- @Override
- public HtmlDataTable getDataTable() {
- return getDataTable(NAME, true);
- }
-
- public ViewTeam getViewTeam() {
- return viewTeam;
- }
-
- public void setViewTeam(ViewTeam viewTeam) {
- this.viewTeam = viewTeam;
- }
-
- public String save() {
- FacesContext facesCtxt = FacesContext.getCurrentInstance();
-
- if (getTeam().getName() == null || getTeam().getName().isEmpty()) {
- facesCtxt.addMessage(null, new FacesMessage("Invalid Team Name"));
- return null;
- }
-
- Team team = getRepository().mergeTeam(getTeam());
- getViewTeam().setTeam(team);
-
- return ViewTeam.PAGE;
- }
-
- public String cancel() {
- return ViewTeam.PAGE;
- }
-}
diff --git a/application/src/main/java/eclipselink/example/mysports/application/view/ExtensibleEntity.java b/application/src/main/java/eclipselink/example/mysports/application/view/ExtensibleEntity.java
deleted file mode 100644
index 9d84e9d..0000000
--- a/application/src/main/java/eclipselink/example/mysports/application/view/ExtensibleEntity.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * dclarke - EclipseLink 2.3 - MySports Demo Bug 344608
- ******************************************************************************/
-package eclipselink.example.mysports.application.view;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import eclipselink.example.mysports.application.model.Extensible;
-
-/**
- * {@link Extensible} type wrapper used in JSF pages to allow access to the
- * extended attributes through standard JSP EL.
- * <p>
- * Static Attribute: #{player.entity.firstName}
- * <p>
- * Extended Attribute: #{player.get('middleName').value}
- *
- * @author dclarke
- * @since EclipseLink 2.3.0
- */
-public class ExtensibleEntity<T> {
-
- private Extensible entity;
-
- private Map<String, AttributeValue> values;
-
- public ExtensibleEntity(Extensible entity) {
- this.entity = entity;
- this.values = new HashMap<String, AttributeValue>();
- }
-
- @SuppressWarnings("unchecked")
- public T getEntity() {
- return (T) entity;
- }
-
- public AttributeValue get(String attributeName) {
- AttributeValue value = this.values.get(attributeName);
- if (value == null) {
- value = new AttributeValue(attributeName);
- this.values.put(attributeName, value);
- }
- return value;
- }
-
- public class AttributeValue {
-
- private String attribute;
-
- AttributeValue(String attribute) {
- this.attribute = attribute;
- }
-
- String getAttributeName() {
- return attribute;
- }
-
- public Object getValue() {
- return ExtensibleEntity.this.entity.get(getAttributeName());
- }
-
- public void setValue(Object value) {
- ExtensibleEntity.this.entity.set(getAttributeName(), value);
- }
- }
-
-}
diff --git a/application/src/main/java/eclipselink/example/mysports/application/view/LeagueRepositoryBean.java b/application/src/main/java/eclipselink/example/mysports/application/view/LeagueRepositoryBean.java
deleted file mode 100644
index 39bb396..0000000
--- a/application/src/main/java/eclipselink/example/mysports/application/view/LeagueRepositoryBean.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * dclarke - EclipseLink 2.3 - MySports Demo Bug 344608
- ******************************************************************************/
-package eclipselink.example.mysports.application.view;
-
-import javax.ejb.EJB;
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.SessionScoped;
-import javax.faces.context.FacesContext;
-import javax.servlet.http.HttpServletRequest;
-
-import eclipselink.example.mysports.application.services.LeagueRepository;
-
-/**
- * JSF session scoped managed bean which looks after access to the stateful
- * {@link LeagueRepository} EJB.
- *
- * @author dclarke
- * @since EclipseLink 2.3.0
- */
-@ManagedBean
-@SessionScoped
-public class LeagueRepositoryBean {
-
- @EJB
- private LeagueRepository repository;
-
- public LeagueRepository getRepository() {
- return repository;
- }
-
- public void setRepository(LeagueRepository repository) {
- this.repository = repository;
- }
-
- public String setLeague() {
- FacesContext facesContext = FacesContext.getCurrentInstance();
- HttpServletRequest myRequest = (HttpServletRequest) facesContext.getExternalContext().getRequest();
- String value = myRequest.getParameter("league");
-
- getRepository().setLeagueId(value, null);
- if (!getRepository().hasLeague()) {
- return "index?faces-redirect=true";
- }
-
- return "view-league?faces-redirect=true";
- }
-
- public String getLeagueId() {
- return getRepository().getLeagueId();
- }
-
- public String getLeagueName() {
- return getRepository().getName();
- }
-
- public boolean hasLeague() {
- return getRepository().hasLeague();
- }
-
-}
diff --git a/application/src/main/java/eclipselink/example/mysports/application/view/LeaguesList.java b/application/src/main/java/eclipselink/example/mysports/application/view/LeaguesList.java
deleted file mode 100644
index 03b825f..0000000
--- a/application/src/main/java/eclipselink/example/mysports/application/view/LeaguesList.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * dclarke - EclipseLink 2.3 - MySports Demo Bug 344608
- ******************************************************************************/
-package eclipselink.example.mysports.application.view;
-
-import javax.faces.bean.ManagedBean;
-
-import eclipselink.example.mysports.application.admin.HostedLeagues;
-
-/**
- * Return list of available Leagues from JAX-RS call to MySports Admin app.
- *
- * @author dclarke
- * @since EclipseLink 2.3.0
- */
-@ManagedBean
-public class LeaguesList extends BaseManagedBean {
-
- protected static final String PAGE = "index";
-
- private HostedLeagues leagues;
-
- public HostedLeagues getLeagues() {
- if (this.leagues == null) {
- this.leagues = getRepositoryBean().getRepository().getAdminConnector().getLeagues();
- }
- return this.leagues;
- }
-}
diff --git a/application/src/main/java/eclipselink/example/mysports/application/view/LookAndFeel.java b/application/src/main/java/eclipselink/example/mysports/application/view/LookAndFeel.java
deleted file mode 100644
index 1b9111a..0000000
--- a/application/src/main/java/eclipselink/example/mysports/application/view/LookAndFeel.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * dclarke - EclipseLink 2.3 - MySports Demo Bug 344608
- ******************************************************************************/
-package eclipselink.example.mysports.application.view;
-
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.SessionScoped;
-import javax.faces.context.ExternalContext;
-import javax.faces.context.FacesContext;
-
-/**
- * JSF managed bean used to provide custom the look and feel of the UI in a
- * league specific manner
- *
- * @author dclarke
- * @since EclipseLink 2.3.0
- */
-@ManagedBean
-@SessionScoped
-public class LookAndFeel extends BaseManagedBean {
-
- private String adminServerURL;
-
- private String getAdminServerURL() {
- if (this.adminServerURL == null) {
- ExternalContext ctxt = FacesContext.getCurrentInstance().getExternalContext();
-
- this.adminServerURL = ctxt.getRequestScheme() + "://" + ctxt.getRequestServerName() + ":" + ctxt.getRequestServerPort();
- this.adminServerURL += "/MySportsAdmin/rest/league"; // TODO
- }
- return this.adminServerURL;
- }
-
- public String getCss() {
- return getAdminServerURL() + "/" + getLeagueId() + ".css";
- }
-
- public String getLogo() {
- return getAdminServerURL() + "/" + getLeagueId() + ".png";
- }
-
-}
diff --git a/application/src/main/java/eclipselink/example/mysports/application/view/MySportsPhaseListener.java b/application/src/main/java/eclipselink/example/mysports/application/view/MySportsPhaseListener.java
deleted file mode 100644
index e96fcbc..0000000
--- a/application/src/main/java/eclipselink/example/mysports/application/view/MySportsPhaseListener.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * dclarke - EclipseLink 2.3 - MySports Demo Bug 344608
- ******************************************************************************/
-package eclipselink.example.mysports.application.view;
-
-import java.io.IOException;
-
-import javax.faces.context.FacesContext;
-import javax.faces.event.PhaseEvent;
-import javax.faces.event.PhaseId;
-import javax.faces.event.PhaseListener;
-
-public class MySportsPhaseListener implements PhaseListener {
- private static final long serialVersionUID = 1L;
-
- @Override
- public void afterPhase(PhaseEvent event) {
- FacesContext facesContext = event.getFacesContext();
- if(facesContext.getViewRoot()==null){
- try{
- facesContext.getExternalContext().redirect("/");
- facesContext.responseComplete();
- } catch (IOException e){
- e.printStackTrace();
- }
- }
- }
-
- @Override
- public void beforePhase(PhaseEvent arg0) {
- // TODO Auto-generated method stub
-
- }
-
- @Override
- public PhaseId getPhaseId() {
- // TODO Auto-generated method stub
- return null;
- }
-
-}
diff --git a/application/src/main/java/eclipselink/example/mysports/application/view/NoCacheFilter.java b/application/src/main/java/eclipselink/example/mysports/application/view/NoCacheFilter.java
deleted file mode 100644
index 0ddd6b4..0000000
--- a/application/src/main/java/eclipselink/example/mysports/application/view/NoCacheFilter.java
+++ /dev/null
@@ -1,51 +0,0 @@
-package eclipselink.example.mysports.application.view;
-
-import java.io.IOException;
-
-import javax.faces.application.ResourceHandler;
-import javax.servlet.Filter;
-import javax.servlet.FilterChain;
-import javax.servlet.FilterConfig;
-import javax.servlet.ServletException;
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
-import javax.servlet.annotation.WebFilter;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-@WebFilter(servletNames = { "Faces Servlet" })
-// Must match <servlet-name> of your FacesServlet.
-public class NoCacheFilter implements Filter {
-
- @Override
- public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
- HttpServletRequest req = (HttpServletRequest) request;
- HttpServletResponse res = (HttpServletResponse) response;
-
- if (!req.getRequestURI().startsWith(req.getContextPath() + ResourceHandler.RESOURCE_IDENTIFIER)) { // Skip
- // JSF
- // resources
- // (CSS/JS/Images/etc)
- res.setHeader("Cache-Control", "no-cache, no-store, must-revalidate"); // HTTP
- // 1.1.
- res.setHeader("Pragma", "no-cache"); // HTTP 1.0.
- res.setDateHeader("Expires", 0); // Proxies.
- }
-
- chain.doFilter(request, response);
- }
-
- @Override
- public void destroy() {
- // TODO Auto-generated method stub
-
- }
-
- @Override
- public void init(FilterConfig arg0) throws ServletException {
- // TODO Auto-generated method stub
-
- }
-
- // ...
-}
diff --git a/application/src/main/java/eclipselink/example/mysports/application/view/ViewDivision.java b/application/src/main/java/eclipselink/example/mysports/application/view/ViewDivision.java
deleted file mode 100644
index b32886c..0000000
--- a/application/src/main/java/eclipselink/example/mysports/application/view/ViewDivision.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * dclarke - EclipseLink 2.3 - MySports Demo Bug 344608
- ******************************************************************************/
-package eclipselink.example.mysports.application.view;
-
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.RequestScoped;
-import javax.faces.context.FacesContext;
-import javax.servlet.http.HttpServletRequest;
-
-import eclipselink.example.mysports.application.model.Division;
-
-/**
- * JSF managed bean to view a division with its teams.
- *
- * @author dclarke
- * @since EclipseLink 2.3.0
- */
-@ManagedBean
-@RequestScoped
-public class ViewDivision extends BaseManagedBean {
-
- protected static final String PAGE = "view-division";
-
- public Division getDivision() {
- return getRepository().getCurrentDivision();
- }
-
- public String view() {
- FacesContext facesContext = FacesContext.getCurrentInstance();
- HttpServletRequest myRequest = (HttpServletRequest) facesContext.getExternalContext().getRequest();
- String value = myRequest.getParameter("division-id");
-
- if (value != null && !value.isEmpty()) {
- Division div = getRepository().find(Division.class, Integer.valueOf(value));
- getRepository().setCurrentDivision(div);
- }
-
- return PAGE;
- }
-}
diff --git a/application/src/main/java/eclipselink/example/mysports/application/view/ViewLeague.java b/application/src/main/java/eclipselink/example/mysports/application/view/ViewLeague.java
deleted file mode 100644
index d9f59bc..0000000
--- a/application/src/main/java/eclipselink/example/mysports/application/view/ViewLeague.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * dclarke - EclipseLink 2.3 - MySports Demo Bug 344608
- ******************************************************************************/
-package eclipselink.example.mysports.application.view;
-
-import java.util.List;
-
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.RequestScoped;
-
-import eclipselink.example.mysports.application.model.Division;
-import eclipselink.example.mysports.application.services.LeagueRepository;
-
-/**
- * JSF managed bean used to view a league's divisions.
- *
- * @author dclarke
- * @since EclipseLink 2.3.0
- */
-@ManagedBean
-@RequestScoped
-public class ViewLeague extends BaseManagedBean {
-
- protected static final String PAGE = "view-league";
-
- public LeagueRepository getRepository() {
- return getRepositoryBean().getRepository();
- }
-
- public String getLeagueId() {
- return getRepository().getLeagueId();
- }
-
- public List<Division> getDivisions() {
- return getRepository().getDivisions();
- }
-
- public Division getCurrentDivision() {
- return getRepository().getCurrentDivision();
- }
-
- public String getLeagueName() {
- return getRepository().getName();
- }
-
- public String view() {
- return PAGE;
- }
-
-}
diff --git a/application/src/main/java/eclipselink/example/mysports/application/view/ViewTeam.java b/application/src/main/java/eclipselink/example/mysports/application/view/ViewTeam.java
deleted file mode 100644
index 8578b55..0000000
--- a/application/src/main/java/eclipselink/example/mysports/application/view/ViewTeam.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * dclarke - EclipseLink 2.3 - MySports Demo Bug 344608
- ******************************************************************************/
-package eclipselink.example.mysports.application.view;
-
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.SessionScoped;
-import javax.faces.component.html.HtmlDataTable;
-
-/**
- * JSF managed bean displaying a team.
- *
- * @author dclarke
- * @since EclipseLink 2.3.0
- */
-@ManagedBean(name=ViewTeam.NAME)
-@SessionScoped
-public class ViewTeam extends BaseTeamBean {
-
- protected static final String NAME = "viewTeam";
-
- protected static final String PAGE = "view-team?faces-redirect=true";
-
- @Override
- public String getPage() {
- return PAGE;
- }
-
- @Override
- public HtmlDataTable getDataTable() {
- return getDataTable(NAME, false);
- }
-
-}
diff --git a/application/src/main/java/resources/application.properties b/application/src/main/java/resources/application.properties
deleted file mode 100644
index 5b9198d..0000000
--- a/application/src/main/java/resources/application.properties
+++ /dev/null
@@ -1,7 +0,0 @@
-# -- welcome --
-welcomeTitle=JSF Blank Application
-
-welcomeHeading=Welcome!
-
-welcomeMessage=This is a JSF blank application. \
- You can find the application.properties file with this message in the src/resources folder.
diff --git a/application/src/main/resources/META-INF/eclipselink-oxm.xml b/application/src/main/resources/META-INF/eclipselink-oxm.xml
deleted file mode 100644
index c067988..0000000
--- a/application/src/main/resources/META-INF/eclipselink-oxm.xml
+++ /dev/null
@@ -1,53 +0,0 @@
-<?xml version="1.0"?>
-<xml-bindings version="2.3"
- xmlns="http://www.eclipse.org/eclipselink/xsds/persistence/oxm"
- package-name="eclipselink.example.mysports.application.model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.eclipse.org/eclipselink/xsds/persistence/oxm http://www.eclipse.org/eclipselink/xsds/eclipselink_oxm_2_3.xsd">
- <java-types>
- <java-type name="Divisions" xml-accessor-type="FIELD">
- <java-attributes>
- <xml-element java-attribute="divisions" xml-path="divisions" />
- </java-attributes>
- </java-type>
- <java-type name="Division" xml-accessor-type="FIELD">
- <xml-root-element />
- <xml-virtual-access-methods />
- <java-attributes>
- <xml-attribute java-attribute="id" />
- <xml-attribute java-attribute="version" />
- <xml-attribute java-attribute="name" />
- <xml-element java-attribute="teams" xml-path="teams/team" />
- <xml-transient java-attribute="attributes" />
- <xml-transient java-attribute="defaultDivision" />
- </java-attributes>
- </java-type>
- <java-type name="Team" xml-accessor-type="FIELD">
- <xml-root-element />
- <xml-virtual-access-methods />
- <java-attributes>
- <xml-attribute java-attribute="id" />
- <xml-attribute java-attribute="version" />
- <xml-element java-attribute="name" />
- <xml-element java-attribute="players" xml-path="players/player" />
- <xml-inverse-reference java-attribute="division"
- mapped-by="teams" />
- <xml-transient java-attribute="attributes" />
- </java-attributes>
- </java-type>
- <java-type name="Player" xml-accessor-type="FIELD">
- <xml-root-element />
- <xml-virtual-access-methods />
- <java-attributes>
- <xml-attribute java-attribute="id" />
- <xml-attribute java-attribute="version" />
- <xml-attribute java-attribute="userid" />
- <xml-element java-attribute="firstName" />
- <xml-element java-attribute="lastName" />
- <xml-element java-attribute="email" />
- <xml-inverse-reference java-attribute="team"
- mapped-by="players" />
- <xml-transient java-attribute="attributes" />
- </java-attributes>
- </java-type>
- </java-types>
-</xml-bindings> \ No newline at end of file
diff --git a/application/src/main/resources/META-INF/local-eclipselink-orm.xml b/application/src/main/resources/META-INF/local-eclipselink-orm.xml
deleted file mode 100644
index effc5f0..0000000
--- a/application/src/main/resources/META-INF/local-eclipselink-orm.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<entity-mappings version="2.4"
- xmlns="http://www.eclipse.org/eclipselink/xsds/persistence/orm"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.eclipse.org/eclipselink/xsds/persistence/orm http://www.eclipse.org/eclipselink/xsds/eclipselink_orm_2_4.xsd">
-
-
-
-</entity-mappings>
diff --git a/application/src/main/resources/META-INF/persistence.xml b/application/src/main/resources/META-INF/persistence.xml
deleted file mode 100644
index b2efd78..0000000
--- a/application/src/main/resources/META-INF/persistence.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
- <persistence-unit name="mysports" transaction-type="RESOURCE_LOCAL">
- <provider>eclipselink.example.mysports.persistence.TenantPerEMFProvider</provider>
- <non-jta-data-source>java:global/mysports</non-jta-data-source>
- <mapping-file>META-INF/local-eclipselink-orm.xml</mapping-file>
-
- <class>eclipselink.example.mysports.application.model.Division</class>
- <class>eclipselink.example.mysports.application.model.Team</class>
- <class>eclipselink.example.mysports.application.model.Player</class>
- <class>eclipselink.example.mysports.application.model.User</class>
- <exclude-unlisted-classes>true</exclude-unlisted-classes>
- <validation-mode>NONE</validation-mode>
-
- <properties>
- <!-- Logging Config -->
- <property name="eclipselink.logging.level" value="FINE"/>
- <property name="eclipselink.logging.timestamp" value="false"/>
- <property name="eclipselink.logging.thread" value="false"/>
- <property name="eclipselink.logging.connection" value="false"/>
- <property name="eclipselink.logging.level.metadata" value="WARNING"/>
- <property name="eclipselink.logging.parameters" value="true"/>
- <property name="eclipselink.logging.session" value="false"/>
- <property name="eclipselink.logging.exceptions" value="false"/>
- <property name="eclipselink.logging.level.metadata" value="WARNING"/>
- </properties>
- </persistence-unit>
-</persistence>
diff --git a/application/src/main/resources/my-sports.properties b/application/src/main/resources/my-sports.properties
deleted file mode 100644
index 2d65d29..0000000
--- a/application/src/main/resources/my-sports.properties
+++ /dev/null
@@ -1,3 +0,0 @@
-mysports.admin.context=/MySportsAdmin/rest/league
-mysports.admin-connector=eclipselink.example.mysports.mysports.application.admin.RESTAdminServerConnector
-mysports.persistence-unit=mysports \ No newline at end of file
diff --git a/application/src/main/resources/resources/application.properties b/application/src/main/resources/resources/application.properties
deleted file mode 100644
index f7fad0b..0000000
--- a/application/src/main/resources/resources/application.properties
+++ /dev/null
@@ -1,5 +0,0 @@
-# -- welcome --
-welcomeHeading=Welcome to MySports
-generalHeading=MySports
-
-welcomeMessage=This is a demo application showing multi-tenancy and extensibility.
diff --git a/application/src/main/webapp/META-INF/MANIFEST.MF b/application/src/main/webapp/META-INF/MANIFEST.MF
deleted file mode 100644
index 254272e..0000000
--- a/application/src/main/webapp/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,3 +0,0 @@
-Manifest-Version: 1.0
-Class-Path:
-
diff --git a/application/src/main/webapp/WEB-INF/faces-config.xml b/application/src/main/webapp/WEB-INF/faces-config.xml
deleted file mode 100644
index 6b9c92a..0000000
--- a/application/src/main/webapp/WEB-INF/faces-config.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<faces-config xmlns="http://java.sun.com/xml/ns/javaee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"
- version="2.0">
- <application>
- <message-bundle>resources.application</message-bundle>
- <locale-config>
- <default-locale>en</default-locale>
- </locale-config>
- </application>
-
- <lifecycle>
- <phase-listener>eclipselink.example.mysports.application.view.MySportsPhaseListener</phase-listener>
- </lifecycle>
-
-</faces-config>
diff --git a/application/src/main/webapp/WEB-INF/sun-web.xml b/application/src/main/webapp/WEB-INF/sun-web.xml
deleted file mode 100644
index 5193bb2..0000000
--- a/application/src/main/webapp/WEB-INF/sun-web.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server 9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
-<sun-web-app error-url="/faces/error.xhtml">
- <context-root>/MySports</context-root>
-
-<security-role-mapping>
- <role-name>JPA-RS</role-name>
- <group-name>JPA-RS</group-name>
-</security-role-mapping>
-
- <class-loader delegate="true" />
-
- <jsp-config>
- <property name="keepgenerated" value="true">
- <description>Keep a copy of the generated servlet class java code.</description>
- </property>
- </jsp-config>
-
-
-</sun-web-app>
diff --git a/application/src/main/webapp/WEB-INF/web.xml b/application/src/main/webapp/WEB-INF/web.xml
deleted file mode 100644
index 5c2c718..0000000
--- a/application/src/main/webapp/WEB-INF/web.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0">
- <display-name>MySports</display-name>
- <welcome-file-list>
- <welcome-file>faces/index.xhtml</welcome-file>
- </welcome-file-list>
- <servlet>
- <servlet-name>Faces Servlet</servlet-name>
- <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
- <load-on-startup>1</load-on-startup>
- </servlet>
- <servlet-mapping>
- <servlet-name>Faces Servlet</servlet-name>
- <url-pattern>/faces/*</url-pattern>
- </servlet-mapping>
-</web-app> \ No newline at end of file
diff --git a/application/src/main/webapp/WEB-INF/weblogic.xml b/application/src/main/webapp/WEB-INF/weblogic.xml
deleted file mode 100644
index a31a19c..0000000
--- a/application/src/main/webapp/WEB-INF/weblogic.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<wls:weblogic-web-app xmlns:wls="http://xmlns.oracle.com/weblogic/weblogic-web-app" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd http://xmlns.oracle.com/weblogic/weblogic-web-app http://xmlns.oracle.com/weblogic/weblogic-web-app/1.4/weblogic-web-app.xsd">
- <wls:context-root>application</wls:context-root>
-</wls:weblogic-web-app> \ No newline at end of file
diff --git a/application/src/main/webapp/create-division.xhtml b/application/src/main/webapp/create-division.xhtml
deleted file mode 100644
index c7ea94d..0000000
--- a/application/src/main/webapp/create-division.xhtml
+++ /dev/null
@@ -1,36 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml"
- xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:h="http://java.sun.com/jsf/html"
- xmlns:f="http://java.sun.com/jsf/core">
-
-<ui:composition template="template.jsf">
- <ui:define name="title">
- <h:outputText value="#{viewLeague.leagueId}" />
- </ui:define>
- <ui:define name="subtitle">
- <h:outputText value="Create Division" />
- </ui:define>
- <ui:define name="crumb1">
- <h:commandLink value="MySports" action="index" style="crumb"/>
- </ui:define>
-
- <ui:define name="body">
- <h:form>
- <h:panelGrid width="100%" columns="2" border="1" styleClass="pretty">
- <h:outputLabel value="Division Name:"/>
- <h:inputText value="#{createDivision.name}" />
- <f:facet name="footer">
- <div align="center">
- <h:commandButton value="Create" action="#{createDivision.create}"/>
- <h:commandButton value="Cancel" action="#{createDivision.cancel}"/>
- </div>
- </f:facet>
- </h:panelGrid>
-
- </h:form>
- </ui:define>
-</ui:composition>
-</html> \ No newline at end of file
diff --git a/application/src/main/webapp/create-team.xhtml b/application/src/main/webapp/create-team.xhtml
deleted file mode 100644
index 625cebe..0000000
--- a/application/src/main/webapp/create-team.xhtml
+++ /dev/null
@@ -1,51 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml"
- xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:h="http://java.sun.com/jsf/html"
- xmlns:f="http://java.sun.com/jsf/core">
-
-<ui:composition template="template.jsf">
- <ui:define name="title">
- <h:outputText
- value="#{viewLeague.leagueId}: #{viewDivision.division.name}" />
- </ui:define>
- <ui:define name="subtitle">
- <h:outputText value="Create Team" />
- </ui:define>
- <ui:define name="crumb1">
- <h:commandLink value="MySports" action="index" />
- </ui:define>
- <ui:define name="crumb2">
- <h:commandLink value="#{viewLeague.leagueId}"
- action="#{viewLeague.view}" />
- </ui:define>
- <ui:define name="crumb3">
- <h:commandLink value="#{viewLeague.currentDivision.name}"
- action="#{viewDivision.view}" />
- </ui:define>
- <ui:define name="body">
- <h:form>
-
- <h:panelGrid width="100%" columns="2" border="1" styleClass="pretty">
- <f:facet name="header">
- <div align="right">
- <h:commandButton action="#{createTeam.save}" value="Save" />
- &nbsp;
- <h:commandButton action="#{createTeam.cancel}" value="Cancel" />
- </div>
- </f:facet>
- <h:outputLabel value="Name:" />
- <h:inputText value="#{createTeam.team.name}" size="80"/>
- <h:outputLabel value="Division: " />
- <h:outputLabel value="#{createTeam.currentDivision.name}" />
- </h:panelGrid>
-
- <h:dataTable binding="#{createTeam.dataTable}">
- </h:dataTable>
-
- </h:form>
- </ui:define>
-</ui:composition>
-</html> \ No newline at end of file
diff --git a/application/src/main/webapp/default.css b/application/src/main/webapp/default.css
deleted file mode 100644
index 0ff180c..0000000
--- a/application/src/main/webapp/default.css
+++ /dev/null
@@ -1,212 +0,0 @@
-#*******************************************************************************
-# * Copyright (c) 2010 Oracle. All rights reserved.
-# * This program and the accompanying materials are made available under the
-# * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
-# * which accompanies this distribution.
-# * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
-# * and the Eclipse Distribution License is available at
-# * http://www.eclipse.org/org/documents/edl-v10.php.
-# *
-# * Contributors:
-# * dclarke - MySports Example for EclipseLink 2.3
-# ******************************************************************************/
-BODY, P, LI, UL, OL {
- font-family: Arial, Helvetica, sans-serif;
- font-size: 50%;
- color:#000000;
- list-style-position: outside;
-}
-
-A:link {
- font-family: Arial, Helvetica, sans-serif;
- color:#663300;
-
-}
-
-A:active {
- font-family: Arial, Helvetica, sans-serif;
- color:#ff6600;
-
-}
-
-A:visited {
- font-family: Arial, Helvetica, sans-serif;
- color:#996633;
-
-}
-
-A.navigation:link
-{
- font-family: Arial, Helvetica, sans-serif;
- font-size:65%;
- color:#996633;
-}
-
-A.navigation:active
-{
- font-family: Arial, Helvetica, sans-serif;
- font-size:65%;
- color:#996633;
-}
-
-A.navigation:visited
-{
- font-family: Arial, Helvetica, sans-serif;
- font-size:65%;
- color:#996633;
-}
-
-.clear { /* generic container (i.e. div) for floating buttons */
- overflow: hidden;
- width: 100%;
-}
-
-c.button {
- background: transparent url('../images/bg_button_a.gif') no-repeat scroll top right;
- color: #444;
- display: block;
- float: left;
- font: normal 12px arial, sans-serif;
- height: 24px;
- margin-right: 6px;
- padding-right: 18px; /* sliding doors padding */
- text-decoration: none;
-}
-
-a.button span {
- background: transparent url('../images/bg_button_span.gif') no-repeat;
- display: block;
- line-height: 14px;
- padding: 5px 0 5px 18px;
-}
-
-a.button:active {
- background-position: bottom right;
- color: #000;
- outline: none; /* hide dotted outline in Firefox */
-}
-
-a.button:active span {
- background-position: bottom left;
- padding: 6px 0 4px 18px; /* push text down 1px */
-}
-p.listpara
-{text-indent: 15%}
-
-H1 {
- font-family: Arial, Helvetica, sans-serif;
- font-size:170%;
- color:#336699;
- border : solid ##3333CC;
- width : 100%;
- border-width : 0px 0px 2px 0px;
- margin-left: 20px;
-}
-
-H2 {
- font-family: Arial, Helvetica, sans-serif;
- font-size:130%;
- font-style: italic;
- color: white;
- width : 100%;
- margin-left: 20px;
-}
-
-H3 {
- font-family: Arial, Helvetica, sans-serif;
- font-size:110%;
- color:#336699;
- border : solid #CCCC99;
- width : 100%;
- border-width : 0px 0px 2px 0px;
-}
-
-H4 {
- font-family: Arial, Helvetica, sans-serif;
- font-size:92%;
- color:#000000;
- font-weight: bold;
- width : 100%;
-}
-
-.code_no_color {
- color : #000000;
- font-family : "Courier New", "Courier", "monospace";
-}
-
-code {
- color : #336699;
- font-family : "Courier New", "Courier", "monospace";
-}
-
-P.indent {
- text-indent: 9%;
-}
-
-table.borders {
- border : 1% solid #BDB76B;
-}
-
-TR {
- text-align : left;
- vertical-align : top;
-}
-
-TH {
- font-family: Arial, Helvetica, sans-serif;
- font-size: 11pt;
- color:#000000;
- font-weight: bold;
-}
-
-TD {
- font-family: Arial, Helvetica, sans-serif;
- font-size: 11pt;
- color:#000000;
-}
-
-.smalltext {
- font-size:80%;
-}
-
-p.note {
- display: block;
- font-family: Arial, Helvetica, Geneva, sans-serif;
- font-size: 95%;
-}
-
-p.warning {
- display: block;
- font-family: Arial, Helvetica, Geneva, sans-serif;
- font-size: 95%;
-}
-
-pre {
- font-family: "Courier New", Courier, mono;
- font-size: 92%;
- text-indent : 15%;
-}
-
-table.pretty {
- background: whitesmoke;
- border-collapse: collapse;
-}
-table.pretty th, table.pretty td {
- border: 1px silver solid;
- padding: 0.2em;
- font-size: 10pt;
-}
-table.pretty th {
- background: brown;
- text-align: left;
- color: white;
-}
-table.pretty caption {
- margin-left: inherit;
- margin-right: inherit;
-}
-
-table.accent {
- background: brown;
-}
-
diff --git a/application/src/main/webapp/edit-team.xhtml b/application/src/main/webapp/edit-team.xhtml
deleted file mode 100644
index 2250465..0000000
--- a/application/src/main/webapp/edit-team.xhtml
+++ /dev/null
@@ -1,43 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml"
- xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:h="http://java.sun.com/jsf/html"
- xmlns:f="http://java.sun.com/jsf/core">
-
-<ui:composition template="template.jsf">
- <ui:define name="title">
- <h:outputText value="Team: #{viewTeam.team.name}" />
- </ui:define>
- <ui:define name="subtitle">
- <h:outputText value="Modify Team" />
- </ui:define>
- <ui:define name="crumb1">
- <h:commandLink value="MySports" action="index" />
- </ui:define>
- <ui:define name="crumb2">
- <h:commandLink value="#{viewLeague.leagueId}"
- action="#{viewLeague.view}" />
- </ui:define>
- <ui:define name="crumb3">
- <h:commandLink value="#{viewLeague.currentDivision.name}"
- action="#{viewDivision.view}" />
- </ui:define>
- <ui:define name="body">
- <h:form>
-
- <h:panelGrid width="100%" columns="2" border="1">
- <h:outputLabel value="Name:" />
- <h:inputText value="#{editTeam.team.name}" />
- </h:panelGrid>
- <h3>Players</h3>
- <h:dataTable binding="#{editTeam.dataTable}" />
- <div align="center">
- <h:commandButton action="#{editTeam.save}" value="Save" />
- <h:commandButton action="#{editTeam.cancel}" value="Cancel" />
- </div>
- </h:form>
- </ui:define>
-</ui:composition>
-</html> \ No newline at end of file
diff --git a/application/src/main/webapp/images/add_obj.gif b/application/src/main/webapp/images/add_obj.gif
deleted file mode 100644
index 252d7eb..0000000
--- a/application/src/main/webapp/images/add_obj.gif
+++ /dev/null
Binary files differ
diff --git a/application/src/main/webapp/images/bg_button_a.gif b/application/src/main/webapp/images/bg_button_a.gif
deleted file mode 100644
index c8e740d..0000000
--- a/application/src/main/webapp/images/bg_button_a.gif
+++ /dev/null
Binary files differ
diff --git a/application/src/main/webapp/images/bg_button_span.gif b/application/src/main/webapp/images/bg_button_span.gif
deleted file mode 100644
index 7da2e19..0000000
--- a/application/src/main/webapp/images/bg_button_span.gif
+++ /dev/null
Binary files differ
diff --git a/application/src/main/webapp/images/eclipselink.png b/application/src/main/webapp/images/eclipselink.png
deleted file mode 100644
index 55b2a2f..0000000
--- a/application/src/main/webapp/images/eclipselink.png
+++ /dev/null
Binary files differ
diff --git a/application/src/main/webapp/images/mysports.png b/application/src/main/webapp/images/mysports.png
deleted file mode 100644
index 5e9adff..0000000
--- a/application/src/main/webapp/images/mysports.png
+++ /dev/null
Binary files differ
diff --git a/application/src/main/webapp/index.jsp b/application/src/main/webapp/index.jsp
deleted file mode 100644
index ab292c3..0000000
--- a/application/src/main/webapp/index.jsp
+++ /dev/null
@@ -1,13 +0,0 @@
-<%@page contentType="text/html" pageEncoding="UTF-8"%>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
- "http://www.w3.org/TR/html4/loose.dtd">
-
-<html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <title>JSP Page</title>
- </head>
- <body>
- <h1>Hello World!</h1>
- </body>
-</html>
diff --git a/application/src/main/webapp/index.xhtml b/application/src/main/webapp/index.xhtml
deleted file mode 100644
index ff0aff6..0000000
--- a/application/src/main/webapp/index.xhtml
+++ /dev/null
@@ -1,37 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml"
- xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:h="http://java.sun.com/jsf/html"
- xmlns:f="http://java.sun.com/jsf/core">
-
-
-<ui:composition template="leagues-template.jsf">
- <ui:define name="title">My Sports</ui:define>
- <ui:define name="body">
- <h2>Leagues</h2>
- <h:form>
- <div align="center">
- <h:dataTable var="league" value="#{leaguesList.leagues.leagues}"
- border="1" styleClass="pretty" width="500">
- <f:facet name="header">
- Leagues
- </f:facet>
- <h:column>
- <h:outputText value="#{league.id}" />
- </h:column>
- <h:column>
- <h:commandLink value="#{league.name}"
- action="#{leagueRepositoryBean.setLeague}">
- <f:param name="league" value="#{league.id}" />
- </h:commandLink>
- </h:column>
- </h:dataTable>
-
- </div>
- <p>&nbsp;</p>
- </h:form>
- </ui:define>
-</ui:composition>
-</html>
diff --git a/application/src/main/webapp/leagues-template.jsf b/application/src/main/webapp/leagues-template.jsf
deleted file mode 100644
index 33562a2..0000000
--- a/application/src/main/webapp/leagues-template.jsf
+++ /dev/null
@@ -1,65 +0,0 @@
-
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"
- xmlns:f="http://java.sun.com/jsf/core"
- xmlns:h="http://java.sun.com/jsf/html"
- xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:fmt="http://java.sun.com/jstl/fmt">
-<head>
-<title><ui:insert name="title" />
-</title>
-<link rel="stylesheet" type="text/css"
- href="default.css" />
-</head>
-<body>
- <f:view>
- <h:form>
- <table width="100%">
- <tr>
- <td width="100%">
- <table width="100%">
- <tr>
- <td width="100%" valign="bottom">
- <h1>
- <img src="images/mysports.png" alt="MySports" />
- </h1></td>
- <td width="50" align="center"></td>
-
- </tr>
- </table>
- </td>
- </tr>
- </table>
-
- <table width="100%" class="accent">
- <tr>
- <td><h2>
- <ui:insert name="subtitle" />
- </h2></td>
- </tr>
- </table>
-
- <i>
- <ui:insert name="crumb1" />&nbsp;
- <ui:insert name="crumb2" /> &nbsp;
- <ui:insert name="crumb3" /> &nbsp;
- <ui:insert name="crumb4" /> &nbsp;</i>
- <h:messages />
- </h:form>
-
- <ui:insert name="body" />
-
- <table width="100%" class="accent">
- <tr>
- <td height="10"></td>
- </tr>
- </table>
- <p/>
- <div align="center">
- Powered by:&nbsp; <a href="http://www.eclipse.org/eclipselink"><h:graphicImage
- url="/images/eclipselink.png" alt="EclipseLink" /> </a>
- </div>
- </f:view>
-</body>
-</html>
diff --git a/application/src/main/webapp/player/view.xhtml b/application/src/main/webapp/player/view.xhtml
deleted file mode 100644
index 1152b57..0000000
--- a/application/src/main/webapp/player/view.xhtml
+++ /dev/null
@@ -1,53 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml"
- xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:h="http://java.sun.com/jsf/html"
- xmlns:f="http://java.sun.com/jsf/core">
-
-<ui:composition template="../template.jsf">
- <ui:define name="title">
- <h:outputText value="Player: #{viewPlayer.player.displayName}" />
- </ui:define>
- <ui:define name="crumb1">
- <h:commandLink value="MySports" action="index" />
- </ui:define>
- <ui:define name="crumb2">
- <h:commandLink value="#{viewLeague.leagueId}"
- action="#{viewLeague.view}" />
- </ui:define>
- <ui:define name="crumb3">
- <h:commandLink value="#{viewLeague.currentDivision.name}"
- action="#{viewDivision.view}" />
- </ui:define>
- <ui:define name="crumb4">
- <h:commandLink value="#{viewPlayer.player.team.name}"
- action="#{viewPlayer.view}" />
- </ui:define>
-
- <ui:define name="body">
- <h:form>
- <h:panelGrid styleClass="pretty" width="500" columns="2" border="1">
- <f:facet name="header">
- <div align="right">
- <h:commandButton value="Edit" action="#{editPlayer.edit}"/>
- </div>
- </f:facet>
- <h:outputText value="First Name:"/>
- <h:outputText value="#{viewPlayer.player.firstName}"/>
- <h:outputText value="Last Name:"/>
- <h:outputText value="#{viewPlayer.player.lastName}"/>
- <f:facet name="footer">
- <div align="center"></div>
- </f:facet>
- </h:panelGrid>
-
- <h:dataTable binding="#{viewTeam.dataTable}" />
- <h:commandLink value="Modify" action="#{editTeam.setTeam}">
- <f:param name="team-id" value="#{viewTeam.team.id}" />
- </h:commandLink>
- </h:form>
- </ui:define>
-</ui:composition>
-</html> \ No newline at end of file
diff --git a/application/src/main/webapp/template.jsf b/application/src/main/webapp/template.jsf
deleted file mode 100644
index 9d4c9d0..0000000
--- a/application/src/main/webapp/template.jsf
+++ /dev/null
@@ -1,65 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"
- xmlns:f="http://java.sun.com/jsf/core"
- xmlns:h="http://java.sun.com/jsf/html"
- xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:fmt="http://java.sun.com/jstl/fmt">
-<f:loadBundle basename="resources.application" var="msg" />
-<head>
-<title><ui:insert name="title" /></title>
-<link rel="stylesheet" type="text/css" href="#{lookAndFeel.css}" />
-</head>
-<body>
- <f:view>
- <h:form>
- <table width="100%">
- <tr>
- <td width="100%">
- <table width="100%">
- <tr>
- <td width="200"><h:commandButton
- action="#{viewLeague.view}" image="#{lookAndFeel.logo}" /> </td>
- <td width="100%" valign="middle"><h1><h:outputLabel
- value="#{viewLeague.leagueName}" /></h1></td>
- <td width="100" valign="top" align="right"><h:commandButton
- value="MySports" action="#{viewLeague.home}" image="images/mysports.png"
- rendered="#{lookAndFeel.multitenant}" /></td>
- <td width="50" align="center"></td>
-
- </tr>
- </table>
- </td>
- </tr>
- </table>
-
- <table width="100%" class="accent">
- <tr>
- <td><h2>
- <ui:insert name="subtitle" />
- </h2></td>
- </tr>
- </table>
-
- <i> <ui:insert name="crumb1" />&nbsp; <ui:insert name="crumb2" />
- &nbsp; <ui:insert name="crumb3" /> &nbsp; <ui:insert name="crumb4" />
- &nbsp;
- </i>
- <h:messages />
- </h:form>
-
- <ui:insert name="body" />
- <p>&nbsp;</p>
- <table width="100%" class="accent">
- <tr>
- <td height="10"></td>
- </tr>
- </table>
- <p />
- <div align="center">
- Powered by:&nbsp; <a href="http://www.eclipse.org/eclipselink"><h:graphicImage
- url="/images/eclipselink.png" alt="EclipseLink" /> </a>
- </div>
- </f:view>
-</body>
-</html>
diff --git a/application/src/main/webapp/tsa/index.html b/application/src/main/webapp/tsa/index.html
deleted file mode 100644
index f524909..0000000
--- a/application/src/main/webapp/tsa/index.html
+++ /dev/null
@@ -1,59 +0,0 @@
-<!--
- Copyright 2012, Oracle and or its affiliates. All Rights Reserved.
- @author irfan.ahmed@oracle.com
--->
-<!DOCTYPE html>
-<html>
-<head>
-<title>My Sports</title>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<link href="mysports.css" rel="stylesheet" />
-
-<!-- DOJO deployed locally on the server -->
-<link href="/dojo/1.7.2/dijit/themes/claro/claro.css" rel="stylesheet" />
-<script src="/dojo/1.7.2/dojo/dojo.js"></script>
-
-<script src="mysports.js"></script>
-<script>
- djConfig = {
- isDebug : false,
- parseOnLoad : true
- }
-</script>
-<script>
- dojo.addOnLoad(function() {
- console.debug("Dojo Loaded: ", dojo.version);
- mysports = {
- server : new mysports.Server({
- rootUrl : '/MySports/persistence/mysports-', league : "OSL"
- }),
- navPanel : new mysports.NavPanel()
- }
- mysports.navPanel.init();
-
- });
-</script>
-</head>
-<body class="claro">
- <div class="mainContainer">
- <div class="masthead">
- <table>
- <tr>
- <td align="left"><img id="leagueLogo" /></td>
- <td width="100%" align="center" valign="top"></td>
- <td align="right" valign="top"><img src="../images/mysports.png"></td>
- </tr>
- </table>
- &nbsp;
- </div>
-
- <div class="navigation">
- <div id="tree"></div>
- </div>
- <div class="content">
-
- <div id="playersTableDiv"></div>
- </div>
- </div>
-</body>
-</html>
diff --git a/application/src/main/webapp/tsa/mysports.css b/application/src/main/webapp/tsa/mysports.css
deleted file mode 100644
index 29882d4..0000000
--- a/application/src/main/webapp/tsa/mysports.css
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- Document : demo
- Created on : 7 Jun, 2012, 2:04:42 AM
- Author : irfan.ahmed@oracle.com
- Description:
- Purpose of the stylesheet follows.
-*/
-
-body {
- font-size: 12px;
- color: #333;
- font-family: Ubuntu, Tahoma, Helvetica,Verdana,Arial,sans-serif;
-}
-
-.mainContainer {
-}
-
-.mainContainer .navigation {
- position: absolute;
- top: 200px;
- left: 0;
- width: 250px;
- bottom: 0;
-}
-
-.mainContainer .content {
- position: absolute;
- left: 251px;
- right: 0;
- top: 150px;
- bottom: 0;
- background-color: #fdfdfd;
-}
-
-#playersTableDiv {
- border: 1px solid #CCCCCC;
- border-radius: 4px 4px 4px 4px;
- margin: 20px;
- padding: 5px;
- background: #f0f0f0;
-}
-
-#playersTableDiv table {
- width: 100%;
- font-size: 11px;
- background: #fff;
-}
-
-#playersTableDiv table th, #playersTableDiv table td {
- border-color: #CCCCCC;
- padding: 2px 5px;
-}
-
-#playersTableDiv table th {
- color: #666666;
- text-transform: uppercase;
-}
-
-#playersTableDiv table td {
-
-}
-
-#playersTableDiv table caption {
- font-size: 13px;
- font-weight: bold;
- padding: 0 0 4px 1px;
- text-align: left;
-}
-
-.masthead {
- height: 200px;
- left: 0;
- position: absolute;
- right: 0;
- top: 0;
-}
-
-#popupbox {
- margin: 0;
- margin-left: 40%;
- margin-right: 40%;
- margin-top: 50px;
- padding-top: 10px;
- width: 20%;
- height: 250px;
- position: absolute;
- background: #FBFBF0;
- border: solid #000000 2px;
- z-index: 9;
- font-family: arial;
- visibility: hidden;
-} \ No newline at end of file
diff --git a/application/src/main/webapp/tsa/mysports.js b/application/src/main/webapp/tsa/mysports.js
deleted file mode 100644
index 8101fb1..0000000
--- a/application/src/main/webapp/tsa/mysports.js
+++ /dev/null
@@ -1,285 +0,0 @@
-/*
- * Copyright 2012, Oracle and or its affiliates. All Rights Reserved.
- *
- * @author irfan.ahmed@oracle.com
- */
-
-dojo.provide("demo.demo");
-
-dojo.require("dojo.data.ItemFileReadStore");
-dojo.require("dojo.data.ObjectStore");
-dojo.require("dijit._Widget");
-dojo.require("dijit.Tree");
-dojo.require("dijit.tree.ForestStoreModel");
-
-/**
- * MySports Server connectivity
- */
-dojo.declare("mysports.Server", null, {
-
- rootURL : "/MySports/persistence/mysports-",
-
- league : 'HTHL',
-
- constructor : function(args) {
- rootURL = args.root;
- league = args.league;
- },
-
- get : function(args) {
- if (!(args.url && args.onSuccess)) {
- throw "url/onSuccess parameters are required for XHR Get call.";
- }
- dojo.xhrGet({
- url : args.url,
- headers : {
- "Accept" : "application/json",
- "Content-Type" : "application/json"
- },
- handleAs : "json",
- load : function(data, ioArgs) {
- args.onSuccess.apply(args.context, [ data, ioArgs ]);
- },
- error : function(error, ioArgs) {
- console.error("Error occurred: ", error);
- },
- timeout : 15000,
- sync : (args.sync ? args.sync : false)
- });
- }
-});
-
-dojo.declare("mysports.NavPanel", [ dijit._Widget ], {
- constructor : function() {
- this.treeData = {
- label : "name",
- identifier : "id",
- items : []
- };
- },
-
- init : function() {
- var searchParams = dojo.queryToObject(dojo.doc.location.search
- .substr((dojo.doc.location.search[0] === "?" ? 1 : 0)));
- console.debug("Search Params: ", searchParams);
- mysports.server.league = searchParams.league;
- console.debug("Set leaue to: ", searchParams.league);
-
- if (!mysports.server.league) {
- mysports.server.league = 'OSL';
- }
-
- dojo.byId("leagueLogo").src = "/MySportsAdmin/rest/league/"
- + mysports.server.league + ".png";
-
- mysports.server.get({
- url : "/MySports/persistence/mysports-" + mysports.server.league
- + "/query/Division.findAll",
- onSuccess : function(divisions) {
- this.divisions = divisions;
- var divLength = this.divisions.length;
- dojo.forEach(this.divisions, function(division, divIndex) {
- division.type = "division";
- if (!division.children) {
- division.children = [];
- }
- this.getTeam(division, function() {
- console
- .debug("Loaded Teams for division ",
- division.id);
- this.treeData.items.push(division);
- if (divIndex == (divLength - 1)) {
- this.createTree();
- }
- });
- }, this);
- },
- context : this
- });
- },
-
- getTeam : function(division, doneLoadingTeams) {
- var teams = [];
- dojo.forEach(division.relationships, function(rel) {
- if (!rel.id) {
- rel.id = division.id + "_" + rel.rel;
- }
- if (rel.rel == "teams") {
- teams.push(rel);
- }
- });
- var teamLength = teams.length;
- dojo.forEach(teams, function(teamInfo, index) {
- mysports.server.get({
- url : teamInfo.href,
- onSuccess : function(teamData) {
- console.debug("Team Data for divsion : ", division.id,
- teamData);
-
- dojo.forEach(teamData, function(team) {
- team.type = "team";
- dojo.forEach(team.relationships, function(teamRel) {
- if (!teamRel.id) {
- teamRel.id = team.id + "_" + teamRel.rel;
- }
- });
- division.children.push(team);
- });
- if (index == (teamLength - 1)) {
- if (doneLoadingTeams) {
- doneLoadingTeams.call(this);
- }
- }
- },
- context : this
- });
- }, this);
- },
-
- createTree : function() {
- console.debug("Creating Tree : ", dojo.toJson(this.treeData, " "));
- this.treeStore = new dojo.data.ItemFileReadStore({
- data : this.treeData
- });
- this.treeStore.fetch({
- query : {
- type : "division"
- },
- onItem : function(item) {
- console.debug(item);
- },
- onError : function(error) {
- console.error(error);
- }
- });
- this.treeModel = new dijit.tree.ForestStoreModel({
- store : this.treeStore,
- query : {
- type : "division"
- },
- rootId : "root",
- rootLabel : "Divisions",
- childrenAttrs : [ "children" ]
- });
- this.tree = new dijit.Tree({
- model : this.treeModel
- }, "tree");
- this.connect(this.tree, "onClick", function(item) {
- if (this.treeStore.isItem(item)) {
- var type = this.treeStore.getValue(item, "type");
- var name = this.treeStore.getValue(item, "name");
- if (type == "team") {
- var relationShips = this.treeStore.getValues(item,
- "relationships");
- var players = dojo
- .filter(relationShips,
- function(rel) {
- return this.treeStore.getValue(rel,
- "rel") == "players";
- }, this)[0];
- this.showPlayers(name, players);
- } else if (type == "division") {
- this.showDivision(item);
- }
- }
- });
- this.createPlayersTable();
- },
-
- showPlayers : function(teamName, item) {
- var href = this.treeStore.getValue(item, "href");
- console.debug("Showing Players : ", href);
- mysports.server.get({
- url : href,
- onSuccess : function(playersInfo) {
- console.debug("Players : ", playersInfo);
- this.playersTable.destroyAllRows();
- this.playersTable.setCaption("Team: " + teamName);
- dojo.forEach(playersInfo, function(player) {
- this.playersTable.addRow(player);
- }, this);
- },
- context : this
- });
- },
-
- showDivision : function(item) {
- console.debug("Showing Division : ", item);
- },
-
- createPlayersTable : function() {
- this.creatingTable = true;
- mysports.server
- .get({
- url : "/MySports/persistence/mysports-"
- + mysports.server.league
- + "/metadata/entity/Player",
- onSuccess : function(tableInfo) {
- this.playerTableInfo = tableInfo;
- this.playersTable = new demo.PlayersTable(
- this.playerTableInfo);
- dojo.byId("playersTableDiv").appendChild(
- this.playersTable.domNode);
- this.creatingTable = false;
- },
- context : this
- });
- }
-});
-
-dojo.declare("demo.PlayersTable", [ dijit._Widget ], {
- constructor : function(args) {
- this.info = args;
- this.cols = [];
- this.rows = [];
- },
-
- postCreate : function() {
- this.domNode = dojo.create("table", {
- "class" : "playersTable",
- border : "1",
- rules : "all"
- });
- this.captionNode = dojo.create("caption", null, this.domNode);
- this.tableNode = dojo.create("tbody", null, this.domNode);
- this.createCols();
- },
-
- createCols : function() {
- var headerRow = dojo.create("tr", null, this.tableNode);
- dojo.forEach(this.attributes, function(colInfo, index) {
- // TODO: Filter out some columns
- if (colInfo.name != "team" && colInfo.name != "version"
- && colInfo.name != "userid") {
- this.cols.push(colInfo.name);
- dojo.create("th", {
- "class" : (index == 0 ? "first"
- : (index == this.attributes.length - 1 ? "last"
- : "")),
- innerHTML : colInfo.name
- }, headerRow);
- }
- }, this);
- },
-
- setCaption : function(caption) {
- dojo.attr(this.captionNode, "innerHTML", caption);
- },
-
- addRow : function(rowInfo) {
- console.debug("Adding : ", rowInfo);
- var row = dojo.create("tr", null, this.tableNode);
- dojo.forEach(this.cols, function(name) {
- dojo.create("td", {
- innerHTML : (rowInfo[name] ? rowInfo[name] : "")
- }, row);
- });
- this.rows.push(row);
- },
-
- destroyAllRows : function() {
- dojo.forEach(this.rows, function(row) {
- dojo.destroy(row);
- });
- }
-});
diff --git a/application/src/main/webapp/view-division.xhtml b/application/src/main/webapp/view-division.xhtml
deleted file mode 100644
index 822f5c9..0000000
--- a/application/src/main/webapp/view-division.xhtml
+++ /dev/null
@@ -1,42 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml"
- xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:h="http://java.sun.com/jsf/html"
- xmlns:f="http://java.sun.com/jsf/core">
-
-<ui:composition template="template.jsf">
- <ui:define name="title">
- <h:outputText value="Division: #{viewDivision.division.name}" />
- </ui:define>
-
- <ui:define name="body">
- <h:form>
-
- <div align="center">
- <h:dataTable var="team" value="#{viewDivision.division.teams}"
- border="1" styleClass="pretty" width="500">
- <f:facet name="header">
- <h:outputText
- value="Division: #{viewDivision.division.name} Teams" />
- </f:facet>
- <h:column>
- <h:commandLink value="#{team.name}" action="#{viewTeam.setTeam}">
- <f:param name="team-id" value="#{team.id}" />
- </h:commandLink>
-
- </h:column>
- <f:facet name="footer">
- <div align="right">
- <h:commandButton value="Add Team" action="#{createTeam.create}" />
- </div>
- </f:facet>
- </h:dataTable>
-
-
- </div>
- </h:form>
- </ui:define>
-</ui:composition>
-</html> \ No newline at end of file
diff --git a/application/src/main/webapp/view-league.xhtml b/application/src/main/webapp/view-league.xhtml
deleted file mode 100644
index 39a0087..0000000
--- a/application/src/main/webapp/view-league.xhtml
+++ /dev/null
@@ -1,42 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml"
- xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:h="http://java.sun.com/jsf/html"
- xmlns:f="http://java.sun.com/jsf/core">
-
-<ui:composition template="template.jsf">
- <ui:define name="title">
- <h:outputText value="#{viewLeague.leagueId}" />
- </ui:define>
- <ui:define name="crumb1">
-
- </ui:define>
-
- <ui:define name="body">
- <h:form>
- <div align="center">
- <h:dataTable var="division" value="#{viewLeague.divisions}"
- border="1" styleClass="pretty" width="500">
- <f:facet name="header">Divisions
- </f:facet>
- <h:column>
- <h:commandLink value="#{division.name}"
- action="#{viewDivision.view}">
- <f:param name="division-id" value="#{division.id}" />
- </h:commandLink>
- </h:column>
-
-
- <f:facet name="footer">
- <div align="right">
- <h:commandButton CLASS="button" value="Add" action="create-division" />
- </div>
- </f:facet>
- </h:dataTable>
- </div>
- </h:form>
- </ui:define>
-</ui:composition>
-</html> \ No newline at end of file
diff --git a/application/src/main/webapp/view-team.xhtml b/application/src/main/webapp/view-team.xhtml
deleted file mode 100644
index 6d15109..0000000
--- a/application/src/main/webapp/view-team.xhtml
+++ /dev/null
@@ -1,33 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml"
- xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:h="http://java.sun.com/jsf/html"
- xmlns:f="http://java.sun.com/jsf/core">
-
-<ui:composition template="template.jsf">
- <ui:define name="title">
- <h:outputText value="Team: #{viewTeam.team.name}" />
- </ui:define>
-
- <ui:define name="crumb1">
- <h:commandLink value="#{viewTeam.team.division.name}"
- action="#{viewDivision.view}">
- <f:param name="division-id" value="#{viewTeam.team.division.id}" />
- </h:commandLink>
- </ui:define>
-
- <ui:define name="body">
- <h:form>
- <h1>
- <h:outputText value="Team: #{viewTeam.team.name}" />
- </h1>
- <h:dataTable binding="#{viewTeam.dataTable}" />
- <h:commandLink value="Modify" action="#{editTeam.setTeam}">
- <f:param name="team-id" value="#{viewTeam.team.id}" />
- </h:commandLink>
- </h:form>
- </ui:define>
-</ui:composition>
-</html> \ No newline at end of file
diff --git a/application/src/test/java/eclipselink/example/mysports/application/test/MockAdminServerConnector.java b/application/src/test/java/eclipselink/example/mysports/application/test/MockAdminServerConnector.java
deleted file mode 100644
index ab26482..0000000
--- a/application/src/test/java/eclipselink/example/mysports/application/test/MockAdminServerConnector.java
+++ /dev/null
@@ -1,180 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * dclarke - EclipseLink 2.3 - MySports Demo Bug 344608
- ******************************************************************************/
-package eclipselink.example.mysports.application.test;
-
-import java.io.ByteArrayInputStream;
-import java.io.InputStream;
-import java.io.Reader;
-import java.io.StringReader;
-import java.io.StringWriter;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.persistence.internal.jpa.metadata.xml.XMLEntityMappings;
-import org.eclipse.persistence.internal.jpa.metadata.xml.XMLEntityMappingsReader;
-import org.eclipse.persistence.internal.jpa.metadata.xml.XMLEntityMappingsWriter;
-import org.eclipse.persistence.jpa.metadata.MetadataSource;
-import org.eclipse.persistence.logging.SessionLog;
-
-import eclipselink.example.mysports.admin.model.HostedLeague;
-import eclipselink.example.mysports.admin.services.HostedLeagueRepository;
-import eclipselink.example.mysports.admin.services.MappingsLoader;
-import eclipselink.example.mysports.admin.services.test.AdminPersistenceTesting;
-import eclipselink.example.mysports.application.MySportsConfig;
-import eclipselink.example.mysports.application.admin.AdminServerConnector;
-import eclipselink.example.mysports.application.admin.HostedLeagues;
-import eclipselink.example.mysports.application.admin.League;
-import eclipselink.example.mysports.application.admin.RESTAdminServerConnector;
-
-/**
- * TODO
- *
- * @author dclarke
- * @since EclipseLink 2.3.0
- */
-public class MockAdminServerConnector implements AdminServerConnector, MetadataSource {
-
- private HostedLeagueRepository leaguesRepository;
-
- public MockAdminServerConnector() {
- leaguesRepository = AdminPersistenceTesting.createTestRepository(true);
- }
-
- public HostedLeagueRepository getRepository() {
- return leaguesRepository;
- }
-
- public HostedLeagues getLeagues() {
- List<HostedLeague> allLeagues = getRepository().allSharedLeagues();
-
- for (HostedLeague hl : allLeagues) {
- hl.setUri(RESTAdminServerConnector.DEFAULT_ROOT_URI+ "/" + hl.getId());
- }
-
- HostedLeagues result = new HostedLeagues();
- for (HostedLeague hl : allLeagues) {
- League l = new League();
- l.setId(hl.getId());
- l.setName(hl.getName());
- l.setVersion(hl.getVersion());
- result.getLeagues().add(l);
- }
-
- return result;
- }
-
- public League getLeague(String leagueId) {
- HostedLeague hl = getRepository().getLeague(leagueId);
-
- if (hl == null && "ALL".equals(leagueId)) {
- hl = getAllExtensionsHostedLeague();
- }
-
- if (hl != null) {
- hl.setUri(RESTAdminServerConnector.DEFAULT_ROOT_URI + "/" + hl.getId());
- }
-
- League l = null;
-
- if (hl != null) {
- l = new League();
- l.setId(hl.getId());
- l.setName(hl.getName());
- l.setVersion(hl.getVersion());
- hl.getPlayerExtensions().size();
- }
- return l;
- }
-
- public InputStream getCss(String leagueId) {
- return new ByteArrayInputStream(getRepository().getCSS(leagueId).getBytes());
- }
-
- public InputStream getLogo(String leagueId) {
- return getRepository().getLogo(leagueId);
- }
-
- public String getOrmURL(String leagueId) {
- return leagueId;
- }
-
- public String getOxmURL(String leagueId) {
- return null;
- }
-
- /**
- * Default local resource. Only used when admin service cannot be accessed.
- */
- public static final String LOCAL_ECLIPSELINK_ORM = "META-INF/local-eclipselink-orm.xml";
-
- @Override
- public XMLEntityMappings getEntityMappings(Map<String, Object> properties, ClassLoader classLoader, SessionLog log) {
- String leagueId = (String) properties.get(MySportsConfig.LEAGUE_CONTEXT);
- String ormxml = null;
-
- try {
- ormxml = getRepository().getORM(leagueId);
- } catch (IllegalArgumentException e) {
- if ("ALL".equals(leagueId)) {
- XMLEntityMappings xmlEntityMappings = MappingsLoader.getXMLEntityMappings(getAllExtensionsHostedLeague());
- StringWriter writer = new StringWriter();
- XMLEntityMappingsWriter.write(xmlEntityMappings, writer);
- String xml = writer.toString();
- //System.out.println("ORM-XML:\n" + xml + "\n");
- return XMLEntityMappingsReader.read(getClass().getName(), new StringReader(xml), classLoader, properties);
- } else {
- throw e;
- }
- }
- Reader reader = new StringReader(ormxml);
- try {
- return XMLEntityMappingsReader.read(getClass().getName(), reader, classLoader, properties);
- } finally {
- if (reader != null) {
- try {
- reader.close();
- } catch (Exception e) {
- }
- }
- }
- }
-
- @Override
- public Map<String, Object> getPropertyOverrides(Map<String, Object> arg0, ClassLoader arg1, SessionLog arg2) {
- return null;
- }
-
- private HostedLeague getAllExtensionsHostedLeague() {
- HostedLeague allLeague = new HostedLeague("ALL", "All League", "red");
- allLeague.addPlayerExtension("flex1", "java.lang.String", "FLEX_1");
- allLeague.addPlayerExtension("flex2", "java.lang.String", "FLEX_2");
- allLeague.addPlayerExtension("flex3", "java.lang.String", "FLEX_3");
- allLeague.addPlayerExtension("flex4", "java.lang.String", "FLEX_4");
- allLeague.addPlayerExtension("flex5", "java.lang.String", "FLEX_5");
-
- allLeague.addTeamExtension("flex1", "java.lang.String", "FLEX_1");
- allLeague.addTeamExtension("flex2", "java.lang.String", "FLEX_2");
- allLeague.addTeamExtension("flex3", "java.lang.String", "FLEX_3");
- allLeague.addTeamExtension("flex4", "java.lang.String", "FLEX_4");
- allLeague.addTeamExtension("flex5", "java.lang.String", "FLEX_5");
-
- allLeague.addDivisionExtension("flex1", "java.lang.String", "FLEX_1");
- allLeague.addDivisionExtension("flex2", "java.lang.String", "FLEX_2");
- allLeague.addDivisionExtension("flex3", "java.lang.String", "FLEX_3");
- allLeague.addDivisionExtension("flex4", "java.lang.String", "FLEX_4");
- allLeague.addDivisionExtension("flex5", "java.lang.String", "FLEX_5");
-
- return allLeague;
- }
-
- }
diff --git a/application/src/test/java/eclipselink/example/mysports/application/test/TestCreateTenantEMF.java b/application/src/test/java/eclipselink/example/mysports/application/test/TestCreateTenantEMF.java
deleted file mode 100644
index a0b94a7..0000000
--- a/application/src/test/java/eclipselink/example/mysports/application/test/TestCreateTenantEMF.java
+++ /dev/null
@@ -1,115 +0,0 @@
-package eclipselink.example.mysports.application.test;
-
-import java.util.Map;
-
-import javax.persistence.EntityManager;
-import javax.persistence.EntityManagerFactory;
-import javax.persistence.Persistence;
-
-import org.eclipse.persistence.config.PersistenceUnitProperties;
-import org.eclipse.persistence.exceptions.QueryException;
-import org.junit.AfterClass;
-import org.junit.Assert;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-import eclipselink.example.mysports.application.MySportsConfig;
-import eclipselink.example.mysports.application.model.Player;
-import eclipselink.example.mysports.examples.ExampleLeague;
-import eclipselink.example.mysports.examples.OttawaSoccerLeague;
-
-public class TestCreateTenantEMF {
-
- private static ExampleLeague LEAGUE = new OttawaSoccerLeague();
-
- private static TestingLeagueRepository repository;
-
- @Test
- public void createEMWithoutLeague() throws Exception {
- Map<String, Object> properties = repository.get();
- EntityManagerFactory emf = Persistence.createEntityManagerFactory(MySportsConfig.PU_NAME, properties);
-
- Assert.assertNotNull(emf);
-
- EntityManager em = emf.createEntityManager();
-
- try {
- em.find(Player.class, 1);
- } catch (QueryException e) {
- return;
- } finally {
- em.close();
- emf.close();
- }
- // Assert.fail();
- }
-
- @Test
- public void createKFL() throws Exception {
- Map<String, Object> properties = repository.get();
- EntityManagerFactory emf = Persistence.createEntityManagerFactory(MySportsConfig.PU_NAME + ";league=KFL", properties);
-
- Assert.assertNotNull(emf);
- EntityManager em = emf.createEntityManager();
-
- try {
- em.find(Player.class, 1);
- } catch (QueryException e) {
- return;
- } finally {
- em.close();
- emf.close();
- }
- }
-
- @Test
- public void createEMWithInvalidLeague() throws Exception {
- Map<String, Object> properties = repository.get();
- EntityManagerFactory emf = Persistence.createEntityManagerFactory(MySportsConfig.PU_NAME + ";league=XXX", properties);
-
- Assert.assertNotNull(emf);
- EntityManager em = emf.createEntityManager();
-
- try {
- em.find(Player.class, 1);
- } catch (QueryException e) {
- return;
- } finally {
- em.close();
- emf.close();
- }
- }
-
- @Test
- public void createEM_OSL_WithNullMetadataSource() throws Exception {
- Map<String, Object> properties = repository.get();
- properties.put(PersistenceUnitProperties.METADATA_SOURCE, null);
-
- EntityManagerFactory emf = Persistence.createEntityManagerFactory(MySportsConfig.PU_NAME + ";league=OSL", properties);
-
- Assert.assertNotNull(emf);
- EntityManager em = emf.createEntityManager();
-
- try {
- em.find(Player.class, 1);
- } catch (QueryException e) {
- return;
- } finally {
- em.close();
- emf.close();
- }
- }
-
- @BeforeClass
- public static void setup() {
- repository = new TestingLeagueRepository(LEAGUE.getId());
- repository.createSharedMySportsSchema();
- LEAGUE.populate(repository);
- }
-
- @AfterClass
- public static void tearDown() {
- repository.close();
- }
-
-}
diff --git a/application/src/test/java/eclipselink/example/mysports/application/test/TestExampleLeagues.java b/application/src/test/java/eclipselink/example/mysports/application/test/TestExampleLeagues.java
deleted file mode 100644
index 83e5beb..0000000
--- a/application/src/test/java/eclipselink/example/mysports/application/test/TestExampleLeagues.java
+++ /dev/null
@@ -1,201 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * dclarke - EclipseLink 2.3 - MySports Demo Bug 344608
- ******************************************************************************/
-package eclipselink.example.mysports.application.test;
-
-import java.util.List;
-import java.util.Vector;
-
-import javax.persistence.metamodel.Attribute;
-
-import org.eclipse.persistence.descriptors.ClassDescriptor;
-import org.eclipse.persistence.internal.jpa.metamodel.AttributeImpl;
-import org.eclipse.persistence.internal.sessions.ArrayRecord;
-import org.eclipse.persistence.sessions.server.Server;
-import org.junit.AfterClass;
-import org.junit.Assert;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-import eclipselink.example.mysports.admin.model.Extension;
-import eclipselink.example.mysports.admin.model.HostedLeague;
-import eclipselink.example.mysports.application.model.Division;
-import eclipselink.example.mysports.application.model.Player;
-import eclipselink.example.mysports.examples.ExampleLeague;
-import eclipselink.example.mysports.examples.HighTechHockey;
-import eclipselink.example.mysports.examples.KidsFootballLeague;
-import eclipselink.example.mysports.examples.MinorHockeyLeague;
-import eclipselink.example.mysports.examples.OttawaSoccerLeague;
-
-/**
- * @author dclarke
- * @since EclipseLink 2.4.2
- */
-public class TestExampleLeagues {
-
- static ExampleLeague HTHL = new HighTechHockey();
- static ExampleLeague KFL = new KidsFootballLeague();
- static ExampleLeague MHL = new MinorHockeyLeague();
- static OttawaSoccerLeague OSL = new OttawaSoccerLeague();
-
- @Test
- public void verifyHTHLDivisions() {
- repository.setLeagueId(HTHL.getId(), null);
-
- List<Division> divisions = repository.getDivisions();
-
- Assert.assertNotNull(divisions);
- Assert.assertEquals(2, divisions.size());
-
- }
-
- @Test
- public void verifyHTHLAdditionalAttributes() {
- repository.setLeagueId(HTHL.getId(), null);
-
- List<Attribute<?, ?>> attrs = repository.getAdditionalAttributes(Player.class);
-
- Assert.assertNotNull(attrs);
- Assert.assertEquals(HTHL.getDefinition().getLeague().getPlayerExtensions().size(), attrs.size());
-
- int index = 0;
- for (Extension ext : HTHL.getDefinition().getLeague().getPlayerExtensions()) {
- Attribute<?, ?> mnAttr = attrs.get(index++);
- Assert.assertEquals(ext.getName(), mnAttr.getName());
- Assert.assertFalse(mnAttr.isAssociation());
- Assert.assertEquals(ext.getJavaType(), mnAttr.getJavaType().getName());
- Assert.assertTrue(((AttributeImpl<?, ?>) mnAttr).getMapping().getAttributeAccessor().isVirtualAttributeAccessor());
- }
- }
-
- @Test
- public void verifyKFLMySportsSchema() throws Exception {
- repository.setLeagueId(KFL.getId(), null);
- Server session = repository.unwrap(Server.class);
-
- for (ClassDescriptor desc : session.getDescriptors().values()) {
- Object result = session.executeSQL("SELECT COUNT(*) FROM " + desc.getTableName());
- Assert.assertNotNull(result);
- @SuppressWarnings("unchecked")
- ArrayRecord record = (ArrayRecord) ((Vector<Object>) result).get(0);
- int intValue = ((Number) record.getValues().get(0)).intValue();
- Assert.assertTrue(intValue >= 0);
- }
- }
-
- @Test
- public void verifyKFLAdditionalAttributes() {
- repository.setLeagueId(KFL.getId(), null);
- HostedLeague leagueDef = KFL.getDefinition().getLeague();
-
- List<Attribute<?, ?>> attrs = repository.getAdditionalAttributes(Player.class);
-
- Assert.assertNotNull(attrs);
- Assert.assertEquals(leagueDef.getPlayerExtensions().size(), attrs.size());
-
- int index = 0;
- for (Extension ext : leagueDef.getPlayerExtensions()) {
- Attribute<?, ?> mnAttr = attrs.get(index++);
- Assert.assertEquals(ext.getName(), mnAttr.getName());
- Assert.assertFalse(mnAttr.isAssociation());
- Assert.assertEquals(String.class, mnAttr.getJavaType());
- Assert.assertTrue(((AttributeImpl<?, ?>) mnAttr).getMapping().getAttributeAccessor().isVirtualAttributeAccessor());
- }
-
- }
-
- @Test
- public void verifyMHLAdditionalAttributes() {
- repository.setLeagueId(MHL.getId(), null);
- HostedLeague leagueDef = MHL.getDefinition().getLeague();
-
- List<Attribute<?, ?>> attrs = repository.getAdditionalAttributes(Player.class);
-
- Assert.assertNotNull(attrs);
- Assert.assertEquals(leagueDef.getPlayerExtensions().size(), attrs.size());
-
- int index = 0;
- for (Extension ext : leagueDef.getPlayerExtensions()) {
- Attribute<?, ?> mnAttr = attrs.get(index++);
- Assert.assertEquals(ext.getName(), mnAttr.getName());
- Assert.assertFalse(mnAttr.isAssociation());
- Assert.assertEquals(String.class, mnAttr.getJavaType());
- Assert.assertTrue(((AttributeImpl<?, ?>) mnAttr).getMapping().getAttributeAccessor().isVirtualAttributeAccessor());
- }
-
- }
-
- @Test
- public void verifyMHLDivisions() {
- repository.setLeagueId(MHL.getId(), null);
-
- }
-
- @Test
- public void verifyMHLTeams() {
- repository.setLeagueId(MHL.getId(), null);
-
- }
-
- @Test
- public void verifyOSLAdditionalAttributes() {
- repository.setLeagueId(OSL.getId(), null);
- HostedLeague leagueDef = OSL.getDefinition().getLeague();
-
- List<Attribute<?, ?>> attrs = repository.getAdditionalAttributes(Player.class);
-
- Assert.assertNotNull(attrs);
- Assert.assertEquals(leagueDef.getPlayerExtensions().size(), attrs.size());
-
- int index = 0;
- for (Extension ext : leagueDef.getPlayerExtensions()) {
- Attribute<?, ?> mnAttr = attrs.get(index++);
- Assert.assertEquals(ext.getName(), mnAttr.getName());
- Assert.assertFalse(mnAttr.isAssociation());
- Assert.assertEquals(String.class, mnAttr.getJavaType());
- Assert.assertTrue(((AttributeImpl<?, ?>) mnAttr).getMapping().getAttributeAccessor().isVirtualAttributeAccessor());
- }
-
- }
-
- @Test
- public void loadOSL_U6Division() {
- repository.setLeagueId(OSL.getId(), null);
-
- Division division = repository.getDivision(OSL.u6.getName());
-
- Assert.assertNotNull(division);
- Assert.assertEquals(division.getName(), "U6");
-
- }
-
- private static TestingLeagueRepository repository;
-
- @BeforeClass
- public static void initialize() {
- repository = new TestingLeagueRepository();
-
- repository.createSharedMySportsSchema();
- repository.createLeagueTables(KFL.getId());
-
- HTHL.populate(repository);
- KFL.populate(repository);
- MHL.populate(repository);
- OSL.populate(repository);
- }
-
- @AfterClass
- public static void close() {
- repository.close();
- }
-
-}
diff --git a/application/src/test/java/eclipselink/example/mysports/application/test/TestModelAndMappings.java b/application/src/test/java/eclipselink/example/mysports/application/test/TestModelAndMappings.java
deleted file mode 100644
index 865d94d..0000000
--- a/application/src/test/java/eclipselink/example/mysports/application/test/TestModelAndMappings.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * dclarke - EclipseLink 2.3 - MySports Demo Bug 344608
- ******************************************************************************/
-package eclipselink.example.mysports.application.test;
-
-import javax.persistence.EntityManagerFactory;
-
-import org.eclipse.persistence.descriptors.ClassDescriptor;
-import org.eclipse.persistence.internal.helper.Helper;
-import org.eclipse.persistence.internal.weaving.PersistenceWeaved;
-import org.eclipse.persistence.jpa.JpaHelper;
-import org.eclipse.persistence.sessions.server.Server;
-import org.junit.AfterClass;
-import org.junit.Assert;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-import eclipselink.example.mysports.application.model.Division;
-import eclipselink.example.mysports.application.model.Extensible;
-import eclipselink.example.mysports.application.model.Player;
-import eclipselink.example.mysports.application.model.Team;
-import eclipselink.example.mysports.application.model.User;
-import eclipselink.example.mysports.examples.ExampleLeague;
-import eclipselink.example.mysports.examples.OttawaSoccerLeague;
-
-/**
- * @author dclarke
- * @since EclipseLink 2.3.0
- */
-public class TestModelAndMappings {
-
- private static TestingLeagueRepository repository;
-
- private static ExampleLeague LEAGUE = new OttawaSoccerLeague();
-
- @Test
- public void verifySession() {
- EntityManagerFactory emf = repository.unwrap(EntityManagerFactory.class);
- Server session = JpaHelper.getServerSession(emf);
- Assert.assertNotNull(session);
- Assert.assertTrue(session.isServerSession());
- }
-
- @Test
- public void verifyPlayer() {
- EntityManagerFactory emf = repository.unwrap(EntityManagerFactory.class);
- Server session = JpaHelper.getServerSession(emf);
- ClassDescriptor descriptor = session.getClassDescriptor(Player.class);
-
- Assert.assertNotNull(descriptor);
- Assert.assertEquals(Helper.getShortClassName(descriptor.getJavaClass()), descriptor.getAlias());
-
- Assert.assertTrue(Extensible.class.isAssignableFrom(descriptor.getJavaClass()));
- Assert.assertTrue("Entity class now woven: " + descriptor, PersistenceWeaved.class.isAssignableFrom(descriptor.getJavaClass()));
- }
-
- @Test
- public void verifyTeam() {
- EntityManagerFactory emf = repository.unwrap(EntityManagerFactory.class);
- Server session = JpaHelper.getServerSession(emf);
- ClassDescriptor descriptor = session.getClassDescriptor(Team.class);
-
- Assert.assertNotNull(descriptor);
- Assert.assertEquals(Helper.getShortClassName(descriptor.getJavaClass()), descriptor.getAlias());
- Assert.assertTrue("Entity class now woven: " + descriptor, PersistenceWeaved.class.isAssignableFrom(descriptor.getJavaClass()));
- }
-
- @Test
- public void verifyDivision() {
- EntityManagerFactory emf = repository.unwrap(EntityManagerFactory.class);
- Server session = JpaHelper.getServerSession(emf);
- ClassDescriptor descriptor = session.getClassDescriptor(Division.class);
-
- Assert.assertNotNull(descriptor);
- Assert.assertEquals(Helper.getShortClassName(descriptor.getJavaClass()), descriptor.getAlias());
- Assert.assertTrue("Entity class now woven: " + descriptor, PersistenceWeaved.class.isAssignableFrom(descriptor.getJavaClass()));
- }
-
- @Test
- public void verifyUser() {
- EntityManagerFactory emf = repository.unwrap(EntityManagerFactory.class);
- Server session = JpaHelper.getServerSession(emf);
- ClassDescriptor descriptor = session.getClassDescriptor(User.class);
-
- Assert.assertNotNull(descriptor);
- Assert.assertEquals(Helper.getShortClassName(descriptor.getJavaClass()), descriptor.getAlias());
- Assert.assertTrue("Entity class now woven: " + descriptor, PersistenceWeaved.class.isAssignableFrom(descriptor.getJavaClass()));
- }
-
- @BeforeClass
- public static void setup() {
- repository = new TestingLeagueRepository();
- repository.setLeagueId(LEAGUE.getId(), null);
- LEAGUE.populate(repository);
- }
-
- @AfterClass
- public static void tearDown() {
- repository.close();
- }
-}
diff --git a/application/src/test/java/eclipselink/example/mysports/application/test/TestSchemaCreation.java b/application/src/test/java/eclipselink/example/mysports/application/test/TestSchemaCreation.java
deleted file mode 100644
index e5c5d9b..0000000
--- a/application/src/test/java/eclipselink/example/mysports/application/test/TestSchemaCreation.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * dclarke - EclipseLink 2.3 - MySports Demo Bug 344608
- ******************************************************************************/
-package eclipselink.example.mysports.application.test;
-
-import java.util.Map;
-
-import javax.persistence.EntityManagerFactory;
-
-import org.eclipse.persistence.config.PersistenceUnitProperties;
-import org.eclipse.persistence.config.SessionCustomizer;
-import org.eclipse.persistence.descriptors.ClassDescriptor;
-import org.eclipse.persistence.exceptions.IntegrityChecker;
-import org.eclipse.persistence.sessions.Session;
-import org.eclipse.persistence.sessions.server.Server;
-import org.junit.AfterClass;
-import org.junit.Assert;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-import eclipselink.example.mysports.application.model.Extensible;
-
-/**
- * Create Schema and verify using integrity checker.
- *
- * @author dclarke
- * @since EclipseLink 2.3.0
- */
-public class TestSchemaCreation {
-
- private static TestingLeagueRepository repository;
-
- /**
- * Using EclipseLink's schema generation when the
- * {@link EntityManagerFactory} is created to drop and create the tables and
- * sequences.
- */
- @Test
- public void verifySharedMySportsSchema() throws Exception {
- Server session = repository.unwrap(Server.class);
-
- for (ClassDescriptor desc : session.getDescriptors().values()) {
- Object result = session.executeSQL("SELECT COUNT(*) FROM " + desc.getTableName());
- Assert.assertNotNull(result);
-
- //ArrayRecord record = (ArrayRecord) ((Vector<Object>) result).get(0);
- //Assert.assertEquals("COUNT " + desc.getTableName(), 13, ((Number) record.getValues().get(0)).intValue());
-
- if (Extensible.class.isAssignableFrom(desc.getJavaClass())) {
- Assert.assertNotNull(desc.getMappingForAttributeName("flex1"));
- session.executeSQL("SELECT FLEX_1 FROM " + desc.getTableName());
- Assert.assertNotNull(desc.getMappingForAttributeName("flex2"));
- session.executeSQL("SELECT FLEX_2 FROM " + desc.getTableName());
- Assert.assertNotNull(desc.getMappingForAttributeName("flex3"));
- session.executeSQL("SELECT FLEX_3 FROM " + desc.getTableName());
- Assert.assertNotNull(desc.getMappingForAttributeName("flex4"));
- session.executeSQL("SELECT FLEX_4 FROM " + desc.getTableName());
- Assert.assertNotNull(desc.getMappingForAttributeName("flex5"));
- session.executeSQL("SELECT FLEX_5 FROM " + desc.getTableName());
- }
- }
- }
-
-
- /**
- * Verify the schema using the integrity checker to compare database
- * structure to that expected in the mappings.
- */
- @Test
- public void integrityCheckSharedMySportsSchema() {
- Map<String, Object> properties = repository.get();
-
- properties.put(PersistenceUnitProperties.SESSION_CUSTOMIZER, EnableIntegrityChecker.class.getName());
- properties.put(PersistenceUnitProperties.DEPLOY_ON_STARTUP, Boolean.TRUE.toString());
- properties.put(PersistenceUnitProperties.MULTITENANT_SHARED_EMF, Boolean.TRUE.toString());
- properties.put("javax.persistence.provider", "org.eclipse.persistence.jpa.PersistenceProvider");
-
- repository.setLeagueId("ALL", properties);
-
- Server session = repository.unwrap(Server.class);
-
- IntegrityChecker ic = session.getIntegrityChecker();
- Assert.assertNotNull(ic);
- Assert.assertTrue(ic.getCaughtExceptions().isEmpty());
- }
-
- @BeforeClass
- public static void createLeagueRepository() {
- repository = new TestingLeagueRepository();
- repository.setLeagueId("OSL", null);
- }
-
- @AfterClass
- public static void closeLeagueRepository() {
- if (repository != null) {
- repository.close();
- }
- }
-
- /**
- * {@link SessionCustomizer} that enables the {@link IntegrityChecker}.
- *
- * NOTE: If another {@link SessionCustomizer} is specified in the
- * persistence.xml this one will replace it.
- */
- public static class EnableIntegrityChecker implements SessionCustomizer {
-
- public void customize(Session session) throws Exception {
- IntegrityChecker ic = new IntegrityChecker();
- ic.setShouldCheckDatabase(true);
- session.setIntegrityChecker(ic);
- }
-
- }
-
-}
diff --git a/application/src/test/java/eclipselink/example/mysports/application/test/TestingLeagueRepository.java b/application/src/test/java/eclipselink/example/mysports/application/test/TestingLeagueRepository.java
deleted file mode 100644
index e9b3534..0000000
--- a/application/src/test/java/eclipselink/example/mysports/application/test/TestingLeagueRepository.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * dclarke - EclipseLink 2.3 - MySports Demo Bug 344608
- ******************************************************************************/
-package eclipselink.example.mysports.application.test;
-
-import java.util.Map;
-
-import org.eclipse.persistence.config.PersistenceUnitProperties;
-import org.eclipse.persistence.exceptions.DatabaseException;
-import org.eclipse.persistence.sessions.server.Server;
-
-import eclipselink.example.mysports.admin.services.HostedLeagueRepository;
-import eclipselink.example.mysports.admin.services.test.AdminPersistenceTesting;
-import eclipselink.example.mysports.application.services.LeagueRepository;
-
-/**
- * Add testing specific properties to override the non-JTA data-source
- * configured in the persistence.xml.
- *
- * @author dclarke
- * @since EclipseLink 2.3.0
- */
-public class TestingLeagueRepository extends LeagueRepository {
- private static final long serialVersionUID = 1L;
-
- public TestingLeagueRepository() {
- super(new MockAdminServerConnector());
- }
-
- public TestingLeagueRepository(String leagueId) {
- super(new MockAdminServerConnector());
- setLeagueId(leagueId, get(leagueId));
- }
-
- @Override
- public void setLeagueId(String leagueId, Map<String, Object> properties) {
- super.setLeagueId(leagueId, add(leagueId, properties));
- }
-
- public MockAdminServerConnector getMockAdminConnector() {
- return (MockAdminServerConnector) super.getAdminConnector();
- }
-
- public HostedLeagueRepository getHostedLeagueRepository() {
- return getMockAdminConnector().getRepository();
- }
-
- @Override
- public void close() {
- AdminPersistenceTesting.closeTestingRepository(getMockAdminConnector().getRepository(), false);
-
- super.close();
- }
-
- public Map<String, Object> add(String leagueId, Map<String, Object> properties) {
- Map<String, Object> props = AdminPersistenceTesting.add(properties);
-
- if (leagueId != null) {
- props.put(PersistenceUnitProperties.METADATA_SOURCE, getAdminConnector());
- }
- return props;
- }
-
- public Map<String, Object> get(String leagueId) {
- return add(leagueId, null);
- }
-
- public Map<String, Object> get() {
- return add(null, null);
- }
-
- public void createSharedMySportsSchema() {
- Map<String, Object> properties = get("ALL");
-
- properties.put(PersistenceUnitProperties.DDL_GENERATION, PersistenceUnitProperties.DROP_AND_CREATE);
- properties.put(PersistenceUnitProperties.DDL_GENERATION_MODE, PersistenceUnitProperties.DDL_DATABASE_GENERATION);
- properties.put(PersistenceUnitProperties.ALLOW_NATIVE_SQL_QUERIES, "true");
-
- setLeagueId("ALL", properties);
- }
-
- public void dropLeagueTables(String leagueId) {
- Map<String, Object> properties = get(leagueId);
- properties.put(PersistenceUnitProperties.ALLOW_NATIVE_SQL_QUERIES, "true");
- setLeagueId(leagueId, properties);
-
- Server session = unwrap(Server.class);
-
- try {
- session.executeNonSelectingSQL("DROP TABLE MYS_PLAYER_" + leagueId);
- } catch (DatabaseException dbe) {
- }
- try {
- session.executeNonSelectingSQL("DROP TABLE MYS_TEAM_" + leagueId);
- } catch (DatabaseException dbe) {
- }
- try {
- session.executeNonSelectingSQL("DROP TABLE MYS_DIV_" + leagueId);
- } catch (DatabaseException dbe) {
- }
- }
-
- public void createLeagueTables(String leagueId) {
- Map<String, Object> properties = get(leagueId);
- properties.put(PersistenceUnitProperties.ALLOW_NATIVE_SQL_QUERIES, "true");
- setLeagueId(leagueId, properties);
-
- Server session = unwrap(Server.class);
- try {
- session.executeNonSelectingSQL("CREATE TABLE MYS_DIV_" + leagueId + " (ID INTEGER NOT NULL, DEF_DIV INTEGER default 0, NAME VARCHAR(255), FLEX_1 VARCHAR(255), FLEX_2 VARCHAR(255), FLEX_3 VARCHAR(255), FLEX_4 VARCHAR(255), FLEX_5 VARCHAR(255), VERSION INTEGER, PRIMARY KEY (ID))");
- session.executeNonSelectingSQL("CREATE TABLE MYS_PLAYER_" + leagueId + " (ID INTEGER NOT NULL, EMAIL VARCHAR(255), F_NAME VARCHAR(255), L_NAME VARCHAR(255), NUM INTEGER, FLEX_1 VARCHAR(255), FLEX_2 VARCHAR(255), FLEX_3 VARCHAR(255), FLEX_4 VARCHAR(255), FLEX_5 VARCHAR(255), USER_ID VARCHAR(255), VERSION INTEGER, TEAM_ID INTEGER, PRIMARY KEY (ID))");
- session.executeNonSelectingSQL("CREATE TABLE MYS_TEAM_" + leagueId + " (ID INTEGER NOT NULL, NAME VARCHAR(255), FLEX_1 VARCHAR(255), FLEX_2 VARCHAR(255), FLEX_3 VARCHAR(255), FLEX_4 VARCHAR(255), FLEX_5 VARCHAR(255), VERSION INTEGER, DIVISION_ID INTEGER, PRIMARY KEY (ID))");
- } catch (DatabaseException e) {
-
- }
- }
-}
diff --git a/application/src/test/java/eclipselink/example/mysports/examples/ExampleLeague.java b/application/src/test/java/eclipselink/example/mysports/examples/ExampleLeague.java
deleted file mode 100644
index b05845a..0000000
--- a/application/src/test/java/eclipselink/example/mysports/examples/ExampleLeague.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * dclarke - EclipseLink 2.3 - MySports Demo Bug 344608
- ******************************************************************************/
-package eclipselink.example.mysports.examples;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import eclipselink.example.mysports.admin.examples.ExampleLeagueDefinition;
-import eclipselink.example.mysports.application.model.Division;
-import eclipselink.example.mysports.application.services.LeagueRepository;
-
-public abstract class ExampleLeague {
-
- private ExampleLeagueDefinition definition;
-
- private List<Division> divisions = new ArrayList<Division>();
-
- public ExampleLeague(ExampleLeagueDefinition definition) {
- super();
- this.definition = definition;
- }
-
- public ExampleLeagueDefinition getDefinition() {
- return definition;
- }
-
- public List<Division> getDivisions() {
- return divisions;
- }
-
- public abstract void populate(LeagueRepository repository);
-
- public boolean usesSharedSchema() {
- return getDefinition().getLeague().isShared();
- }
-
- public String getId() {
- return getDefinition().getLeague().getId();
- }
-} \ No newline at end of file
diff --git a/application/src/test/java/eclipselink/example/mysports/examples/HighTechHockey.java b/application/src/test/java/eclipselink/example/mysports/examples/HighTechHockey.java
deleted file mode 100644
index 1f69f51..0000000
--- a/application/src/test/java/eclipselink/example/mysports/examples/HighTechHockey.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * dclarke - EclipseLink 2.3 - MySports Demo Bug 344608
- ******************************************************************************/
-package eclipselink.example.mysports.examples;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Random;
-
-import eclipselink.example.mysports.admin.examples.ExampleLeagueDefinition;
-import eclipselink.example.mysports.application.model.Division;
-import eclipselink.example.mysports.application.model.Player;
-import eclipselink.example.mysports.application.services.LeagueRepository;
-
-public class HighTechHockey extends ExampleLeague {
-
- public HighTechHockey() {
- super(ExampleLeagueDefinition.HTHL);
- }
-
- public static final String LEAGUE = "HTHL";
-
- private static final String[] POSITIONS = new String[] { "R", "L", "C", "D" };
-
- public void populate(LeagueRepository repository) {
- repository.setLeagueId(LEAGUE, null);
-
- Division div1 = repository.addDivision("Div_1");
- repository.addTeam("Aces", createPlayers(12), div1);
- repository.addTeam("Leafs", createPlayers(12), div1);
- repository.addTeam("Pucks", createPlayers(12), div1);
- repository.addTeam("Meteors", createPlayers(12), div1);
- repository.addTeam("Rockets", createPlayers(12), div1);
- repository.addTeam("Jets", createPlayers(12), div1);
- repository.addTeam("Tigers", createPlayers(12), div1);
- repository.addTeam("Barons", createPlayers(12), div1);
- getDivisions().add(div1);
-
- Division div2 = repository.addDivision("Div_2");
- repository.addTeam("Slapshots", createPlayers(9), div2);
- repository.addTeam("Dragons", createPlayers(12), div2);
- repository.addTeam("Fury", createPlayers(12), div2);
- repository.addTeam("Cougars", createPlayers(12), div2);
- repository.addTeam("Flyers", createPlayers(12), div2);
- repository.addTeam("Lizards", createPlayers(12), div2);
- getDivisions().add(div2);
- }
-
- List<Player> createPlayers(int num) {
- List<Player> players = new ArrayList<Player>();
- Random random = new Random();
-
- for (int index = 0; index < num; index++) {
- Player p = PlayerFactory.createPlayer();
- p.set("penaltyMinutes", String.valueOf(random.nextInt(100)));
- p.set("position", POSITIONS[random.nextInt(POSITIONS.length)]);
- players.add(p);
- }
-
- return players;
- }
-
-}
diff --git a/application/src/test/java/eclipselink/example/mysports/examples/KidsFootballLeague.java b/application/src/test/java/eclipselink/example/mysports/examples/KidsFootballLeague.java
deleted file mode 100644
index 8dc6ef1..0000000
--- a/application/src/test/java/eclipselink/example/mysports/examples/KidsFootballLeague.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * dclarke - EclipseLink 2.3 - MySports Demo Bug 344608
- ******************************************************************************/
-package eclipselink.example.mysports.examples;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Random;
-
-import eclipselink.example.mysports.admin.examples.ExampleLeagueDefinition;
-import eclipselink.example.mysports.application.model.Division;
-import eclipselink.example.mysports.application.model.Player;
-import eclipselink.example.mysports.application.services.LeagueRepository;
-
-/**
- * @author dclarke
- * @since EclipseLink 2.3.0
- */
-public class KidsFootballLeague extends ExampleLeague {
-
- public KidsFootballLeague() {
- super(ExampleLeagueDefinition.KFL);
- }
-
- public void populate(LeagueRepository repository) {
- repository.setLeagueId(getId(), null);
-
- Division mite = repository.addDivision("Mite");
- repository.addTeam("Scorpions", createPlayers(15), mite);
- repository.addTeam("Bears", createPlayers(15), mite);
- repository.addTeam("Dragons", createPlayers(15), mite);
- repository.addTeam("Gorillas", createPlayers(15), mite);
- repository.addTeam("Peaches", createPlayers(15), mite);
- getDivisions().add(mite);
-
- Division tyke = repository.addDivision("Tyke");
- repository.addTeam("Blazers", createPlayers(28), tyke);
- repository.addTeam("Gladiators", createPlayers(28), tyke);
- repository.addTeam("Ducks", createPlayers(28), tyke);
- repository.addTeam("Pirates", createPlayers(28), tyke);
- repository.addTeam("Crusaders", createPlayers(28), tyke);
- getDivisions().add(tyke);
-
- Division mosquito = repository.addDivision("Mosquito");
- repository.addTeam("Blazers", createPlayers(28), mosquito);
- repository.addTeam("Gladiators", createPlayers(28), mosquito);
- repository.addTeam("Ducks", createPlayers(28), mosquito);
- repository.addTeam("Pirates", createPlayers(28), mosquito);
- repository.addTeam("Crusaders", createPlayers(28), mosquito);
- getDivisions().add(mosquito);
- }
-
- private static final String[] POSITIONS = new String[] { "Center", "Offensive Guard", "Offensive Tackle", "Tight End", "Wide Receiver", "Full Back", "Running Back", "Quarter Back", "Defensive End", "Defensive Tackle", "Nose Guard", "Linebacker", "Cornerback", "Safety" };
-
- private List<Player> createPlayers(int num) {
- List<Player> players = new ArrayList<Player>();
- Random random = new Random();
-
- for (int index = 0; index < num; index++) {
- Player p = PlayerFactory.createPlayer();
- p.setEmail(p.getFirstName() + "." + p.getLastName() + "@email.com");
- p.set("position", POSITIONS[random.nextInt(POSITIONS.length)]);
- players.add(p);
- }
-
- return players;
- }
-
-}
diff --git a/application/src/test/java/eclipselink/example/mysports/examples/MinorHockeyLeague.java b/application/src/test/java/eclipselink/example/mysports/examples/MinorHockeyLeague.java
deleted file mode 100644
index 32b1217..0000000
--- a/application/src/test/java/eclipselink/example/mysports/examples/MinorHockeyLeague.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * dclarke - EclipseLink 2.3 - MySports Demo Bug 344608
- ******************************************************************************/
-package eclipselink.example.mysports.examples;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Random;
-
-import eclipselink.example.mysports.admin.examples.ExampleLeagueDefinition;
-import eclipselink.example.mysports.application.model.Division;
-import eclipselink.example.mysports.application.model.Player;
-import eclipselink.example.mysports.application.services.LeagueRepository;
-
-public class MinorHockeyLeague extends ExampleLeague {
-
- public MinorHockeyLeague() {
- super(ExampleLeagueDefinition.MHL);
- }
-
- private final static String[][] teamNames = { { "Novice", "Aces", "Bruins", "Capitals", "Devils", "Eagles", "Flyers", "Giants", "" }, { "Atom", "Aces", "Bruins", "Capitals", "Devils", "Eagles", "Flyers", "Giants", "" }, { "PeeWee", "Aces", "Bruins", "Capitals", "Devils", "Eagles", "Flyers", "Giants", "" }, { "Bantam", "Aces", "Bruins", "Capitals", "Devils", "Eagles", "Flyers", "Giants", "" }, { "Midget", "Aces", "Bruins", "Capitals", "Devils", "Eagles", "Flyers", "Giants", "" }, { "Juvenile", "Aces", "Bruins", "Capitals", "Devils", "Eagles", "Flyers", "Giants", "" }, };
-
- public void populate(LeagueRepository repository) {
- repository.setLeagueId(getId(), null);
-
- for (int divIndex = 0; divIndex < teamNames.length; divIndex++) {
- Division div = repository.addDivision(teamNames[divIndex][0]);
- for (int teamIndex = 1; teamIndex < teamNames[divIndex].length; teamIndex++) {
- repository.addTeam(teamNames[divIndex][teamIndex], createPlayers(16), div);
- }
- getDivisions().add(div);
- }
- }
-
- private static final String[] POSITIONS = new String[] { "R", "L", "C", "D" };
-
- private List<Player> createPlayers(int num) {
- List<Player> players = new ArrayList<Player>();
- Random random = new Random();
-
- for (int index = 0; index < num; index++) {
- Player p = PlayerFactory.createPlayer();
- p.set("penaltyMinutes", random.nextInt(100));
- p.set("position", POSITIONS[random.nextInt(POSITIONS.length)]);
- players.add(p);
- }
-
- return players;
- }
-
-}
diff --git a/application/src/test/java/eclipselink/example/mysports/examples/OttawaSoccerLeague.java b/application/src/test/java/eclipselink/example/mysports/examples/OttawaSoccerLeague.java
deleted file mode 100644
index 35af2a4..0000000
--- a/application/src/test/java/eclipselink/example/mysports/examples/OttawaSoccerLeague.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * dclarke - EclipseLink 2.3 - MySports Demo Bug 344608
- ******************************************************************************/
-package eclipselink.example.mysports.examples;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Random;
-
-import eclipselink.example.mysports.admin.examples.ExampleLeagueDefinition;
-import eclipselink.example.mysports.application.model.Division;
-import eclipselink.example.mysports.application.model.Player;
-import eclipselink.example.mysports.application.services.LeagueRepository;
-
-/**
- * @author dclarke
- * @since EclipseLink 2.3.0
- */
-public class OttawaSoccerLeague extends ExampleLeague {
-
- public Division u6;
- public Division u8;
-
- public OttawaSoccerLeague() {
- super(ExampleLeagueDefinition.OSL);
- }
-
- public void populate(LeagueRepository repository) {
- repository.setLeagueId(getId(), null);
-
- u6 = repository.addDivision("U6");
- repository.addTeam("Scorpions", createPlayers(11), u6);
- repository.addTeam("Bears", createPlayers(11), u6);
- repository.addTeam("Dragons", createPlayers(11), u6);
- repository.addTeam("Gorillas", createPlayers(11), u6);
- repository.addTeam("Peaches", createPlayers(11), u6);
- getDivisions().add(u6);
-
- u8 = repository.addDivision("U8");
- repository.addTeam("Blazers", createPlayers(12), u8);
- repository.addTeam("Gladiators", createPlayers(12), u8);
- repository.addTeam("Ducks", createPlayers(12), u8);
- repository.addTeam("Pirates", createPlayers(12), u8);
- repository.addTeam("Crusaders", createPlayers(12), u8);
- getDivisions().add(u8);
- }
-
- private static final String[] ALLERGIES = new String[] { "NONE", "NONE", "NONE", "PEANUT", "MILK" };
-
- private List<Player> createPlayers(int num) {
- List<Player> players = new ArrayList<Player>();
- Random random = new Random();
-
- for (int index = 0; index < num; index++) {
- Player p = PlayerFactory.createPlayer();
- p.setEmail(p.getFirstName() + "." + p.getLastName() + "@email.com");
- p.set("allergies", ALLERGIES[random.nextInt(ALLERGIES.length)]);
- players.add(p);
- }
-
- return players;
- }
-
-}
diff --git a/application/src/test/java/eclipselink/example/mysports/examples/PlayerFactory.java b/application/src/test/java/eclipselink/example/mysports/examples/PlayerFactory.java
deleted file mode 100644
index 116044b..0000000
--- a/application/src/test/java/eclipselink/example/mysports/examples/PlayerFactory.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2013 Oracle. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors:
- * dclarke - EclipseLink 2.3 - MySports Demo Bug 344608
- ******************************************************************************/
-package eclipselink.example.mysports.examples;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Random;
-
-import eclipselink.example.mysports.application.model.Player;
-
-/**
- * Simple utility for generating players with random names.
- *
- * @author dclarke
- * @since EclipseLink 2.3.0
- */
-public class PlayerFactory {
-
- private static String[] FIRST_NAMES = new String[] { "John", "Ted", "Phil", "Jason", "Bill", "Jim", "Martin", "Sam", "Tim", "Rob" };
-
- private static String[] LAST_NAMES = new String[] { "Orr", "Smith", "Johnson", "Williams", "Jones", "Brown", "Davis", "Miller", "Wilson", "Moore", "Taylor" };
-
- public static Player createPlayer() {
- Random random = new Random();
-
- Player p = new Player();
- p.setNumber(random.nextInt(99) + 1);
- p.setFirstName(FIRST_NAMES[random.nextInt(FIRST_NAMES.length)]);
- p.setLastName(LAST_NAMES[random.nextInt(LAST_NAMES.length)]);
- return p;
- }
-
- public static List<Player> createPlayers(int num) {
- List<Player> players = new ArrayList<Player>();
-
- for (int index = 0; index < num; index++) {
- players.add(createPlayer());
- }
-
- return players;
- }
-
-}
diff --git a/application/src/test/resources/META-INF/flex-columns-orm.xml b/application/src/test/resources/META-INF/flex-columns-orm.xml
deleted file mode 100644
index b5a8857..0000000
--- a/application/src/test/resources/META-INF/flex-columns-orm.xml
+++ /dev/null
@@ -1,68 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<entity-mappings version="2.4"
- xmlns="http://www.eclipse.org/eclipselink/xsds/persistence/orm"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.eclipse.org/eclipselink/xsds/persistence/orm http://www.eclipse.org/eclipselink/xsds/eclipselink_orm_2_4.xsd">
-
- <package>eclipselink.example.mysports.application.model</package>
-
- <entity class="Division">
- <attributes>
- <basic name="flex1" attribute-type="String">
- <column name="FLEX_1" />
- </basic>
- <basic name="flex2" attribute-type="String">
- <column name="FLEX_2" />
- </basic>
- <basic name="flex3" attribute-type="String">
- <column name="FLEX_3" />
- </basic>
- <basic name="flex4" attribute-type="String">
- <column name="FLEX_4" />
- </basic>
- <basic name="flex5" attribute-type="String">
- <column name="FLEX_5" />
- </basic>
- </attributes>
- </entity>
-
- <entity class="Team">
- <attributes>
- <basic name="flex1" attribute-type="String">
- <column name="FLEX_1" />
- </basic>
- <basic name="flex2" attribute-type="String">
- <column name="FLEX_2" />
- </basic>
- <basic name="flex3" attribute-type="String">
- <column name="FLEX_3" />
- </basic>
- <basic name="flex4" attribute-type="String">
- <column name="FLEX_4" />
- </basic>
- <basic name="flex5" attribute-type="String">
- <column name="FLEX_5" />
- </basic>
- </attributes>
- </entity>
-
- <entity class="Player">
- <attributes>
- <basic name="flex1" attribute-type="String">
- <column name="FLEX_1" />
- </basic>
- <basic name="flex2" attribute-type="String">
- <column name="FLEX_2" />
- </basic>
- <basic name="flex3" attribute-type="String">
- <column name="FLEX_3" />
- </basic>
- <basic name="flex4" attribute-type="String">
- <column name="FLEX_4" />
- </basic>
- <basic name="flex5" attribute-type="String">
- <column name="FLEX_5" />
- </basic>
- </attributes>
- </entity>
-</entity-mappings>
diff --git a/application/src/test/resources/eclipselink-example-mysports.properties b/application/src/test/resources/eclipselink-example-mysports.properties
deleted file mode 100644
index d5daa1f..0000000
--- a/application/src/test/resources/eclipselink-example-mysports.properties
+++ /dev/null
@@ -1,22 +0,0 @@
-javax.persistence.jdbc.url=jdbc:derby:target/derby/mysports;create=true
-javax.persistence.jdbc.user=app
-javax.persistence.jdbc.password=app
-javax.persistence.jdbc.driver=org.apache.derby.jdbc.EmbeddedDriver
-
-eclipselink.jdbc.uppercase-columns=true
-eclipselink.jdbc.allow-native-sql-queries=true
-
-# Ensure that the data source info in persistence.xml is replaced
-javax.persistence.jtaDataSource=
-javax.persistence.nonJtaDataSource=
-javax.persistence.transactionType=RESOURCE_LOCAL
-
-eclipselink.logging.level=FINE
-eclipselink.logging.connection=false
-eclipselink.logging.timestamp=false
-eclipselink.logging.thread=false
-eclipselink.logging.session=false
-eclipselink.logging.exceptions=false
-eclipselink.logging.level.sql=FINE
-eclipselink.logging.level.metadata=WARNING
-eclipselink.logging.parameters=true \ No newline at end of file
diff --git a/persistence/.classpath b/persistence/.classpath
deleted file mode 100644
index 37f9528..0000000
--- a/persistence/.classpath
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" output="target/classes" path="src/main/java">
- <attributes>
- <attribute name="optional" value="true"/>
- <attribute name="maven.pomderived" value="true"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="src" output="target/test-classes" path="src/test/java">
- <attributes>
- <attribute name="optional" value="true"/>
- <attribute name="maven.pomderived" value="true"/>
- </attributes>
- </classpathentry>
- <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
- <attributes>
- <attribute name="maven.pomderived" value="true"/>
- </attributes>
- </classpathentry>
- <classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
- <attributes>
- <attribute name="maven.pomderived" value="true"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7">
- <attributes>
- <attribute name="maven.pomderived" value="true"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
- <attributes>
- <attribute name="maven.pomderived" value="true"/>
- <attribute name="org.eclipse.jst.component.nondependency" value=""/>
- </attributes>
- </classpathentry>
- <classpathentry kind="output" path="target/classes"/>
-</classpath>
diff --git a/persistence/.project b/persistence/.project
deleted file mode 100644
index 078e5a9..0000000
--- a/persistence/.project
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>MySports Persistence</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.wst.common.project.facet.core.builder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.wst.validation.validationbuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.m2e.core.maven2Builder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
- <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.m2e.core.maven2Nature</nature>
- <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
- </natures>
-</projectDescription>
diff --git a/persistence/.settings/org.eclipse.jdt.core.prefs b/persistence/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 443e085..0000000
--- a/persistence/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
-org.eclipse.jdt.core.compiler.compliance=1.7
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
-org.eclipse.jdt.core.compiler.source=1.7
diff --git a/persistence/.settings/org.eclipse.m2e.core.prefs b/persistence/.settings/org.eclipse.m2e.core.prefs
deleted file mode 100644
index f897a7f..0000000
--- a/persistence/.settings/org.eclipse.m2e.core.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-activeProfiles=
-eclipse.preferences.version=1
-resolveWorkspaceProjects=true
-version=1
diff --git a/persistence/.settings/org.eclipse.wst.common.component b/persistence/.settings/org.eclipse.wst.common.component
deleted file mode 100644
index de82c86..0000000
--- a/persistence/.settings/org.eclipse.wst.common.component
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project-modules id="moduleCoreId" project-version="1.5.0">
- <wb-module deploy-name="MySports Persistence">
- <wb-resource deploy-path="/" source-path="/src/main/java"/>
- <wb-resource deploy-path="/" source-path="/src/main/resources"/>
- </wb-module>
-</project-modules>
diff --git a/persistence/.settings/org.eclipse.wst.common.project.facet.core.xml b/persistence/.settings/org.eclipse.wst.common.project.facet.core.xml
deleted file mode 100644
index 4f92af5..0000000
--- a/persistence/.settings/org.eclipse.wst.common.project.facet.core.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<faceted-project>
- <installed facet="jst.utility" version="1.0"/>
- <installed facet="java" version="1.7"/>
-</faceted-project>
diff --git a/persistence/pom.xml b/persistence/pom.xml
deleted file mode 100644
index d3c408f..0000000
--- a/persistence/pom.xml
+++ /dev/null
@@ -1,99 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>eclipselink.example.mysports</groupId>
- <artifactId>bom</artifactId>
- <version>2.4.2-SNAPSHOT</version>
- <relativePath>..</relativePath>
- </parent>
-
- <artifactId>persistence</artifactId>
- <packaging>jar</packaging>
- <name>MySports Persistence</name>
-
- <dependencies>
- <dependency>
- <groupId>${eclipselink.groupid}</groupId>
- <artifactId>${eclipselink.artifactid}</artifactId>
- <version>${eclipselink.version}</version>
- <exclusions>
- <exclusion>
- <artifactId>commonj.sdo</artifactId>
- <groupId>commonj.sdo</groupId>
- </exclusion>
- </exclusions>
- <scope>provided</scope>
- </dependency>
-
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.11</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.derby</groupId>
- <artifactId>derby</artifactId>
- <version>10.9.1.0</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <configuration>
- <archive>
- <manifestEntries>
- <Premain-Class>eclipselink.example.mysports.persistence.TenantPerEMFWeavingAgent</Premain-Class>
- </manifestEntries>
- </archive>
- </configuration>
- </plugin>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <version>2.12.4</version>
- <configuration>
- <systemProperties>
- <property>
- <name>derby.stream.error.file</name>
- <value>target/derby.log</value>
- </property>
- </systemProperties>
- </configuration>
- </plugin>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <version>2.4</version>
- <executions>
- <execution>
- <goals>
- <goal>test-jar</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
-
- </plugins>
- </build>
-
- <reporting>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-report-plugin</artifactId>
- <version>2.12.4</version>
- </plugin>
- </plugins>
- </reporting>
-
-</project>
diff --git a/persistence/src/main/java/eclipselink/example/mysports/persistence/TenantPerEMFProvider.java b/persistence/src/main/java/eclipselink/example/mysports/persistence/TenantPerEMFProvider.java
deleted file mode 100644
index d22bec0..0000000
--- a/persistence/src/main/java/eclipselink/example/mysports/persistence/TenantPerEMFProvider.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/**
- * *****************************************************************************
- * Copyright (c) 2010-2013 Oracle. All rights reserved. This program and the
- * accompanying materials are made available under the terms of the Eclipse
- * Public License v1.0 and Eclipse Distribution License v. 1.0 which accompanies
- * this distribution. The Eclipse Public License is available at
- * http://www.eclipse.org/legal/epl-v10.html and the Eclipse Distribution
- * License is available at http://www.eclipse.org/org/documents/edl-v10.php.
- *
- * Contributors: dclarke - EclipseLink 2.4 - MySports Demo Bug 344608
- * ****************************************************************************
- */
-package eclipselink.example.mysports.persistence;
-
-import java.util.HashMap;
-import java.util.Map;
-import javax.persistence.EntityManagerFactory;
-import org.eclipse.persistence.config.PersistenceUnitProperties;
-import org.eclipse.persistence.internal.jpa.deployment.JPAInitializer;
-import org.eclipse.persistence.jpa.PersistenceProvider;
-
-/**
- * Custom {@link javax.persistence.spi.PersistenceProvider} to support the
- * TODO
- *
- * @author dclarke
- * @since EclipseLink 2.4
- */
-@SuppressWarnings({"rawtypes", "unchecked"})
-public class TenantPerEMFProvider extends PersistenceProvider {
-
- /**
- * TODO
- */
- public static final String PROVIDER_CLASS = "eclipselink.example.mysports.persistence.TenantPerEMFProvider";
-
- /**
- * TODO
- */
- public static final String SEPARATOR = ";";
- /**
- * Tenant PU name prefix used to identify the tenant specific PU creation
- * request.
- */
- public static final String EQUALS = "=";
-
- @Override
- public EntityManagerFactory createEntityManagerFactory(String name, Map properties) {