├── README.md ├── bean-validation-webapp ├── .classpath ├── .project ├── .settings │ ├── .jsdtscope │ ├── org.eclipse.core.resources.prefs │ ├── org.eclipse.jdt.core.prefs │ ├── org.eclipse.m2e.core.prefs │ ├── org.eclipse.wst.common.component │ ├── org.eclipse.wst.common.project.facet.core.xml │ ├── org.eclipse.wst.jsdt.ui.superType.container │ ├── org.eclipse.wst.jsdt.ui.superType.name │ └── org.eclipse.wst.validation.prefs ├── README.MD ├── pom.xml └── src │ ├── main │ ├── java │ │ └── org │ │ │ └── glassfish │ │ │ └── jersey │ │ │ └── examples │ │ │ └── beanvalidation │ │ │ └── webapp │ │ │ ├── MyApplication.java │ │ │ ├── constraint │ │ │ ├── AtLeastOneContact.java │ │ │ ├── HasId.java │ │ │ ├── NotEmptySearchField.java │ │ │ └── SearchType.java │ │ │ ├── domain │ │ │ └── ContactCard.java │ │ │ ├── resource │ │ │ ├── ContactCardResource.java │ │ │ └── SearchResource.java │ │ │ └── service │ │ │ └── StorageService.java │ ├── resources │ │ └── ValidationMessages.properties │ └── webapp │ │ ├── WEB-INF │ │ ├── web.xml │ │ └── weblogic.xml │ │ ├── app.js │ │ ├── contact.html │ │ ├── controllers.js │ │ ├── css │ │ └── bootstrap.min.css │ │ ├── directives.js │ │ ├── fonts │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.svg │ │ ├── glyphicons-halflings-regular.ttf │ │ ├── glyphicons-halflings-regular.woff │ │ └── glyphicons-halflings-regular.woff2 │ │ ├── index.html │ │ ├── lib │ │ ├── angular-cookies.min.js │ │ ├── angular-loader.min.js │ │ ├── angular-resource.min.js │ │ ├── angular-route.min.js │ │ ├── angular-sanitize.min.js │ │ ├── angular.min.js │ │ ├── bootstrap.js │ │ └── jquery-1.12.4.min.js │ │ └── services.js │ └── test │ └── java │ └── org │ └── glassfish │ └── jersey │ └── examples │ └── beanvalidation │ └── webapp │ └── ContactCardTest.java ├── bookmark-em ├── README.MD ├── pom.xml └── src │ ├── main │ ├── java │ │ └── org │ │ │ └── glassfish │ │ │ └── jersey │ │ │ └── examples │ │ │ └── bookmark_em │ │ │ ├── MyApplication.java │ │ │ ├── entity │ │ │ ├── BookmarkEntity.java │ │ │ ├── BookmarkEntityPK.java │ │ │ └── UserEntity.java │ │ │ ├── exception │ │ │ └── ExtendedNotFoundException.java │ │ │ ├── resource │ │ │ ├── BookmarkResource.java │ │ │ ├── BookmarksResource.java │ │ │ ├── UserResource.java │ │ │ └── UsersResource.java │ │ │ └── util │ │ │ └── tx │ │ │ ├── TransactionManager.java │ │ │ └── Transactional.java │ ├── resources │ │ └── META-INF │ │ │ └── persistence.xml │ └── webapp │ │ └── WEB-INF │ │ └── web.xml │ └── test │ └── java │ └── org │ └── glassfish │ └── jersey │ └── examples │ └── bookmark_em │ └── BookmarkTest.java ├── bookmark ├── README.MD ├── pom.xml └── src │ ├── main │ ├── java │ │ └── org │ │ │ └── glassfish │ │ │ └── jersey │ │ │ └── examples │ │ │ └── bookmark │ │ │ ├── MyApplication.java │ │ │ ├── entity │ │ │ ├── BookmarkEntity.java │ │ │ ├── BookmarkEntityPK.java │ │ │ └── UserEntity.java │ │ │ ├── exception │ │ │ └── ExtendedNotFoundException.java │ │ │ ├── resource │ │ │ ├── BookmarkResource.java │ │ │ ├── BookmarksResource.java │ │ │ ├── UserResource.java │ │ │ └── UsersResource.java │ │ │ └── util │ │ │ └── tx │ │ │ ├── TransactionManager.java │ │ │ └── Transactional.java │ ├── resources │ │ └── META-INF │ │ │ └── persistence.xml │ └── webapp │ │ └── WEB-INF │ │ └── web.xml │ └── test │ └── java │ └── org │ └── glassfish │ └── jersey │ └── examples │ └── bookmark │ └── BookmarkTest.java ├── bookstore-webapp ├── README.MD ├── pom.xml └── src │ ├── main │ ├── java │ │ └── org │ │ │ └── glassfish │ │ │ └── jersey │ │ │ └── examples │ │ │ └── bookstore │ │ │ └── webapp │ │ │ ├── MyApplication.java │ │ │ └── resource │ │ │ ├── Book.java │ │ │ ├── Bookstore.java │ │ │ ├── CD.java │ │ │ ├── Happy.java │ │ │ ├── Item.java │ │ │ └── Track.java │ └── webapp │ │ ├── WEB-INF │ │ └── web.xml │ │ ├── css │ │ └── style.css │ │ ├── jsp │ │ └── help.jsp │ │ └── org │ │ └── glassfish │ │ └── jersey │ │ └── examples │ │ └── bookstore │ │ └── webapp │ │ └── resource │ │ ├── Book │ │ └── index.jsp │ │ ├── Bookstore │ │ ├── count.jsp │ │ ├── index.jsp │ │ └── time.jsp │ │ ├── CD │ │ └── index.jsp │ │ ├── Happy │ │ └── index.jsp │ │ ├── Item │ │ └── footer.jsp │ │ └── Track │ │ └── index.jsp │ └── test │ └── java │ └── org │ └── glassfish │ └── jersey │ └── examples │ └── bookstore │ └── webapp │ └── resource │ ├── BookstoreTest.java │ ├── ItemTest.java │ └── TestSupport.java ├── cdi-webapp ├── README.MD ├── pom.xml └── src │ ├── main │ ├── java │ │ └── org │ │ │ └── glassfish │ │ │ └── jersey │ │ │ └── examples │ │ │ └── cdi │ │ │ ├── App.java │ │ │ └── resources │ │ │ ├── EchoParamConstructorResource.java │ │ │ ├── EchoParamFieldResource.java │ │ │ ├── EchoParamResource.java │ │ │ ├── HelloWorldResource.java │ │ │ ├── MyApplication.java │ │ │ ├── MyOtherResource.java │ │ │ ├── MySingletonResource.java │ │ │ ├── ProxyInjectedAppScopedResource.java │ │ │ └── RequestScopedResource.java │ ├── resources │ │ └── META-INF │ │ │ └── beans.xml │ └── webapp │ │ └── WEB-INF │ │ ├── beans.xml │ │ └── web.xml │ └── test │ └── java │ └── org │ └── glassfish │ └── jersey │ └── examples │ └── cdi │ └── resources │ ├── CdiTest.java │ ├── EchoParamBeanTest.java │ ├── EchoResourceTest.java │ ├── HelloworldTest.java │ ├── PerApplicationBeanTest.java │ ├── PerRequestBeanTest.java │ └── ProxyScopeAlignmentTest.java ├── clipboard-programmatic ├── README.MD ├── pom.xml └── src │ ├── main │ └── java │ │ └── org │ │ └── glassfish │ │ └── jersey │ │ └── examples │ │ └── clipboard │ │ ├── App.java │ │ └── Clipboard.java │ └── test │ └── java │ └── org │ └── glassfish │ └── jersey │ └── examples │ └── clipboard │ └── ClipboardTest.java ├── clipboard ├── README.MD ├── pom.xml └── src │ ├── main │ └── java │ │ └── org │ │ └── glassfish │ │ └── jersey │ │ └── examples │ │ └── clipboard │ │ ├── App.java │ │ ├── ClipboardData.java │ │ ├── ClipboardDataProvider.java │ │ └── ClipboardResource.java │ └── test │ └── java │ └── org │ └── glassfish │ └── jersey │ └── examples │ └── clipboard │ └── ClipboardTest.java ├── declarative-linking ├── README.MD ├── pom.xml └── src │ ├── main │ └── java │ │ └── org │ │ └── glassfish │ │ └── jersey │ │ └── examples │ │ └── linking │ │ ├── App.java │ │ ├── model │ │ ├── ItemModel.java │ │ └── ItemsModel.java │ │ ├── representation │ │ ├── ItemRepresentation.java │ │ └── ItemsRepresentation.java │ │ └── resources │ │ ├── ItemResource.java │ │ └── ItemsResource.java │ └── test │ └── java │ └── org │ └── glassfish │ └── jersey │ └── examples │ └── linking │ └── LinkWebAppTest.java ├── entity-filtering-security ├── README.MD ├── pom.xml └── src │ ├── main │ └── java │ │ └── org │ │ └── glassfish │ │ └── jersey │ │ └── examples │ │ └── entityfiltering │ │ └── security │ │ ├── App.java │ │ ├── SecurityEntityFilteringApplication.java │ │ ├── domain │ │ ├── RestrictedEntity.java │ │ └── RestrictedSubEntity.java │ │ ├── provider │ │ └── SecurityRequestFilter.java │ │ └── resource │ │ ├── RestrictedResource.java │ │ └── UnrestrictedResource.java │ └── test │ └── java │ └── org │ └── glassfish │ └── jersey │ └── examples │ └── entityfiltering │ └── security │ ├── RestrictedResourceTest.java │ └── UnrestrictedResourceTest.java ├── entity-filtering-selectable ├── README.MD ├── pom.xml └── src │ ├── main │ └── java │ │ └── org │ │ └── glassfish │ │ └── jersey │ │ └── examples │ │ └── entityfiltering │ │ └── selectable │ │ ├── App.java │ │ ├── SelectableEntityFilteringApplication.java │ │ ├── domain │ │ ├── Address.java │ │ ├── Person.java │ │ └── PhoneNumber.java │ │ └── resource │ │ └── PersonResource.java │ └── test │ └── java │ └── org │ └── glassfish │ └── jersey │ └── examples │ └── entityfiltering │ └── selectable │ └── PersonResourceTest.java ├── entity-filtering ├── README.MD ├── pom.xml └── src │ ├── main │ └── java │ │ └── org │ │ └── glassfish │ │ └── jersey │ │ └── examples │ │ └── entityfiltering │ │ ├── App.java │ │ ├── EntityFilteringApplication.java │ │ ├── domain │ │ ├── EntityStore.java │ │ ├── Project.java │ │ ├── Task.java │ │ └── User.java │ │ ├── filtering │ │ ├── ProjectDetailedView.java │ │ ├── TaskDetailedView.java │ │ └── UserDetailedView.java │ │ └── resource │ │ ├── ProjectsResource.java │ │ ├── TasksResource.java │ │ └── UsersResource.java │ └── test │ └── java │ └── org │ └── glassfish │ └── jersey │ └── examples │ └── entityfiltering │ ├── ProjectsResourceTest.java │ ├── TaskResourceTest.java │ └── UsersResourceTest.java ├── exception-mapping ├── README.MD ├── pom.xml └── src │ ├── main │ └── java │ │ └── org │ │ └── glassfish │ │ └── jersey │ │ └── examples │ │ └── exception │ │ ├── App.java │ │ ├── ExceptionResource.java │ │ └── Exceptions.java │ └── test │ └── java │ └── org │ └── glassfish │ └── jersey │ └── examples │ └── exception │ ├── ExceptionMappingFilterTest.java │ └── ExceptionMappingTest.java ├── extended-wadl-webapp ├── README.MD ├── pom.xml └── src │ ├── main │ ├── java │ │ └── org │ │ │ └── glassfish │ │ │ └── jersey │ │ │ └── examples │ │ │ └── extendedwadl │ │ │ ├── App.java │ │ │ ├── SampleWadlGeneratorConfig.java │ │ │ ├── resources │ │ │ ├── ItemResource.java │ │ │ ├── ItemsResource.java │ │ │ └── MyApplication.java │ │ │ └── util │ │ │ └── Examples.java │ ├── resources │ │ ├── application-doc.xml │ │ └── application-grammars.xml │ ├── webapp │ │ └── WEB-INF │ │ │ └── web.xml │ ├── xsd │ │ └── schema.xsd │ └── xslt │ │ └── gf.xsl │ └── test │ ├── java │ └── org │ │ └── glassfish │ │ └── jersey │ │ └── examples │ │ └── extendedwadl │ │ ├── ExtendedWadlWebappOsgiTest.java │ │ └── ExtendedWadlWebappTest.java │ └── resources │ └── log4j.properties ├── freemarker-webapp ├── README.MD ├── pom.xml └── src │ ├── main │ ├── java │ │ └── org │ │ │ └── glassfish │ │ │ └── jersey │ │ │ └── examples │ │ │ └── freemarker │ │ │ ├── MyApplication.java │ │ │ └── resources │ │ │ └── FreemarkerResource.java │ ├── resources │ │ └── freemarker │ │ │ ├── hello-default-model.ftl │ │ │ ├── hello.ftl │ │ │ └── org │ │ │ └── glassfish │ │ │ └── jersey │ │ │ └── examples │ │ │ └── freemarker │ │ │ └── resources │ │ │ └── FreemarkerResource.ftl │ └── webapp │ │ └── WEB-INF │ │ └── web.xml │ └── test │ └── java │ └── org │ └── glassfish │ └── jersey │ └── examples │ └── freemarker │ └── FreemarkerTest.java ├── groovy ├── README.MD ├── pom.xml └── src │ ├── main │ ├── groovy │ │ └── org │ │ │ └── glassfish │ │ │ └── jersey │ │ │ └── examples │ │ │ └── groovy │ │ │ └── GroovyResource.groovy │ └── script │ │ └── NewGroovyScript.groovy │ └── test │ └── groovy │ └── org │ └── glassfish │ └── jersey │ └── examples │ └── groovy │ └── GroovyResourceTest.groovy ├── helloworld-benchmark ├── README.MD ├── pom.xml └── src │ ├── main │ └── java │ │ └── org │ │ └── glassfish │ │ └── jersey │ │ └── examples │ │ └── helloworld │ │ ├── Application.java │ │ ├── HelloWorldBenchmark.java │ │ └── HelloWorldResource.java │ └── test │ └── java │ └── org │ └── glassfish │ └── jersey │ └── examples │ └── helloworld │ └── HelloWorldTest.java ├── helloworld-programmatic ├── README.MD ├── pom.xml └── src │ ├── main │ └── java │ │ └── org │ │ └── glassfish │ │ └── jersey │ │ └── examples │ │ └── helloworld │ │ └── App.java │ └── test │ └── java │ └── org │ └── glassfish │ └── jersey │ └── examples │ └── helloworld │ └── HelloWorldTest.java ├── helloworld-pure-jax-rs ├── README.MD ├── pom.xml └── src │ ├── main │ └── java │ │ └── org │ │ └── glassfish │ │ └── jersey │ │ └── examples │ │ └── helloworld │ │ └── jaxrs │ │ ├── App.java │ │ ├── HelloWorldResource.java │ │ └── JaxRsApplication.java │ └── test │ └── java │ └── org │ └── glassfish │ └── jersey │ └── examples │ └── helloworld │ └── jaxrs │ └── HelloWorldTest.java ├── helloworld-spring-annotations ├── README.MD ├── pom.xml └── src │ ├── main │ └── java │ │ └── org │ │ └── glassfish │ │ └── jersey │ │ └── examples │ │ └── hello │ │ └── spring │ │ └── annotations │ │ ├── App.java │ │ ├── EnglishGoodbyeService.java │ │ ├── GoodbyeService.java │ │ ├── GreetingService.java │ │ ├── JerseyConfig.java │ │ ├── NorwegianGoodbyeService.java │ │ ├── SpringAnnotationConfig.java │ │ └── SpringRequestResource.java │ └── test │ └── java │ └── org │ └── glassfish │ └── jersey │ └── examples │ └── hello │ └── spring │ └── annotations │ └── SpringRequestResourceTest.java ├── helloworld-spring-webapp ├── README.MD ├── pom.xml └── src │ └── main │ ├── java │ └── org │ │ └── glassfish │ │ └── jersey │ │ └── examples │ │ └── helloworld │ │ └── spring │ │ ├── CustomExceptionMapper.java │ │ ├── DateTimeService.java │ │ ├── GreetingService.java │ │ ├── GreetingServiceImpl.java │ │ ├── JerseyResource.java │ │ ├── MyApplication.java │ │ ├── SpringRequestResource.java │ │ └── SpringSingletonResource.java │ ├── resources │ └── applicationContext.xml │ └── webapp │ └── WEB-INF │ └── web.xml ├── helloworld-webapp ├── README.MD ├── pom.xml └── src │ ├── main │ ├── java │ │ └── org │ │ │ └── glassfish │ │ │ └── jersey │ │ │ └── examples │ │ │ └── helloworld │ │ │ └── webapp │ │ │ ├── App.java │ │ │ ├── HelloWorldResource.java │ │ │ └── MyApplication.java │ └── webapp │ │ └── WEB-INF │ │ └── web.xml │ └── test │ └── java │ └── org │ └── glassfish │ └── jersey │ └── examples │ └── helloworld │ └── webapp │ └── HelloWorldTest.java ├── helloworld-weld ├── README.MD ├── pom.xml └── src │ ├── main │ ├── java │ │ └── org │ │ │ └── glassfish │ │ │ └── jersey │ │ │ └── examples │ │ │ └── helloworld │ │ │ ├── App.java │ │ │ ├── AppScopedResource.java │ │ │ ├── CustomInterceptor.java │ │ │ ├── HelloWorldResource.java │ │ │ ├── RequestScopedBean.java │ │ │ ├── RequestScopedResource.java │ │ │ └── ResponseBodyFromCdiBean.java │ └── resources │ │ └── META-INF │ │ └── beans.xml │ └── test │ └── java │ └── org │ └── glassfish │ └── jersey │ └── examples │ └── helloworld │ ├── AppScopedResourceTest.java │ ├── HelloWorldTest.java │ ├── RequestScopeAlignmentTest.java │ └── RequestScopedResourceTest.java ├── helloworld ├── README.MD ├── pom.xml └── src │ ├── main │ └── java │ │ └── org │ │ └── glassfish │ │ └── jersey │ │ └── examples │ │ └── helloworld │ │ ├── App.java │ │ └── HelloWorldResource.java │ └── test │ └── java │ └── org │ └── glassfish │ └── jersey │ └── examples │ └── helloworld │ ├── CustomLoggingFilter.java │ └── HelloWorldTest.java ├── http-patch ├── README.MD ├── pom.xml └── src │ ├── main │ └── java │ │ └── org │ │ └── glassfish │ │ └── jersey │ │ └── examples │ │ └── httppatch │ │ ├── App.java │ │ ├── OptionsAcceptPatchHeaderFilter.java │ │ ├── PatchableResource.java │ │ ├── PatchingInterceptor.java │ │ └── State.java │ └── test │ └── java │ └── org │ └── glassfish │ └── jersey │ └── examples │ └── httppatch │ └── HttpPatchTest.java ├── http-trace ├── README.MD ├── pom.xml └── src │ ├── main │ └── java │ │ └── org │ │ └── glassfish │ │ └── jersey │ │ └── examples │ │ └── httptrace │ │ ├── App.java │ │ ├── Stringifier.java │ │ ├── TRACE.java │ │ └── TracingResource.java │ └── test │ └── java │ └── org │ └── glassfish │ └── jersey │ └── examples │ └── httptrace │ └── TraceSupportTest.java ├── https-clientserver-grizzly ├── README.MD ├── client.cert ├── keystore_client ├── keystore_server ├── pom.xml ├── server.cert ├── src │ ├── main │ │ └── java │ │ │ └── org │ │ │ └── glassfish │ │ │ └── jersey │ │ │ └── examples │ │ │ └── httpsclientservergrizzly │ │ │ ├── AuthenticationException.java │ │ │ ├── AuthenticationExceptionMapper.java │ │ │ ├── RootResource.java │ │ │ ├── SecurityFilter.java │ │ │ └── Server.java │ └── test │ │ └── java │ │ └── org │ │ └── glassfish │ │ └── jersey │ │ └── examples │ │ └── httpsclientservergrizzly │ │ └── MainTest.java ├── truststore_client └── truststore_server ├── https-server-glassfish ├── README.MD ├── pom.xml └── src │ └── main │ ├── java │ └── org │ │ └── glassfish │ │ └── jersey │ │ └── examples │ │ └── https │ │ └── glassfish │ │ └── resources │ │ └── HelloWorldResource.java │ └── webapp │ └── WEB-INF │ └── web.xml ├── jaxb ├── README.MD ├── pom.xml └── src │ ├── main │ └── java │ │ └── org │ │ └── glassfish │ │ └── jersey │ │ └── examples │ │ └── jaxb │ │ ├── App.java │ │ ├── JaxbArrayResource.java │ │ ├── JaxbCollectionResource.java │ │ ├── JaxbResource.java │ │ ├── JaxbXmlRootElement.java │ │ └── JaxbXmlType.java │ └── test │ └── java │ └── org │ └── glassfish │ └── jersey │ └── examples │ └── jaxb │ └── JaxbTest.java ├── jaxrs-types-injection ├── README.MD ├── pom.xml └── src │ ├── main │ └── java │ │ └── org │ │ └── glassfish │ │ └── jersey │ │ └── examples │ │ └── jaxrstypeinjection │ │ ├── App.java │ │ ├── JaxrsInjectionReportingInflector.java │ │ ├── JaxrsInjectionReportingResource.java │ │ └── ReportBuilder.java │ └── test │ └── java │ └── org │ └── glassfish │ └── jersey │ └── examples │ └── jaxrstypeinjection │ └── JaxrsTypeInjectionTest.java ├── jersey-crud-example ├── .classpath ├── .project ├── .settings │ ├── .jsdtscope │ ├── org.eclipse.jdt.core.prefs │ ├── org.eclipse.m2e.core.prefs │ ├── org.eclipse.wst.common.component │ ├── org.eclipse.wst.common.project.facet.core.xml │ ├── org.eclipse.wst.jsdt.ui.superType.container │ ├── org.eclipse.wst.jsdt.ui.superType.name │ └── org.eclipse.wst.validation.prefs ├── pom.xml └── src │ └── main │ ├── java │ └── com │ │ └── javadevelopersguide │ │ └── jersey │ │ ├── client │ │ └── UserResourceClient.java │ │ ├── config │ │ └── AppResourceConfig.java │ │ ├── exception │ │ ├── ApiException.java │ │ ├── BadRequestException.java │ │ ├── NotFoundException.java │ │ └── ResourceNotFoundException.java │ │ ├── model │ │ ├── APIResponse.java │ │ └── User.java │ │ ├── resources │ │ ├── CustomExceptionMapper.java │ │ └── UserResource.java │ │ └── services │ │ └── UserService.java │ └── webapp │ ├── WEB-INF │ └── web.xml │ └── index.jsp ├── jersey-ejb ├── README.MD ├── pom.xml └── src │ ├── main │ ├── java │ │ └── org │ │ │ └── glassfish │ │ │ └── jersey │ │ │ └── examples │ │ │ └── jersey_ejb │ │ │ ├── entities │ │ │ ├── Message.java │ │ │ ├── MessageListWriter.java │ │ │ └── MessageWriter.java │ │ │ ├── exceptions │ │ │ ├── CustomNotFoundException.java │ │ │ └── NotFoundExceptionMapper.java │ │ │ └── resources │ │ │ ├── MessageBoardResourceBean.java │ │ │ ├── MessageBoardRootResource.java │ │ │ ├── MessageHolderSingletonBean.java │ │ │ └── MyApplication.java │ └── webapp │ │ └── index.html │ └── test │ └── java │ └── org │ └── glassfish │ └── jersey │ └── examples │ └── jersey_ejb │ └── test │ └── MessageBoardTest.java ├── jersey-exception-mapping-example ├── .classpath ├── .project ├── .settings │ ├── .jsdtscope │ ├── org.eclipse.jdt.core.prefs │ ├── org.eclipse.m2e.core.prefs │ ├── org.eclipse.wst.common.component │ ├── org.eclipse.wst.common.project.facet.core.xml │ ├── org.eclipse.wst.jsdt.ui.superType.container │ ├── org.eclipse.wst.jsdt.ui.superType.name │ └── org.eclipse.wst.validation.prefs ├── README.MD ├── pom.xml └── src │ └── main │ ├── java │ └── com │ │ └── javadevelopersguide │ │ └── jersey │ │ ├── config │ │ └── JerseyServletContainerConfig.java │ │ ├── helloworld │ │ └── HelloWorldResource.java │ │ └── resources │ │ ├── ApiResponse.java │ │ ├── CustomExceptionMapper.java │ │ ├── CustomExceptionResource.java │ │ ├── ExceptionResource.java │ │ ├── Exceptions.java │ │ ├── ResourceNotFoundException.java │ │ ├── SampleExceptionMapper.java │ │ └── exception │ │ ├── ApiException.java │ │ ├── BadRequestException.java │ │ └── NotFoundException.java │ └── webapp │ ├── WEB-INF │ └── web.xml │ └── index.jsp ├── jersey-helloworld-example ├── .classpath ├── .project ├── .settings │ ├── .jsdtscope │ ├── org.eclipse.jdt.core.prefs │ ├── org.eclipse.m2e.core.prefs │ ├── org.eclipse.wst.common.component │ ├── org.eclipse.wst.common.project.facet.core.xml │ ├── org.eclipse.wst.jsdt.ui.superType.container │ ├── org.eclipse.wst.jsdt.ui.superType.name │ └── org.eclipse.wst.validation.prefs ├── pom.xml └── src │ └── main │ ├── java │ └── com │ │ └── javadevelopersguide │ │ └── jersey │ │ ├── config │ │ └── AppResourceConfig.java │ │ └── helloworld │ │ └── HelloWorldResource.java │ └── webapp │ ├── WEB-INF │ └── web.xml │ └── index.jsp ├── jersey-java8-example ├── .classpath ├── .project ├── .settings │ ├── .jsdtscope │ ├── org.eclipse.jdt.core.prefs │ ├── org.eclipse.m2e.core.prefs │ ├── org.eclipse.wst.common.component │ ├── org.eclipse.wst.common.project.facet.core.xml │ ├── org.eclipse.wst.jsdt.ui.superType.container │ ├── org.eclipse.wst.jsdt.ui.superType.name │ └── org.eclipse.wst.validation.prefs ├── pom.xml ├── readme └── src │ └── main │ ├── java │ └── com │ │ └── javadevelopersguide │ │ └── jersey │ │ ├── config │ │ └── Java8Application.java │ │ └── java8 │ │ ├── DefaultMethodInterface.java │ │ ├── DefaultMethodResource.java │ │ └── LambdaResource.java │ └── webapp │ ├── WEB-INF │ └── web.xml │ └── index.jsp ├── jersey-jpa-bookmark-example ├── .classpath ├── .project ├── .settings │ ├── .jsdtscope │ ├── org.eclipse.jdt.core.prefs │ ├── org.eclipse.m2e.core.prefs │ ├── org.eclipse.wst.common.component │ ├── org.eclipse.wst.common.project.facet.core.xml │ ├── org.eclipse.wst.jsdt.ui.superType.container │ ├── org.eclipse.wst.jsdt.ui.superType.name │ └── org.eclipse.wst.validation.prefs ├── README.MD ├── pom.xml └── src │ └── main │ ├── java │ └── com │ │ └── javadevelopersguide │ │ └── jersey │ │ ├── MyApplication.java │ │ ├── entity │ │ ├── BookmarkEntity.java │ │ ├── BookmarkEntityPK.java │ │ └── UserEntity.java │ │ ├── exception │ │ └── ExtendedNotFoundException.java │ │ ├── resource │ │ ├── BookmarkResource.java │ │ ├── BookmarksResource.java │ │ ├── UserResource.java │ │ └── UsersResource.java │ │ └── util │ │ └── tx │ │ ├── TransactionManager.java │ │ └── Transactional.java │ ├── resources │ └── META-INF │ │ └── persistence.xml │ └── webapp │ ├── WEB-INF │ └── web.xml │ └── index.jsp ├── jersey-json-moxy ├── .classpath ├── .project ├── .settings │ ├── .jsdtscope │ ├── org.eclipse.jdt.core.prefs │ ├── org.eclipse.m2e.core.prefs │ ├── org.eclipse.wst.common.component │ ├── org.eclipse.wst.common.project.facet.core.xml │ ├── org.eclipse.wst.jsdt.ui.superType.container │ ├── org.eclipse.wst.jsdt.ui.superType.name │ └── org.eclipse.wst.validation.prefs ├── README.MD ├── pom.xml └── src │ └── main │ ├── java │ └── com │ │ └── javadevelopersguide │ │ └── jersey │ │ ├── config │ │ └── JerseyServletContainerConfig.java │ │ ├── helloworld │ │ └── HelloWorldResource.java │ │ └── jsonmoxy │ │ ├── JsonResource.java │ │ └── TestBean.java │ └── webapp │ ├── WEB-INF │ └── web.xml │ └── index.jsp ├── jersey-logging-server-client-example ├── .classpath ├── .project ├── .settings │ ├── .jsdtscope │ ├── org.eclipse.jdt.core.prefs │ ├── org.eclipse.m2e.core.prefs │ ├── org.eclipse.wst.common.component │ ├── org.eclipse.wst.common.project.facet.core.xml │ ├── org.eclipse.wst.jsdt.ui.superType.container │ ├── org.eclipse.wst.jsdt.ui.superType.name │ └── org.eclipse.wst.validation.prefs ├── pom.xml └── src │ └── main │ ├── java │ └── com │ │ └── javadevelopersguide │ │ └── jersey │ │ ├── client │ │ └── UserResourceClient.java │ │ ├── config │ │ └── AppResourceConfig.java │ │ ├── model │ │ ├── APIResponse.java │ │ └── User.java │ │ └── resources │ │ ├── HelloWorldResource.java │ │ └── UserResource.java │ └── webapp │ ├── WEB-INF │ └── web.xml │ └── index.jsp ├── json-jackson ├── README.MD ├── pom.xml └── src │ ├── main │ ├── assembly │ │ └── src.xml │ └── java │ │ └── org │ │ └── glassfish │ │ └── jersey │ │ └── examples │ │ └── jackson │ │ ├── App.java │ │ ├── CombinedAnnotationBean.java │ │ ├── CombinedAnnotationResource.java │ │ ├── DummyBean.java │ │ ├── EmptyArrayBean.java │ │ ├── EmptyArrayResource.java │ │ ├── ExceptionMappingTestResource.java │ │ ├── MyApplication.java │ │ ├── MyObjectMapperProvider.java │ │ ├── NonJaxbBean.java │ │ └── NonJaxbBeanResource.java │ └── test │ └── java │ └── org │ └── glassfish │ └── jersey │ └── examples │ └── jackson │ └── JacksonTest.java ├── json-jackson1 ├── README.MD ├── pom.xml └── src │ ├── main │ ├── assembly │ │ └── src.xml │ └── java │ │ └── org │ │ └── glassfish │ │ └── jersey │ │ └── examples │ │ └── jackson1 │ │ ├── App.java │ │ ├── CombinedAnnotationBean.java │ │ ├── CombinedAnnotationResource.java │ │ ├── DummyBean.java │ │ ├── EmptyArrayBean.java │ │ ├── EmptyArrayResource.java │ │ ├── ExceptionMappingTestResource.java │ │ ├── MyApplication.java │ │ ├── MyObjectMapperProvider.java │ │ ├── NonJaxbBean.java │ │ └── NonJaxbBeanResource.java │ └── test │ └── java │ └── org │ └── glassfish │ └── jersey │ └── examples │ └── jackson1 │ └── Jackson1Test.java ├── json-jettison ├── README.MD ├── pom.xml └── src │ ├── main │ └── java │ │ └── org │ │ └── glassfish │ │ └── jersey │ │ └── examples │ │ └── jettison │ │ ├── AircraftType.java │ │ ├── AircraftTypeList.java │ │ ├── App.java │ │ ├── FlightList.java │ │ ├── FlightType.java │ │ ├── Flights.java │ │ ├── FlightsDataStore.java │ │ ├── JaxbContextResolver.java │ │ └── ObjectFactory.java │ └── test │ └── java │ └── org │ └── glassfish │ └── jersey │ └── examples │ └── jettison │ └── JsonJettisonTest.java ├── json-moxy ├── README.MD ├── pom.xml └── src │ ├── main │ └── java │ │ └── org │ │ └── glassfish │ │ └── jersey │ │ └── examples │ │ └── jsonmoxy │ │ ├── App.java │ │ ├── JsonResource.java │ │ └── TestBean.java │ └── test │ └── java │ └── org │ └── glassfish │ └── jersey │ └── examples │ └── jsonmoxy │ └── JsonResourceTest.java ├── json-processing-webapp ├── README.MD ├── pom.xml └── src │ ├── main │ ├── java │ │ └── org │ │ │ └── glassfish │ │ │ └── jersey │ │ │ └── examples │ │ │ └── jsonp │ │ │ ├── MyApplication.java │ │ │ ├── resource │ │ │ ├── DocumentFilteringResource.java │ │ │ └── DocumentResource.java │ │ │ └── service │ │ │ └── DocumentStorage.java │ └── webapp │ │ └── WEB-INF │ │ └── web.xml │ └── test │ └── java │ └── org │ └── glassfish │ └── jersey │ └── examples │ └── jsonp │ └── JsonProcessingResourceTest.java ├── json-with-padding ├── README.MD ├── pom.xml └── src │ ├── main │ ├── assembly │ │ └── src.xml │ └── java │ │ └── org │ │ └── glassfish │ │ └── jersey │ │ └── examples │ │ └── jsonp │ │ ├── App.java │ │ ├── ChangeListResource.java │ │ └── ChangeRecordBean.java │ └── test │ └── java │ └── org │ └── glassfish │ └── jersey │ └── examples │ └── jsonp │ └── JsonWithPaddingTest.java ├── managed-beans-webapp ├── README.MD ├── pom.xml └── src │ ├── main │ ├── java │ │ └── org │ │ │ └── glassfish │ │ │ └── jersey │ │ │ └── examples │ │ │ └── managedbeans │ │ │ └── resources │ │ │ ├── ManagedBeanException.java │ │ │ ├── ManagedBeanExceptionMapper.java │ │ │ ├── ManagedBeanPerRequestResource.java │ │ │ ├── ManagedBeanSingletonResource.java │ │ │ ├── MyApplication.java │ │ │ └── Widget.java │ ├── resources │ │ └── META-INF │ │ │ └── persistence.xml │ └── webapp │ │ ├── WEB-INF │ │ └── web.xml │ │ └── index.jsp │ └── test │ └── java │ └── org │ └── glassfish │ └── jersey │ └── examples │ └── managedbeans │ └── ManagedBeanWebAppTest.java ├── managed-client-simple-webapp ├── README.MD ├── pom.xml └── src │ ├── main │ ├── java │ │ └── org │ │ │ └── glassfish │ │ │ └── jersey │ │ │ └── examples │ │ │ └── managedclientsimple │ │ │ └── resources │ │ │ ├── ClientResource.java │ │ │ ├── ManagedClientApplication.java │ │ │ └── StandardResource.java │ └── webapp │ │ ├── WEB-INF │ │ └── web.xml │ │ └── index.html │ └── test │ └── java │ └── org │ └── glassfish │ └── jersey │ └── examples │ └── managedclientsimple │ └── ManagedClientSimpleTest.java ├── managed-client-webapp ├── README.MD ├── pom.xml └── src │ ├── main │ ├── java │ │ └── org │ │ │ └── glassfish │ │ │ └── jersey │ │ │ └── examples │ │ │ └── managedclient │ │ │ ├── ClientA.java │ │ │ ├── ClientB.java │ │ │ ├── CustomHeaderFeature.java │ │ │ ├── CustomHeaderFilter.java │ │ │ ├── InternalResource.java │ │ │ ├── MyApplication.java │ │ │ └── PublicResource.java │ └── webapp │ │ └── WEB-INF │ │ └── web.xml │ └── test │ └── java │ └── org │ └── glassfish │ └── jersey │ └── examples │ └── managedclient │ └── ManagedClientTest.java ├── managed-client ├── README.MD ├── pom.xml └── src │ ├── main │ └── java │ │ └── org │ │ └── glassfish │ │ └── jersey │ │ └── examples │ │ └── managedclient │ │ ├── App.java │ │ ├── ClientA.java │ │ ├── ClientB.java │ │ ├── CustomHeaderFeature.java │ │ ├── CustomHeaderFilter.java │ │ ├── InternalResource.java │ │ └── PublicResource.java │ └── test │ └── java │ └── org │ └── glassfish │ └── jersey │ └── examples │ └── managedclient │ └── ManagedClientTest.java ├── monitoring-webapp ├── README.MD ├── pom.xml └── src │ └── main │ ├── java │ └── org │ │ └── glassfish │ │ └── jersey │ │ └── examples │ │ └── monitoring │ │ ├── MyApplication.java │ │ ├── MyException.java │ │ ├── MyExceptionMapper.java │ │ ├── MyResource.java │ │ └── SubResource.java │ └── webapp │ ├── WEB-INF │ └── web.xml │ ├── index.html │ └── lib │ └── bootstrap.js ├── multipart-webapp ├── README.MD ├── pom.xml └── src │ ├── main │ ├── java │ │ └── org │ │ │ └── glassfish │ │ │ └── jersey │ │ │ └── examples │ │ │ └── multipart │ │ │ └── webapp │ │ │ ├── Bean.java │ │ │ ├── MultiPartFieldInjectedResource.java │ │ │ ├── MultiPartResource.java │ │ │ └── MyApplication.java │ └── webapp │ │ └── WEB-INF │ │ └── web.xml │ └── test │ └── java │ └── org │ └── glassfish │ └── jersey │ └── examples │ └── multipart │ └── webapp │ └── MultiPartWebAppTest.java ├── oauth-client-twitter ├── README.MD ├── pom.xml └── src │ └── main │ └── java │ └── org │ └── glassfish │ └── jersey │ └── examples │ └── oauth │ └── twitterclient │ ├── App.java │ ├── Status.java │ └── User.java ├── oauth2-client-google-webapp ├── README.MD ├── pom.xml └── src │ └── main │ ├── java │ └── org │ │ └── glassfish │ │ └── jersey │ │ └── examples │ │ └── oauth2 │ │ └── googleclient │ │ ├── SimpleOAuthService.java │ │ ├── entity │ │ ├── TaskBean.java │ │ ├── TaskListBean.java │ │ └── TaskRootBean.java │ │ ├── model │ │ ├── AllTaskListsModel.java │ │ ├── TaskListModel.java │ │ └── TaskModel.java │ │ └── resource │ │ ├── AuthorizationResource.java │ │ ├── MyApplication.java │ │ ├── SetupResource.java │ │ └── TaskResource.java │ ├── resources │ └── mustache │ │ └── tasks.mustache │ └── webapp │ ├── WEB-INF │ └── web.xml │ ├── index.html │ └── lib │ └── bootstrap.js ├── osgi-helloworld-webapp ├── README.MD ├── additional-bundle │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── org │ │ └── glassfish │ │ └── jersey │ │ └── examples │ │ └── osgi │ │ └── helloworld │ │ └── additional │ │ └── resource │ │ ├── AdditionalResource.java │ │ └── subpackage │ │ └── AdditionalSubPackagedResource.java ├── alternate-version-bundle │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── org │ │ └── glassfish │ │ └── jersey │ │ └── examples │ │ └── osgi │ │ └── helloworld │ │ └── additional │ │ └── resource │ │ └── AdditionalResource.java ├── functional-test │ ├── pom.xml │ └── src │ │ └── test │ │ ├── java │ │ └── org │ │ │ └── glassfish │ │ │ └── jersey │ │ │ └── examples │ │ │ └── helloworld │ │ │ └── test │ │ │ ├── AbstractWebAppTest.java │ │ │ └── WebAppFelixTest.java │ │ └── resources │ │ ├── felix.policy │ │ ├── log4j.properties │ │ └── runtime.policy ├── lib-bundle │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── org │ │ └── glassfish │ │ └── jersey │ │ └── examples │ │ └── osgi │ │ └── helloworld │ │ └── resource │ │ ├── AnotherResource.java │ │ ├── HelloWorldResource.java │ │ └── MyApplication.java ├── pom.xml └── war-bundle │ ├── pom.xml │ └── src │ └── main │ ├── java │ └── org │ │ └── glassfish │ │ └── jersey │ │ └── examples │ │ └── osgi │ │ └── helloworld │ │ ├── WebAppContextListener.java │ │ └── resource │ │ ├── WebInfClassesResource.java │ │ └── subpackage │ │ └── WebInfClassesSubPackagedResource.java │ └── webapp │ └── WEB-INF │ └── web.xml ├── osgi-http-service ├── README.MD ├── bundle │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── org │ │ └── glassfish │ │ └── jersey │ │ └── examples │ │ └── osgihttpservice │ │ ├── Activator.java │ │ ├── JerseyApplication.java │ │ └── StatusResource.java ├── functional-test │ ├── pom.xml │ └── src │ │ └── test │ │ ├── java │ │ └── org │ │ │ └── glassfish │ │ │ └── jersey │ │ │ └── examples │ │ │ └── osgihttpservice │ │ │ └── test │ │ │ ├── AbstractHttpServiceTest.java │ │ │ ├── GrizzlyHttpServiceFelixTest.java │ │ │ └── JettyHttpServiceFelixTest.java │ │ └── resources │ │ └── log4j.properties └── pom.xml ├── reload ├── README.MD ├── pom.xml ├── resources └── src │ ├── main │ └── java │ │ └── org │ │ └── glassfish │ │ └── jersey │ │ └── examples │ │ └── reload │ │ ├── App.java │ │ ├── ArrivalsResource.java │ │ ├── DeparturesResource.java │ │ ├── FlightsDB.java │ │ ├── StatsResource.java │ │ └── compiler │ │ ├── AppClassLoader.java │ │ ├── ClassFile.java │ │ ├── Compiler.java │ │ ├── FileManager.java │ │ └── JavaFile.java │ └── test │ └── java │ └── org │ └── glassfish │ └── jersey │ └── examples │ └── reload │ └── ReloadTest.java ├── rx-client-webapp ├── README.MD ├── pom.xml └── src │ ├── main │ └── java │ │ └── org │ │ └── glassfish │ │ └── jersey │ │ └── examples │ │ └── rx │ │ ├── Helper.java │ │ ├── RxApplication.java │ │ ├── agent │ │ ├── AsyncAgentResource.java │ │ ├── CompletionStageAgentResource.java │ │ ├── FlowableAgentResource.java │ │ ├── ListenableFutureAgentResource.java │ │ ├── ObservableAgentResource.java │ │ └── SyncAgentResource.java │ │ ├── domain │ │ ├── AgentResponse.java │ │ ├── Calculation.java │ │ ├── Destination.java │ │ ├── Forecast.java │ │ └── Recommendation.java │ │ └── remote │ │ ├── CalculationResource.java │ │ ├── DestinationResource.java │ │ └── ForecastResource.java │ └── test │ └── java │ └── org │ └── glassfish │ └── jersey │ └── examples │ └── rx │ └── RxClientsTest.java ├── server-async-managed ├── README.MD ├── pom.xml └── src │ ├── main │ └── java │ │ └── org │ │ └── glassfish │ │ └── jersey │ │ └── examples │ │ └── server │ │ └── async │ │ └── managed │ │ ├── App.java │ │ ├── ChatResource.java │ │ ├── Message.java │ │ └── SimpleJerseyExecutorManagedLongRunningResource.java │ └── test │ └── java │ └── org │ └── glassfish │ └── jersey │ └── examples │ └── server │ └── async │ └── managed │ └── ManagedAsyncResourceTest.java ├── server-async-standalone ├── README.MD ├── client │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── org │ │ │ └── glassfish │ │ │ └── jersey │ │ │ └── examples │ │ │ └── server │ │ │ └── async │ │ │ ├── Main.java │ │ │ ├── MainWindow.form │ │ │ └── MainWindow.java │ │ └── test │ │ └── java │ │ └── org │ │ └── glassfish │ │ └── jersey │ │ └── examples │ │ └── server │ │ └── async │ │ └── MainTest.java ├── pom.xml └── webapp │ ├── pom.xml │ └── src │ └── main │ ├── java │ └── org │ │ └── glassfish │ │ └── jersey │ │ └── examples │ │ └── server │ │ └── async │ │ ├── AsyncJaxrsApplication.java │ │ └── LongRunningEchoResource.java │ └── webapp │ └── WEB-INF │ └── web.xml ├── server-async ├── README.MD ├── pom.xml └── src │ ├── main │ └── java │ │ └── org │ │ └── glassfish │ │ └── jersey │ │ └── examples │ │ └── server │ │ └── async │ │ ├── App.java │ │ ├── BlockingPostChatResource.java │ │ ├── FireAndForgetChatResource.java │ │ ├── LongRunningAsyncOperationResource.java │ │ └── SimpleLongRunningResource.java │ └── test │ └── java │ └── org │ └── glassfish │ └── jersey │ └── examples │ └── server │ └── async │ └── AsyncResourceTest.java ├── server-sent-events-jaxrs ├── README.MD ├── pom.xml └── src │ ├── main │ └── java │ │ └── org │ │ └── glassfish │ │ └── jersey │ │ └── examples │ │ └── sse │ │ └── jaxrs │ │ ├── App.java │ │ ├── DomainResource.java │ │ └── JaxRsServerSentEventsResource.java │ └── test │ └── java │ └── org │ └── glassfish │ └── jersey │ └── examples │ └── sse │ └── jaxrs │ └── ServerSentEventsTest.java ├── server-sent-events-jersey ├── README.MD ├── pom.xml └── src │ ├── main │ └── java │ │ └── org │ │ └── glassfish │ │ └── jersey │ │ └── examples │ │ └── sse │ │ └── jersey │ │ ├── App.java │ │ ├── DomainResource.java │ │ └── ServerSentEventsResource.java │ └── test │ └── java │ └── org │ └── glassfish │ └── jersey │ └── examples │ └── sse │ └── jersey │ └── ServerSentEventsTest.java ├── servlet3-webapp ├── README.MD ├── pom.xml └── src │ ├── main │ ├── java │ │ └── org │ │ │ └── glassfish │ │ │ └── jersey │ │ │ └── examples │ │ │ └── servlet3 │ │ │ └── webapp │ │ │ ├── App.java │ │ │ ├── CatResource.java │ │ │ └── DogResource.java │ └── webapp │ │ └── WEB-INF │ │ └── web.xml │ └── test │ └── java │ └── Servlet3WebappITCase.java ├── shortener-webapp ├── README.MD ├── pom.xml └── src │ ├── main │ ├── java │ │ └── org │ │ │ └── glassfish │ │ │ └── jersey │ │ │ └── examples │ │ │ └── shortener │ │ │ └── webapp │ │ │ ├── ShortenerApplication.java │ │ │ ├── domain │ │ │ └── ShortenedLink.java │ │ │ ├── resource │ │ │ ├── PermanentLinkResource.java │ │ │ ├── ResolverResource.java │ │ │ └── ShortenerResource.java │ │ │ ├── service │ │ │ └── ShortenerService.java │ │ │ └── validation │ │ │ ├── ShortenLink.java │ │ │ └── ValidShortenedLink.java │ ├── resources │ │ ├── ValidationMessages.properties │ │ └── mustache │ │ │ ├── error-404.mustache │ │ │ ├── error-form.mustache │ │ │ ├── form.mustache │ │ │ └── short-link.mustache │ └── webapp │ │ ├── WEB-INF │ │ └── web.xml │ │ └── lib │ │ └── bootstrap.js │ └── test │ └── java │ └── org │ └── glassfish │ └── jersey │ └── examples │ └── shortener │ └── webapp │ ├── ResourcesTest.java │ └── ShortenerServiceTest.java ├── simple-console ├── README.MD ├── pom.xml └── src │ ├── main │ ├── java │ │ └── org │ │ │ └── glassfish │ │ │ └── jersey │ │ │ └── examples │ │ │ └── console │ │ │ ├── App.java │ │ │ └── resources │ │ │ ├── Colours.java │ │ │ └── FormResource.java │ └── resources │ │ └── form.html │ └── test │ └── java │ └── org │ └── glassfish │ └── jersey │ └── examples │ └── console │ └── MainTest.java ├── sparklines ├── README.MD ├── pom.xml └── src │ ├── main │ ├── java │ │ └── org │ │ │ └── glassfish │ │ │ └── jersey │ │ │ └── examples │ │ │ └── sparklines │ │ │ ├── ColorParam.java │ │ │ ├── IntegerList.java │ │ │ ├── Interval.java │ │ │ ├── Main.java │ │ │ └── SparklinesResource.java │ └── resources │ │ └── webroot │ │ ├── index.html │ │ └── lib │ │ └── bootstrap.js │ └── test │ └── java │ └── SparklinesTest.java ├── sse-item-store-jaxrs-webapp ├── README.MD ├── pom.xml └── src │ ├── main │ ├── java │ │ └── org │ │ │ └── glassfish │ │ │ └── jersey │ │ │ └── examples │ │ │ └── sseitemstore │ │ │ └── jaxrs │ │ │ ├── JaxrsItemStoreApp.java │ │ │ └── JaxrsItemStoreResource.java │ └── webapp │ │ ├── css │ │ └── main.css │ │ ├── index.html │ │ └── js │ │ └── engine.js │ └── test │ └── java │ └── org │ └── glassfish │ └── jersey │ └── examples │ └── sseitemstore │ └── jaxrs │ └── JaxrsItemStoreResourceTest.java ├── sse-item-store-jersey-webapp ├── README.MD ├── pom.xml └── src │ ├── main │ ├── java │ │ └── org │ │ │ └── glassfish │ │ │ └── jersey │ │ │ └── examples │ │ │ └── sseitemstore │ │ │ └── jersey │ │ │ ├── ItemStoreApp.java │ │ │ └── ItemStoreResource.java │ └── webapp │ │ ├── css │ │ └── main.css │ │ ├── index.html │ │ └── js │ │ └── engine.js │ └── test │ └── java │ └── org │ └── glassfish │ └── jersey │ └── examples │ └── sseitemstore │ └── jersey │ └── JerseyItemStoreResourceTest.java ├── sse-twitter-aggregator ├── README.MD ├── client.cert ├── keystore_client ├── pom.xml ├── src │ └── main │ │ ├── java │ │ └── org │ │ │ └── glassfish │ │ │ └── jersey │ │ │ └── examples │ │ │ └── aggregator │ │ │ ├── AbstractTestAggregator.java │ │ │ ├── App.java │ │ │ ├── DataAggregator.java │ │ │ ├── DataListener.java │ │ │ ├── MainWindow.form │ │ │ ├── MainWindow.java │ │ │ ├── Message.java │ │ │ ├── MessageStreamResourceJaxRs.java │ │ │ ├── MessageStreamResourceJersey.java │ │ │ ├── RemoveSelectedListItemsAction.java │ │ │ ├── TestAggregatorJaxRs.java │ │ │ ├── TestAggregatorJersey.java │ │ │ └── TwitterAggregator.java │ │ └── resources │ │ └── webroot │ │ ├── css │ │ └── main.css │ │ ├── index.html │ │ └── js │ │ └── sse-client.js ├── truststore_client └── twitter-api.properties ├── system-properties-example ├── README.MD ├── pom.xml └── src │ ├── main │ └── java │ │ └── org │ │ └── glassfish │ │ └── jersey │ │ └── examples │ │ └── sysprops │ │ ├── App.java │ │ ├── PropertiesReader.java │ │ ├── PropertiesWriter.java │ │ ├── PropertyNamesResource.java │ │ ├── PropertyResource.java │ │ └── impl │ │ ├── PropertyNamesResourceImpl.java │ │ └── PropertyResourceImpl.java │ └── test │ └── java │ └── org │ └── glassfish │ └── jersey │ └── examples │ └── sysprops │ └── SysPropsTest.java ├── tone-generator ├── README.MD ├── pom.xml └── src │ ├── main │ ├── java │ │ └── org │ │ │ └── glassfish │ │ │ └── jersey │ │ │ └── examples │ │ │ └── tonegen │ │ │ ├── DTMFTone.java │ │ │ ├── Main.java │ │ │ ├── ToneGenerator.java │ │ │ └── WavResource.java │ └── resources │ │ └── webroot │ │ ├── index.html │ │ └── lib │ │ └── bootstrap.js │ └── test │ └── java │ └── org │ └── glassfish │ └── jersey │ └── examples │ └── tonegen │ └── TonegenTest.java └── xml-moxy ├── README.MD ├── pom.xml └── src ├── main └── java │ └── org │ └── glassfish │ └── jersey │ └── examples │ └── xmlmoxy │ ├── App.java │ ├── CustomerResource.java │ └── beans │ ├── Address.java │ ├── Customer.java │ └── PhoneNumber.java └── test └── java └── org └── glassfish └── jersey └── examples └── xmlmoxy └── MoxyAppTest.java /bean-validation-webapp/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /bean-validation-webapp/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | bean-validation-webapp 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.wst.common.project.facet.core.builder 15 | 16 | 17 | 18 | 19 | org.eclipse.m2e.core.maven2Builder 20 | 21 | 22 | 23 | 24 | org.eclipse.wst.validation.validationbuilder 25 | 26 | 27 | 28 | 29 | 30 | org.eclipse.jem.workbench.JavaEMFNature 31 | org.eclipse.wst.common.modulecore.ModuleCoreNature 32 | org.eclipse.jdt.core.javanature 33 | org.eclipse.m2e.core.maven2Nature 34 | org.eclipse.wst.common.project.facet.core.nature 35 | org.eclipse.wst.jsdt.core.jsNature 36 | 37 | 38 | -------------------------------------------------------------------------------- /bean-validation-webapp/.settings/.jsdtscope: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /bean-validation-webapp/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding//src/main/java=UTF-8 3 | encoding//src/main/resources=UTF-8 4 | encoding//src/test/java=UTF-8 5 | encoding/=UTF-8 6 | -------------------------------------------------------------------------------- /bean-validation-webapp/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate 4 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 5 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 6 | org.eclipse.jdt.core.compiler.compliance=1.8 7 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate 8 | org.eclipse.jdt.core.compiler.debug.localVariable=generate 9 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate 10 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 11 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 12 | org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning 13 | org.eclipse.jdt.core.compiler.release=disabled 14 | org.eclipse.jdt.core.compiler.source=1.8 15 | -------------------------------------------------------------------------------- /bean-validation-webapp/.settings/org.eclipse.m2e.core.prefs: -------------------------------------------------------------------------------- 1 | activeProfiles= 2 | eclipse.preferences.version=1 3 | resolveWorkspaceProjects=true 4 | version=1 5 | -------------------------------------------------------------------------------- /bean-validation-webapp/.settings/org.eclipse.wst.common.component: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /bean-validation-webapp/.settings/org.eclipse.wst.common.project.facet.core.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /bean-validation-webapp/.settings/org.eclipse.wst.jsdt.ui.superType.container: -------------------------------------------------------------------------------- 1 | org.eclipse.wst.jsdt.launching.baseBrowserLibrary -------------------------------------------------------------------------------- /bean-validation-webapp/.settings/org.eclipse.wst.jsdt.ui.superType.name: -------------------------------------------------------------------------------- 1 | Window -------------------------------------------------------------------------------- /bean-validation-webapp/.settings/org.eclipse.wst.validation.prefs: -------------------------------------------------------------------------------- 1 | disabled=06target 2 | eclipse.preferences.version=1 3 | -------------------------------------------------------------------------------- /bean-validation-webapp/src/main/webapp/directives.js: -------------------------------------------------------------------------------- 1 | /* 2 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 3 | * 4 | * Copyright (c) 2012-2017 Oracle and/or its affiliates. All rights reserved. 5 | * 6 | * The contents of this file are subject to the terms of either the GNU 7 | * General Public License Version 2 only ("GPL") or the Common Development 8 | * and Distribution License("CDDL") (collectively, the "License"). You 9 | * may not use this file except in compliance with the License. You can 10 | * obtain a copy of the License at 11 | * https://oss.oracle.com/licenses/CDDL+GPL-1.1 12 | * or LICENSE.txt. See the License for the specific 13 | * language governing permissions and limitations under the License. 14 | * 15 | * When distributing the software, include this License Header Notice in each 16 | * file and include the License file at LICENSE.txt. 17 | * 18 | * GPL Classpath Exception: 19 | * Oracle designates this particular file as subject to the "Classpath" 20 | * exception as provided by Oracle in the GPL Version 2 section of the License 21 | * file that accompanied this code. 22 | * 23 | * Modifications: 24 | * If applicable, add the following below the License Header, with the fields 25 | * enclosed by brackets [] replaced by your own identifying information: 26 | * "Portions Copyright [year] [name of copyright owner]" 27 | * 28 | * Contributor(s): 29 | * If you wish your version of this file to be governed by only the CDDL or 30 | * only the GPL Version 2, indicate your decision by adding "[Contributor] 31 | * elects to include this software in this distribution under the [CDDL or GPL 32 | * Version 2] license." If you don't indicate a single choice of license, a 33 | * recipient has the option to distribute your version of this file under 34 | * either the CDDL, the GPL Version 2 or to extend the choice of license to 35 | * its licensees as provided above. However, if you add GPL Version 2 code 36 | * and therefore, elected the GPL Version 2 license, then the option applies 37 | * only if the new code is made subject to such option by the copyright 38 | * holder. 39 | */ 40 | 41 | 'use strict'; 42 | 43 | /* Directives */ 44 | 45 | contact.directive('nullIfEmpty', [function () { 46 | return { 47 | require: 'ngModel', 48 | link: function (scope, elm, attr, ctrl) { 49 | ctrl.$parsers.unshift(function (value) { 50 | return value === '' ? null : value; 51 | }); 52 | } 53 | }; 54 | }] 55 | ); -------------------------------------------------------------------------------- /bean-validation-webapp/src/main/webapp/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RameshMF/jersey-tutorial/ab3c070fba68a09fa4f4eceb49e9b8795f07c685/bean-validation-webapp/src/main/webapp/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /bean-validation-webapp/src/main/webapp/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RameshMF/jersey-tutorial/ab3c070fba68a09fa4f4eceb49e9b8795f07c685/bean-validation-webapp/src/main/webapp/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /bean-validation-webapp/src/main/webapp/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RameshMF/jersey-tutorial/ab3c070fba68a09fa4f4eceb49e9b8795f07c685/bean-validation-webapp/src/main/webapp/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /bean-validation-webapp/src/main/webapp/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RameshMF/jersey-tutorial/ab3c070fba68a09fa4f4eceb49e9b8795f07c685/bean-validation-webapp/src/main/webapp/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /bean-validation-webapp/src/main/webapp/lib/angular-cookies.min.js: -------------------------------------------------------------------------------- 1 | /* 2 | AngularJS v1.6.6 3 | (c) 2010-2017 Google, Inc. http://angularjs.org 4 | License: MIT 5 | */ 6 | (function(n,c){'use strict';function l(b,a,g){var d=g.baseHref(),k=b[0];return function(b,e,f){var g,h;f=f||{};h=f.expires;g=c.isDefined(f.path)?f.path:d;c.isUndefined(e)&&(h="Thu, 01 Jan 1970 00:00:00 GMT",e="");c.isString(h)&&(h=new Date(h));e=encodeURIComponent(b)+"="+encodeURIComponent(e);e=e+(g?";path="+g:"")+(f.domain?";domain="+f.domain:"");e+=h?";expires="+h.toUTCString():"";e+=f.secure?";secure":"";f=e.length+1;4096 4096 bytes)!");k.cookie=e}}c.module("ngCookies",["ng"]).info({angularVersion:"1.6.6"}).provider("$cookies",[function(){var b=this.defaults={};this.$get=["$$cookieReader","$$cookieWriter",function(a,g){return{get:function(d){return a()[d]},getObject:function(d){return(d=this.get(d))?c.fromJson(d):d},getAll:function(){return a()},put:function(d,a,m){g(d,a,m?c.extend({},b,m):b)},putObject:function(d,b,a){this.put(d,c.toJson(b),a)},remove:function(a,k){g(a,void 0,k?c.extend({},b,k):b)}}}]}]);c.module("ngCookies").factory("$cookieStore", 8 | ["$cookies",function(b){return{get:function(a){return b.getObject(a)},put:function(a,c){b.putObject(a,c)},remove:function(a){b.remove(a)}}}]);l.$inject=["$document","$log","$browser"];c.module("ngCookies").provider("$$cookieWriter",function(){this.$get=l})})(window,window.angular); 9 | //# sourceMappingURL=angular-cookies.min.js.map 10 | -------------------------------------------------------------------------------- /bean-validation-webapp/src/main/webapp/lib/angular-loader.min.js: -------------------------------------------------------------------------------- 1 | /* 2 | AngularJS v1.6.6 3 | (c) 2010-2017 Google, Inc. http://angularjs.org 4 | License: MIT 5 | */ 6 | (function(){'use strict';function g(a,f){f=f||Error;return function(){var d=arguments[0],e;e="["+(a?a+":":"")+d+"] http://errors.angularjs.org/1.6.6/"+(a?a+"/":"")+d;for(d=1;d 42 | <%@page contentType="text/html"%> 43 | <%@page pageEncoding="UTF-8"%> 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | Help web page 54 | 55 | 56 | -------------------------------------------------------------------------------- /bookstore-webapp/src/main/webapp/org/glassfish/jersey/examples/bookstore/webapp/resource/Bookstore/count.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | 3 | DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 4 | 5 | Copyright (c) 2010-2017 Oracle and/or its affiliates. All rights reserved. 6 | 7 | The contents of this file are subject to the terms of either the GNU 8 | General Public License Version 2 only ("GPL") or the Common Development 9 | and Distribution License("CDDL") (collectively, the "License"). You 10 | may not use this file except in compliance with the License. You can 11 | obtain a copy of the License at 12 | https://oss.oracle.com/licenses/CDDL+GPL-1.1 13 | or LICENSE.txt. See the License for the specific 14 | language governing permissions and limitations under the License. 15 | 16 | When distributing the software, include this License Header Notice in each 17 | file and include the License file at LICENSE.txt. 18 | 19 | GPL Classpath Exception: 20 | Oracle designates this particular file as subject to the "Classpath" 21 | exception as provided by Oracle in the GPL Version 2 section of the License 22 | file that accompanied this code. 23 | 24 | Modifications: 25 | If applicable, add the following below the License Header, with the fields 26 | enclosed by brackets [] replaced by your own identifying information: 27 | "Portions Copyright [year] [name of copyright owner]" 28 | 29 | Contributor(s): 30 | If you wish your version of this file to be governed by only the CDDL or 31 | only the GPL Version 2, indicate your decision by adding "[Contributor] 32 | elects to include this software in this distribution under the [CDDL or GPL 33 | Version 2] license." If you don't indicate a single choice of license, a 34 | recipient has the option to distribute your version of this file under 35 | either the CDDL, the GPL Version 2 or to extend the choice of license to 36 | its licensees as provided above. However, if you add GPL Version 2 code 37 | and therefore, elected the GPL Version 2 license, then the option applies 38 | only if the new code is made subject to such option by the copyright 39 | holder. 40 | 41 | --%> 42 | <%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> 43 | <%-- 44 | An example of another side JSP. 45 | --%> 46 | 47 | 48 | # of items: ${fn:length(it.items)} 49 | 50 | -------------------------------------------------------------------------------- /bookstore-webapp/src/main/webapp/org/glassfish/jersey/examples/bookstore/webapp/resource/Bookstore/time.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | 3 | DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 4 | 5 | Copyright (c) 2010-2017 Oracle and/or its affiliates. All rights reserved. 6 | 7 | The contents of this file are subject to the terms of either the GNU 8 | General Public License Version 2 only ("GPL") or the Common Development 9 | and Distribution License("CDDL") (collectively, the "License"). You 10 | may not use this file except in compliance with the License. You can 11 | obtain a copy of the License at 12 | https://oss.oracle.com/licenses/CDDL+GPL-1.1 13 | or LICENSE.txt. See the License for the specific 14 | language governing permissions and limitations under the License. 15 | 16 | When distributing the software, include this License Header Notice in each 17 | file and include the License file at LICENSE.txt. 18 | 19 | GPL Classpath Exception: 20 | Oracle designates this particular file as subject to the "Classpath" 21 | exception as provided by Oracle in the GPL Version 2 section of the License 22 | file that accompanied this code. 23 | 24 | Modifications: 25 | If applicable, add the following below the License Header, with the fields 26 | enclosed by brackets [] replaced by your own identifying information: 27 | "Portions Copyright [year] [name of copyright owner]" 28 | 29 | Contributor(s): 30 | If you wish your version of this file to be governed by only the CDDL or 31 | only the GPL Version 2, indicate your decision by adding "[Contributor] 32 | elects to include this software in this distribution under the [CDDL or GPL 33 | Version 2] license." If you don't indicate a single choice of license, a 34 | recipient has the option to distribute your version of this file under 35 | either the CDDL, the GPL Version 2 or to extend the choice of license to 36 | its licensees as provided above. However, if you add GPL Version 2 code 37 | and therefore, elected the GPL Version 2 license, then the option applies 38 | only if the new code is made subject to such option by the copyright 39 | holder. 40 | 41 | --%> 42 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 43 | 44 | 45 | Current system time is ${it.systemTime} 46 | 47 | -------------------------------------------------------------------------------- /bookstore-webapp/src/main/webapp/org/glassfish/jersey/examples/bookstore/webapp/resource/Item/footer.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | 3 | DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 4 | 5 | Copyright (c) 2010-2017 Oracle and/or its affiliates. All rights reserved. 6 | 7 | The contents of this file are subject to the terms of either the GNU 8 | General Public License Version 2 only ("GPL") or the Common Development 9 | and Distribution License("CDDL") (collectively, the "License"). You 10 | may not use this file except in compliance with the License. You can 11 | obtain a copy of the License at 12 | https://oss.oracle.com/licenses/CDDL+GPL-1.1 13 | or LICENSE.txt. See the License for the specific 14 | language governing permissions and limitations under the License. 15 | 16 | When distributing the software, include this License Header Notice in each 17 | file and include the License file at LICENSE.txt. 18 | 19 | GPL Classpath Exception: 20 | Oracle designates this particular file as subject to the "Classpath" 21 | exception as provided by Oracle in the GPL Version 2 section of the License 22 | file that accompanied this code. 23 | 24 | Modifications: 25 | If applicable, add the following below the License Header, with the fields 26 | enclosed by brackets [] replaced by your own identifying information: 27 | "Portions Copyright [year] [name of copyright owner]" 28 | 29 | Contributor(s): 30 | If you wish your version of this file to be governed by only the CDDL or 31 | only the GPL Version 2, indicate your decision by adding "[Contributor] 32 | elects to include this software in this distribution under the [CDDL or GPL 33 | Version 2] license." If you don't indicate a single choice of license, a 34 | recipient has the option to distribute your version of this file under 35 | either the CDDL, the GPL Version 2 or to extend the choice of license to 36 | its licensees as provided above. However, if you add GPL Version 2 code 37 | and therefore, elected the GPL Version 2 license, then the option applies 38 | only if the new code is made subject to such option by the copyright 39 | holder. 40 | 41 | --%> 42 |

43 | Back 44 |


45 |
46 | Common footer (title ${it.title}) 47 |
48 | -------------------------------------------------------------------------------- /cdi-webapp/src/main/resources/META-INF/beans.xml: -------------------------------------------------------------------------------- 1 | 2 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /cdi-webapp/src/main/webapp/WEB-INF/beans.xml: -------------------------------------------------------------------------------- 1 | 2 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /declarative-linking/src/main/java/org/glassfish/jersey/examples/linking/model/ItemModel.java: -------------------------------------------------------------------------------- 1 | /* 2 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 3 | * 4 | * Copyright (c) 2010-2017 Oracle and/or its affiliates. All rights reserved. 5 | * 6 | * The contents of this file are subject to the terms of either the GNU 7 | * General Public License Version 2 only ("GPL") or the Common Development 8 | * and Distribution License("CDDL") (collectively, the "License"). You 9 | * may not use this file except in compliance with the License. You can 10 | * obtain a copy of the License at 11 | * https://oss.oracle.com/licenses/CDDL+GPL-1.1 12 | * or LICENSE.txt. See the License for the specific 13 | * language governing permissions and limitations under the License. 14 | * 15 | * When distributing the software, include this License Header Notice in each 16 | * file and include the License file at LICENSE.txt. 17 | * 18 | * GPL Classpath Exception: 19 | * Oracle designates this particular file as subject to the "Classpath" 20 | * exception as provided by Oracle in the GPL Version 2 section of the License 21 | * file that accompanied this code. 22 | * 23 | * Modifications: 24 | * If applicable, add the following below the License Header, with the fields 25 | * enclosed by brackets [] replaced by your own identifying information: 26 | * "Portions Copyright [year] [name of copyright owner]" 27 | * 28 | * Contributor(s): 29 | * If you wish your version of this file to be governed by only the CDDL or 30 | * only the GPL Version 2, indicate your decision by adding "[Contributor] 31 | * elects to include this software in this distribution under the [CDDL or GPL 32 | * Version 2] license." If you don't indicate a single choice of license, a 33 | * recipient has the option to distribute your version of this file under 34 | * either the CDDL, the GPL Version 2 or to extend the choice of license to 35 | * its licensees as provided above. However, if you add GPL Version 2 code 36 | * and therefore, elected the GPL Version 2 license, then the option applies 37 | * only if the new code is made subject to such option by the copyright 38 | * holder. 39 | */ 40 | 41 | package org.glassfish.jersey.examples.linking.model; 42 | 43 | /** 44 | * @author Mark Hadley 45 | * @author Gerard Davison (gerard.davison at oracle.com) 46 | */ 47 | public class ItemModel { 48 | String name; 49 | 50 | public ItemModel(String name) { 51 | this.name = name; 52 | } 53 | 54 | public String getName() { 55 | return name; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /extended-wadl-webapp/src/main/resources/application-grammars.xml: -------------------------------------------------------------------------------- 1 | 2 | 43 | 44 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /extended-wadl-webapp/src/test/resources/log4j.properties: -------------------------------------------------------------------------------- 1 | # 2 | # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 3 | # 4 | # Copyright (c) 2013-2017 Oracle and/or its affiliates. All rights reserved. 5 | # 6 | # The contents of this file are subject to the terms of either the GNU 7 | # General Public License Version 2 only ("GPL") or the Common Development 8 | # and Distribution License("CDDL") (collectively, the "License"). You 9 | # may not use this file except in compliance with the License. You can 10 | # obtain a copy of the License at 11 | # https://oss.oracle.com/licenses/CDDL+GPL-1.1 12 | # or LICENSE.txt. See the License for the specific 13 | # language governing permissions and limitations under the License. 14 | # 15 | # When distributing the software, include this License Header Notice in each 16 | # file and include the License file at LICENSE.txt. 17 | # 18 | # GPL Classpath Exception: 19 | # Oracle designates this particular file as subject to the "Classpath" 20 | # exception as provided by Oracle in the GPL Version 2 section of the License 21 | # file that accompanied this code. 22 | # 23 | # Modifications: 24 | # If applicable, add the following below the License Header, with the fields 25 | # enclosed by brackets [] replaced by your own identifying information: 26 | # "Portions Copyright [year] [name of copyright owner]" 27 | # 28 | # Contributor(s): 29 | # If you wish your version of this file to be governed by only the CDDL or 30 | # only the GPL Version 2, indicate your decision by adding "[Contributor] 31 | # elects to include this software in this distribution under the [CDDL or GPL 32 | # Version 2] license." If you don't indicate a single choice of license, a 33 | # recipient has the option to distribute your version of this file under 34 | # either the CDDL, the GPL Version 2 or to extend the choice of license to 35 | # its licensees as provided above. However, if you add GPL Version 2 code 36 | # and therefore, elected the GPL Version 2 license, then the option applies 37 | # only if the new code is made subject to such option by the copyright 38 | # holder. 39 | # 40 | 41 | log4j.rootCategory=DEBUG, stdout 42 | log4j.appender.stdout=org.apache.log4j.ConsoleAppender 43 | log4j.appender.stdout.layout.ConversionPattern=[%30.30c{1}] - %m%n 44 | log4j.appender.stdout.layout=org.apache.log4j.PatternLayout 45 | -------------------------------------------------------------------------------- /freemarker-webapp/src/main/resources/freemarker/hello-default-model.ftl: -------------------------------------------------------------------------------- 1 | <#-- 2 | 3 | DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 4 | 5 | Copyright (c) 2013-2017 Oracle and/or its affiliates. All rights reserved. 6 | 7 | The contents of this file are subject to the terms of either the GNU 8 | General Public License Version 2 only ("GPL") or the Common Development 9 | and Distribution License("CDDL") (collectively, the "License"). You 10 | may not use this file except in compliance with the License. You can 11 | obtain a copy of the License at 12 | https://oss.oracle.com/licenses/CDDL+GPL-1.1 13 | or LICENSE.txt. See the License for the specific 14 | language governing permissions and limitations under the License. 15 | 16 | When distributing the software, include this License Header Notice in each 17 | file and include the License file at LICENSE.txt. 18 | 19 | GPL Classpath Exception: 20 | Oracle designates this particular file as subject to the "Classpath" 21 | exception as provided by Oracle in the GPL Version 2 section of the License 22 | file that accompanied this code. 23 | 24 | Modifications: 25 | If applicable, add the following below the License Header, with the fields 26 | enclosed by brackets [] replaced by your own identifying information: 27 | "Portions Copyright [year] [name of copyright owner]" 28 | 29 | Contributor(s): 30 | If you wish your version of this file to be governed by only the CDDL or 31 | only the GPL Version 2, indicate your decision by adding "[Contributor] 32 | elects to include this software in this distribution under the [CDDL or GPL 33 | Version 2] license." If you don't indicate a single choice of license, a 34 | recipient has the option to distribute your version of this file under 35 | either the CDDL, the GPL Version 2 or to extend the choice of license to 36 | its licensees as provided above. However, if you add GPL Version 2 code 37 | and therefore, elected the GPL Version 2 license, then the option applies 38 | only if the new code is made subject to such option by the copyright 39 | holder. 40 | 41 | --> 42 | 43 | 44 | Welcome! 45 | 46 | 47 | 48 |

Welcome ${model}!

49 | 50 | 51 | -------------------------------------------------------------------------------- /freemarker-webapp/src/main/resources/freemarker/hello.ftl: -------------------------------------------------------------------------------- 1 | <#-- 2 | 3 | DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 4 | 5 | Copyright (c) 2011-2017 Oracle and/or its affiliates. All rights reserved. 6 | 7 | The contents of this file are subject to the terms of either the GNU 8 | General Public License Version 2 only ("GPL") or the Common Development 9 | and Distribution License("CDDL") (collectively, the "License"). You 10 | may not use this file except in compliance with the License. You can 11 | obtain a copy of the License at 12 | https://oss.oracle.com/licenses/CDDL+GPL-1.1 13 | or LICENSE.txt. See the License for the specific 14 | language governing permissions and limitations under the License. 15 | 16 | When distributing the software, include this License Header Notice in each 17 | file and include the License file at LICENSE.txt. 18 | 19 | GPL Classpath Exception: 20 | Oracle designates this particular file as subject to the "Classpath" 21 | exception as provided by Oracle in the GPL Version 2 section of the License 22 | file that accompanied this code. 23 | 24 | Modifications: 25 | If applicable, add the following below the License Header, with the fields 26 | enclosed by brackets [] replaced by your own identifying information: 27 | "Portions Copyright [year] [name of copyright owner]" 28 | 29 | Contributor(s): 30 | If you wish your version of this file to be governed by only the CDDL or 31 | only the GPL Version 2, indicate your decision by adding "[Contributor] 32 | elects to include this software in this distribution under the [CDDL or GPL 33 | Version 2] license." If you don't indicate a single choice of license, a 34 | recipient has the option to distribute your version of this file under 35 | either the CDDL, the GPL Version 2 or to extend the choice of license to 36 | its licensees as provided above. However, if you add GPL Version 2 code 37 | and therefore, elected the GPL Version 2 license, then the option applies 38 | only if the new code is made subject to such option by the copyright 39 | holder. 40 | 41 | --> 42 | 43 | 44 | Welcome! 45 | 46 | 47 | 48 |

Welcome ${user}!

49 |

items:
50 | <#list items as item> 51 | ${item}
52 | 53 |

54 | 55 | 56 | -------------------------------------------------------------------------------- /freemarker-webapp/src/main/resources/freemarker/org/glassfish/jersey/examples/freemarker/resources/FreemarkerResource.ftl: -------------------------------------------------------------------------------- 1 | 42 | 43 | 44 | Welcome - automatically chosen template 45 | 46 | 47 | 48 |

Welcome ${user}!

49 | 50 | 51 | -------------------------------------------------------------------------------- /groovy/src/main/groovy/org/glassfish/jersey/examples/groovy/GroovyResource.groovy: -------------------------------------------------------------------------------- 1 | /* 2 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 3 | * 4 | * Copyright (c) 2013-2017 Oracle and/or its affiliates. All rights reserved. 5 | * 6 | * The contents of this file are subject to the terms of either the GNU 7 | * General Public License Version 2 only ("GPL") or the Common Development 8 | * and Distribution License("CDDL") (collectively, the "License"). You 9 | * may not use this file except in compliance with the License. You can 10 | * obtain a copy of the License at 11 | * https://oss.oracle.com/licenses/CDDL+GPL-1.1 12 | * or LICENSE.txt. See the License for the specific 13 | * language governing permissions and limitations under the License. 14 | * 15 | * When distributing the software, include this License Header Notice in each 16 | * file and include the License file at LICENSE.txt. 17 | * 18 | * GPL Classpath Exception: 19 | * Oracle designates this particular file as subject to the "Classpath" 20 | * exception as provided by Oracle in the GPL Version 2 section of the License 21 | * file that accompanied this code. 22 | * 23 | * Modifications: 24 | * If applicable, add the following below the License Header, with the fields 25 | * enclosed by brackets [] replaced by your own identifying information: 26 | * "Portions Copyright [year] [name of copyright owner]" 27 | * 28 | * Contributor(s): 29 | * If you wish your version of this file to be governed by only the CDDL or 30 | * only the GPL Version 2, indicate your decision by adding "[Contributor] 31 | * elects to include this software in this distribution under the [CDDL or GPL 32 | * Version 2] license." If you don't indicate a single choice of license, a 33 | * recipient has the option to distribute your version of this file under 34 | * either the CDDL, the GPL Version 2 or to extend the choice of license to 35 | * its licensees as provided above. However, if you add GPL Version 2 code 36 | * and therefore, elected the GPL Version 2 license, then the option applies 37 | * only if the new code is made subject to such option by the copyright 38 | * holder. 39 | */ 40 | 41 | package org.glassfish.jersey.examples.groovy 42 | 43 | import javax.ws.rs.GET; 44 | import javax.ws.rs.Path; 45 | import javax.ws.rs.Produces; 46 | 47 | /** 48 | * Example Groovy JAX-RS resource. 49 | */ 50 | @Path("groovy") 51 | class GroovyResource { 52 | @Produces(["text/plain"]) @GET def show() { 53 | "groovy" 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /helloworld-spring-annotations/src/main/java/org/glassfish/jersey/examples/hello/spring/annotations/EnglishGoodbyeService.java: -------------------------------------------------------------------------------- 1 | /* 2 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 3 | * 4 | * Copyright (c) 2014-2017 Oracle and/or its affiliates. All rights reserved. 5 | * 6 | * The contents of this file are subject to the terms of either the GNU 7 | * General Public License Version 2 only ("GPL") or the Common Development 8 | * and Distribution License("CDDL") (collectively, the "License"). You 9 | * may not use this file except in compliance with the License. You can 10 | * obtain a copy of the License at 11 | * https://oss.oracle.com/licenses/CDDL+GPL-1.1 12 | * or LICENSE.txt. See the License for the specific 13 | * language governing permissions and limitations under the License. 14 | * 15 | * When distributing the software, include this License Header Notice in each 16 | * file and include the License file at LICENSE.txt. 17 | * 18 | * GPL Classpath Exception: 19 | * Oracle designates this particular file as subject to the "Classpath" 20 | * exception as provided by Oracle in the GPL Version 2 section of the License 21 | * file that accompanied this code. 22 | * 23 | * Modifications: 24 | * If applicable, add the following below the License Header, with the fields 25 | * enclosed by brackets [] replaced by your own identifying information: 26 | * "Portions Copyright [year] [name of copyright owner]" 27 | * 28 | * Contributor(s): 29 | * If you wish your version of this file to be governed by only the CDDL or 30 | * only the GPL Version 2, indicate your decision by adding "[Contributor] 31 | * elects to include this software in this distribution under the [CDDL or GPL 32 | * Version 2] license." If you don't indicate a single choice of license, a 33 | * recipient has the option to distribute your version of this file under 34 | * either the CDDL, the GPL Version 2 or to extend the choice of license to 35 | * its licensees as provided above. However, if you add GPL Version 2 code 36 | * and therefore, elected the GPL Version 2 license, then the option applies 37 | * only if the new code is made subject to such option by the copyright 38 | * holder. 39 | */ 40 | 41 | package org.glassfish.jersey.examples.hello.spring.annotations; 42 | 43 | import org.springframework.stereotype.Component; 44 | 45 | @Component 46 | public class EnglishGoodbyeService implements GoodbyeService { 47 | 48 | @Override 49 | public String goodbye(final String who) { 50 | return String.format("goodbye, %s!", who); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /helloworld-spring-annotations/src/main/java/org/glassfish/jersey/examples/hello/spring/annotations/GoodbyeService.java: -------------------------------------------------------------------------------- 1 | /* 2 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 3 | * 4 | * Copyright (c) 2014-2017 Oracle and/or its affiliates. All rights reserved. 5 | * 6 | * The contents of this file are subject to the terms of either the GNU 7 | * General Public License Version 2 only ("GPL") or the Common Development 8 | * and Distribution License("CDDL") (collectively, the "License"). You 9 | * may not use this file except in compliance with the License. You can 10 | * obtain a copy of the License at 11 | * https://oss.oracle.com/licenses/CDDL+GPL-1.1 12 | * or LICENSE.txt. See the License for the specific 13 | * language governing permissions and limitations under the License. 14 | * 15 | * When distributing the software, include this License Header Notice in each 16 | * file and include the License file at LICENSE.txt. 17 | * 18 | * GPL Classpath Exception: 19 | * Oracle designates this particular file as subject to the "Classpath" 20 | * exception as provided by Oracle in the GPL Version 2 section of the License 21 | * file that accompanied this code. 22 | * 23 | * Modifications: 24 | * If applicable, add the following below the License Header, with the fields 25 | * enclosed by brackets [] replaced by your own identifying information: 26 | * "Portions Copyright [year] [name of copyright owner]" 27 | * 28 | * Contributor(s): 29 | * If you wish your version of this file to be governed by only the CDDL or 30 | * only the GPL Version 2, indicate your decision by adding "[Contributor] 31 | * elects to include this software in this distribution under the [CDDL or GPL 32 | * Version 2] license." If you don't indicate a single choice of license, a 33 | * recipient has the option to distribute your version of this file under 34 | * either the CDDL, the GPL Version 2 or to extend the choice of license to 35 | * its licensees as provided above. However, if you add GPL Version 2 code 36 | * and therefore, elected the GPL Version 2 license, then the option applies 37 | * only if the new code is made subject to such option by the copyright 38 | * holder. 39 | */ 40 | 41 | package org.glassfish.jersey.examples.hello.spring.annotations; 42 | 43 | public interface GoodbyeService { 44 | 45 | String goodbye(String who); 46 | } 47 | -------------------------------------------------------------------------------- /helloworld-spring-annotations/src/main/java/org/glassfish/jersey/examples/hello/spring/annotations/GreetingService.java: -------------------------------------------------------------------------------- 1 | /* 2 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 3 | * 4 | * Copyright (c) 2014-2017 Oracle and/or its affiliates. All rights reserved. 5 | * 6 | * The contents of this file are subject to the terms of either the GNU 7 | * General Public License Version 2 only ("GPL") or the Common Development 8 | * and Distribution License("CDDL") (collectively, the "License"). You 9 | * may not use this file except in compliance with the License. You can 10 | * obtain a copy of the License at 11 | * https://oss.oracle.com/licenses/CDDL+GPL-1.1 12 | * or LICENSE.txt. See the License for the specific 13 | * language governing permissions and limitations under the License. 14 | * 15 | * When distributing the software, include this License Header Notice in each 16 | * file and include the License file at LICENSE.txt. 17 | * 18 | * GPL Classpath Exception: 19 | * Oracle designates this particular file as subject to the "Classpath" 20 | * exception as provided by Oracle in the GPL Version 2 section of the License 21 | * file that accompanied this code. 22 | * 23 | * Modifications: 24 | * If applicable, add the following below the License Header, with the fields 25 | * enclosed by brackets [] replaced by your own identifying information: 26 | * "Portions Copyright [year] [name of copyright owner]" 27 | * 28 | * Contributor(s): 29 | * If you wish your version of this file to be governed by only the CDDL or 30 | * only the GPL Version 2, indicate your decision by adding "[Contributor] 31 | * elects to include this software in this distribution under the [CDDL or GPL 32 | * Version 2] license." If you don't indicate a single choice of license, a 33 | * recipient has the option to distribute your version of this file under 34 | * either the CDDL, the GPL Version 2 or to extend the choice of license to 35 | * its licensees as provided above. However, if you add GPL Version 2 code 36 | * and therefore, elected the GPL Version 2 license, then the option applies 37 | * only if the new code is made subject to such option by the copyright 38 | * holder. 39 | */ 40 | 41 | package org.glassfish.jersey.examples.hello.spring.annotations; 42 | 43 | import org.springframework.stereotype.Service; 44 | 45 | /** 46 | * Simple greeting service 47 | * 48 | * @author Geoffroy Warin (http://geowarin.github.io) 49 | */ 50 | @Service 51 | public class GreetingService { 52 | public String greet(String who) { 53 | return String.format("hello, %s!", who); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /helloworld-spring-annotations/src/main/java/org/glassfish/jersey/examples/hello/spring/annotations/NorwegianGoodbyeService.java: -------------------------------------------------------------------------------- 1 | /* 2 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 3 | * 4 | * Copyright (c) 2014-2017 Oracle and/or its affiliates. All rights reserved. 5 | * 6 | * The contents of this file are subject to the terms of either the GNU 7 | * General Public License Version 2 only ("GPL") or the Common Development 8 | * and Distribution License("CDDL") (collectively, the "License"). You 9 | * may not use this file except in compliance with the License. You can 10 | * obtain a copy of the License at 11 | * https://oss.oracle.com/licenses/CDDL+GPL-1.1 12 | * or LICENSE.txt. See the License for the specific 13 | * language governing permissions and limitations under the License. 14 | * 15 | * When distributing the software, include this License Header Notice in each 16 | * file and include the License file at LICENSE.txt. 17 | * 18 | * GPL Classpath Exception: 19 | * Oracle designates this particular file as subject to the "Classpath" 20 | * exception as provided by Oracle in the GPL Version 2 section of the License 21 | * file that accompanied this code. 22 | * 23 | * Modifications: 24 | * If applicable, add the following below the License Header, with the fields 25 | * enclosed by brackets [] replaced by your own identifying information: 26 | * "Portions Copyright [year] [name of copyright owner]" 27 | * 28 | * Contributor(s): 29 | * If you wish your version of this file to be governed by only the CDDL or 30 | * only the GPL Version 2, indicate your decision by adding "[Contributor] 31 | * elects to include this software in this distribution under the [CDDL or GPL 32 | * Version 2] license." If you don't indicate a single choice of license, a 33 | * recipient has the option to distribute your version of this file under 34 | * either the CDDL, the GPL Version 2 or to extend the choice of license to 35 | * its licensees as provided above. However, if you add GPL Version 2 code 36 | * and therefore, elected the GPL Version 2 license, then the option applies 37 | * only if the new code is made subject to such option by the copyright 38 | * holder. 39 | */ 40 | 41 | package org.glassfish.jersey.examples.hello.spring.annotations; 42 | 43 | import org.springframework.stereotype.Component; 44 | 45 | @Component 46 | public class NorwegianGoodbyeService implements GoodbyeService { 47 | 48 | @Override 49 | public String goodbye(final String who) { 50 | return String.format("hadet, %s!", who); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /helloworld-spring-webapp/src/main/java/org/glassfish/jersey/examples/helloworld/spring/GreetingService.java: -------------------------------------------------------------------------------- 1 | /* 2 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 3 | * 4 | * Copyright (c) 2013-2017 Oracle and/or its affiliates. All rights reserved. 5 | * 6 | * The contents of this file are subject to the terms of either the GNU 7 | * General Public License Version 2 only ("GPL") or the Common Development 8 | * and Distribution License("CDDL") (collectively, the "License"). You 9 | * may not use this file except in compliance with the License. You can 10 | * obtain a copy of the License at 11 | * https://oss.oracle.com/licenses/CDDL+GPL-1.1 12 | * or LICENSE.txt. See the License for the specific 13 | * language governing permissions and limitations under the License. 14 | * 15 | * When distributing the software, include this License Header Notice in each 16 | * file and include the License file at LICENSE.txt. 17 | * 18 | * GPL Classpath Exception: 19 | * Oracle designates this particular file as subject to the "Classpath" 20 | * exception as provided by Oracle in the GPL Version 2 section of the License 21 | * file that accompanied this code. 22 | * 23 | * Modifications: 24 | * If applicable, add the following below the License Header, with the fields 25 | * enclosed by brackets [] replaced by your own identifying information: 26 | * "Portions Copyright [year] [name of copyright owner]" 27 | * 28 | * Contributor(s): 29 | * If you wish your version of this file to be governed by only the CDDL or 30 | * only the GPL Version 2, indicate your decision by adding "[Contributor] 31 | * elects to include this software in this distribution under the [CDDL or GPL 32 | * Version 2] license." If you don't indicate a single choice of license, a 33 | * recipient has the option to distribute your version of this file under 34 | * either the CDDL, the GPL Version 2 or to extend the choice of license to 35 | * its licensees as provided above. However, if you add GPL Version 2 code 36 | * and therefore, elected the GPL Version 2 license, then the option applies 37 | * only if the new code is made subject to such option by the copyright 38 | * holder. 39 | */ 40 | 41 | package org.glassfish.jersey.examples.helloworld.spring; 42 | 43 | /** 44 | * Simple greeting service. 45 | * 46 | * @author Marko Asplund (marko.asplund at oracle.com) 47 | */ 48 | public interface GreetingService { 49 | 50 | /** 51 | * Workout a greeting. 52 | * 53 | * @param who to greet. 54 | * @return greeting. 55 | */ 56 | String greet(String who); 57 | } 58 | -------------------------------------------------------------------------------- /helloworld-webapp/src/main/java/org/glassfish/jersey/examples/helloworld/webapp/HelloWorldResource.java: -------------------------------------------------------------------------------- 1 | /* 2 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 3 | * 4 | * Copyright (c) 2012-2017 Oracle and/or its affiliates. All rights reserved. 5 | * 6 | * The contents of this file are subject to the terms of either the GNU 7 | * General Public License Version 2 only ("GPL") or the Common Development 8 | * and Distribution License("CDDL") (collectively, the "License"). You 9 | * may not use this file except in compliance with the License. You can 10 | * obtain a copy of the License at 11 | * https://oss.oracle.com/licenses/CDDL+GPL-1.1 12 | * or LICENSE.txt. See the License for the specific 13 | * language governing permissions and limitations under the License. 14 | * 15 | * When distributing the software, include this License Header Notice in each 16 | * file and include the License file at LICENSE.txt. 17 | * 18 | * GPL Classpath Exception: 19 | * Oracle designates this particular file as subject to the "Classpath" 20 | * exception as provided by Oracle in the GPL Version 2 section of the License 21 | * file that accompanied this code. 22 | * 23 | * Modifications: 24 | * If applicable, add the following below the License Header, with the fields 25 | * enclosed by brackets [] replaced by your own identifying information: 26 | * "Portions Copyright [year] [name of copyright owner]" 27 | * 28 | * Contributor(s): 29 | * If you wish your version of this file to be governed by only the CDDL or 30 | * only the GPL Version 2, indicate your decision by adding "[Contributor] 31 | * elects to include this software in this distribution under the [CDDL or GPL 32 | * Version 2] license." If you don't indicate a single choice of license, a 33 | * recipient has the option to distribute your version of this file under 34 | * either the CDDL, the GPL Version 2 or to extend the choice of license to 35 | * its licensees as provided above. However, if you add GPL Version 2 code 36 | * and therefore, elected the GPL Version 2 license, then the option applies 37 | * only if the new code is made subject to such option by the copyright 38 | * holder. 39 | */ 40 | 41 | package org.glassfish.jersey.examples.helloworld.webapp; 42 | 43 | import javax.ws.rs.GET; 44 | import javax.ws.rs.Path; 45 | import javax.ws.rs.Produces; 46 | 47 | /** 48 | * @author Pavel Bucek (pavel.bucek at oracle.com) 49 | */ 50 | @Path("helloworld") 51 | public class HelloWorldResource { 52 | 53 | @GET 54 | @Produces("text/plain") 55 | public String getHello() { 56 | return "Hello World!"; 57 | } 58 | 59 | } 60 | -------------------------------------------------------------------------------- /helloworld-weld/src/main/resources/META-INF/beans.xml: -------------------------------------------------------------------------------- 1 | 2 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /https-clientserver-grizzly/client.cert: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIDJTCCAuOgAwIBAgIET5ZyYjALBgcqhkjOOAQDBQAwdjELMAkGA1UEBhMCQ1oxFzAVBgNVBAgT 3 | DkN6ZWNoIFJlcHVibGljMQ8wDQYDVQQHEwZQcmFndWUxGzAZBgNVBAoTEk9yYWNsZSBDb3Jwb3Jh 4 | dGlvbjEPMA0GA1UECxMGSmVyc2V5MQ8wDQYDVQQDEwZDbGllbnQwHhcNMTIwNDI0MDkyOTA2WhcN 5 | MTIwNzIzMDkyOTA2WjB2MQswCQYDVQQGEwJDWjEXMBUGA1UECBMOQ3plY2ggUmVwdWJsaWMxDzAN 6 | BgNVBAcTBlByYWd1ZTEbMBkGA1UEChMST3JhY2xlIENvcnBvcmF0aW9uMQ8wDQYDVQQLEwZKZXJz 7 | ZXkxDzANBgNVBAMTBkNsaWVudDCCAbcwggEsBgcqhkjOOAQBMIIBHwKBgQD9f1OBHXUSKVLfSpwu 8 | 7OTn9hG3UjzvRADDHj+AtlEmaUVdQCJR+1k9jVj6v8X1ujD2y5tVbNeBO4AdNG/yZmC3a5lQpaSf 9 | n+gEexAiwk+7qdf+t8Yb+DtX58aophUPBPuD9tPFHsMCNVQTWhaRMvZ1864rYdcq7/IiAxmd0UgB 10 | xwIVAJdgUI8VIwvMspK5gqLrhAvwWBz1AoGBAPfhoIXWmz3ey7yrXDa4V7l5lK+7+jrqgvlXTAs9 11 | B4JnUVlXjrrUWU/mcQcQgYC0SRZxI+hMKBYTt88JMozIpuE8FnqLVHyNKOCjrh4rs6Z1kW6jfwv6 12 | ITVi8ftiegEkO8yk8b6oUZCJqIPf4VrlnwaSi2ZegHtVJWQBTDv+z0kqA4GEAAKBgBmHNACDk1aw 13 | vUZjsRecMSBlkkCSqr/cCrYOsNwpfleQKsM6rdOofujANUVeoUFhX8e8K45FknxEqAugmhGQ9NRn 14 | uMenrvV+XupC0V2uGH0OciXeAzHbfeItBCbmJcvMdPW/q+I2vFchv6+ajEiNHogBrCc3qwSMhyVQ 15 | ug2fXHmJMAsGByqGSM44BAMFAAMvADAsAhQYznYmH0hrcLni4EqX3Ovac+pNJgIUehnEaW1V5djn 16 | dhYBAYUkSycETl4= 17 | -----END CERTIFICATE----- 18 | -------------------------------------------------------------------------------- /https-clientserver-grizzly/keystore_client: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RameshMF/jersey-tutorial/ab3c070fba68a09fa4f4eceb49e9b8795f07c685/https-clientserver-grizzly/keystore_client -------------------------------------------------------------------------------- /https-clientserver-grizzly/keystore_server: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RameshMF/jersey-tutorial/ab3c070fba68a09fa4f4eceb49e9b8795f07c685/https-clientserver-grizzly/keystore_server -------------------------------------------------------------------------------- /https-clientserver-grizzly/server.cert: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIDKzCCAumgAwIBAgIET5ZyzjALBgcqhkjOOAQDBQAweTELMAkGA1UEBhMCQ1oxFzAVBgNVBAgT 3 | DkN6ZWNoIFJlcHVibGljMQ8wDQYDVQQHEwZQcmFndWUxGzAZBgNVBAoTEk9yYWNsZSBDb3Jwb3Jh 4 | dGlvbjEPMA0GA1UECxMGSmVyc2V5MRIwEAYDVQQDEwlsb2NhbGhvc3QwHhcNMTIwNDI0MDkzMDU0 5 | WhcNMTIwNzIzMDkzMDU0WjB5MQswCQYDVQQGEwJDWjEXMBUGA1UECBMOQ3plY2ggUmVwdWJsaWMx 6 | DzANBgNVBAcTBlByYWd1ZTEbMBkGA1UEChMST3JhY2xlIENvcnBvcmF0aW9uMQ8wDQYDVQQLEwZK 7 | ZXJzZXkxEjAQBgNVBAMTCWxvY2FsaG9zdDCCAbcwggEsBgcqhkjOOAQBMIIBHwKBgQD9f1OBHXUS 8 | KVLfSpwu7OTn9hG3UjzvRADDHj+AtlEmaUVdQCJR+1k9jVj6v8X1ujD2y5tVbNeBO4AdNG/yZmC3 9 | a5lQpaSfn+gEexAiwk+7qdf+t8Yb+DtX58aophUPBPuD9tPFHsMCNVQTWhaRMvZ1864rYdcq7/Ii 10 | Axmd0UgBxwIVAJdgUI8VIwvMspK5gqLrhAvwWBz1AoGBAPfhoIXWmz3ey7yrXDa4V7l5lK+7+jrq 11 | gvlXTAs9B4JnUVlXjrrUWU/mcQcQgYC0SRZxI+hMKBYTt88JMozIpuE8FnqLVHyNKOCjrh4rs6Z1 12 | kW6jfwv6ITVi8ftiegEkO8yk8b6oUZCJqIPf4VrlnwaSi2ZegHtVJWQBTDv+z0kqA4GEAAKBgGIs 13 | VTo7dODp6iOyHFL+mkOVlOloZcymyWlHUZXzKqrvAi5jISptZZM+AoJcUUlUWEO9uwVTvX0MCk+4 14 | viwlPwt+XhaPM0kqfFcx1IS07BAx7z9cXREfYQpoFSsFW7pUs6cdvu0rjj8Ip6BnHALxQDgaBk40 15 | zXM39kB9LdGBt4uDMAsGByqGSM44BAMFAAMvADAsAhQE4QoQP4xPibjnozo8x5ORJqBuCAIUTkLQ 16 | 2udZ2DeknwPYXp/zMkYXLN4= 17 | -----END CERTIFICATE----- 18 | -------------------------------------------------------------------------------- /https-clientserver-grizzly/truststore_client: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RameshMF/jersey-tutorial/ab3c070fba68a09fa4f4eceb49e9b8795f07c685/https-clientserver-grizzly/truststore_client -------------------------------------------------------------------------------- /https-clientserver-grizzly/truststore_server: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RameshMF/jersey-tutorial/ab3c070fba68a09fa4f4eceb49e9b8795f07c685/https-clientserver-grizzly/truststore_server -------------------------------------------------------------------------------- /jersey-crud-example/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /jersey-crud-example/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | jersey-crud-example 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.wst.common.project.facet.core.builder 15 | 16 | 17 | 18 | 19 | org.eclipse.m2e.core.maven2Builder 20 | 21 | 22 | 23 | 24 | org.eclipse.wst.validation.validationbuilder 25 | 26 | 27 | 28 | 29 | 30 | org.eclipse.jem.workbench.JavaEMFNature 31 | org.eclipse.wst.common.modulecore.ModuleCoreNature 32 | org.eclipse.jdt.core.javanature 33 | org.eclipse.m2e.core.maven2Nature 34 | org.eclipse.wst.common.project.facet.core.nature 35 | org.eclipse.wst.jsdt.core.jsNature 36 | 37 | 38 | -------------------------------------------------------------------------------- /jersey-crud-example/.settings/.jsdtscope: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /jersey-crud-example/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate 4 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 5 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 6 | org.eclipse.jdt.core.compiler.compliance=1.8 7 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate 8 | org.eclipse.jdt.core.compiler.debug.localVariable=generate 9 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate 10 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 11 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 12 | org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning 13 | org.eclipse.jdt.core.compiler.source=1.8 14 | -------------------------------------------------------------------------------- /jersey-crud-example/.settings/org.eclipse.m2e.core.prefs: -------------------------------------------------------------------------------- 1 | activeProfiles= 2 | eclipse.preferences.version=1 3 | resolveWorkspaceProjects=true 4 | version=1 5 | -------------------------------------------------------------------------------- /jersey-crud-example/.settings/org.eclipse.wst.common.component: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /jersey-crud-example/.settings/org.eclipse.wst.common.project.facet.core.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /jersey-crud-example/.settings/org.eclipse.wst.jsdt.ui.superType.container: -------------------------------------------------------------------------------- 1 | org.eclipse.wst.jsdt.launching.baseBrowserLibrary -------------------------------------------------------------------------------- /jersey-crud-example/.settings/org.eclipse.wst.jsdt.ui.superType.name: -------------------------------------------------------------------------------- 1 | Window -------------------------------------------------------------------------------- /jersey-crud-example/.settings/org.eclipse.wst.validation.prefs: -------------------------------------------------------------------------------- 1 | disabled=06target 2 | eclipse.preferences.version=1 3 | -------------------------------------------------------------------------------- /jersey-crud-example/src/main/java/com/javadevelopersguide/jersey/config/AppResourceConfig.java: -------------------------------------------------------------------------------- 1 | package com.javadevelopersguide.jersey.config; 2 | 3 | import java.util.logging.Level; 4 | import java.util.logging.Logger; 5 | 6 | import javax.ws.rs.ApplicationPath; 7 | 8 | import org.glassfish.jersey.logging.LoggingFeature; 9 | // Deployment of a JAX-RS application using @ApplicationPath with Servlet 3.0 10 | // Descriptor-less deployment 11 | import org.glassfish.jersey.server.ResourceConfig; 12 | 13 | @ApplicationPath("/api") 14 | public class AppResourceConfig extends ResourceConfig { 15 | 16 | public AppResourceConfig() { 17 | // if there are more than two packanges then separate them with semicolon 18 | // exmaple : packages("org.foo.rest;org.bar.rest"); 19 | packages("com.javadevelopersguide.jersey.resources"); 20 | register(new LoggingFeature(Logger.getLogger(LoggingFeature.DEFAULT_LOGGER_NAME), Level.INFO, LoggingFeature.Verbosity.PAYLOAD_ANY, 10000)); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /jersey-crud-example/src/main/java/com/javadevelopersguide/jersey/exception/ApiException.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2016 SmartBear Software 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.javadevelopersguide.jersey.exception; 18 | 19 | public class ApiException extends Exception{ 20 | private int code; 21 | public ApiException (int code, String msg) { 22 | super(msg); 23 | this.code = code; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /jersey-crud-example/src/main/java/com/javadevelopersguide/jersey/exception/BadRequestException.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2016 SmartBear Software 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.javadevelopersguide.jersey.exception; 18 | 19 | public class BadRequestException extends ApiException{ 20 | private int code; 21 | public BadRequestException (int code, String msg) { 22 | super(code, msg); 23 | this.code = code; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /jersey-crud-example/src/main/java/com/javadevelopersguide/jersey/exception/NotFoundException.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2016 SmartBear Software 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.javadevelopersguide.jersey.exception; 18 | 19 | public class NotFoundException extends ApiException { 20 | private int code; 21 | public NotFoundException (int code, String msg) { 22 | super(code, msg); 23 | this.code = code; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /jersey-crud-example/src/main/java/com/javadevelopersguide/jersey/exception/ResourceNotFoundException.java: -------------------------------------------------------------------------------- 1 | package com.javadevelopersguide.jersey.exception; 2 | 3 | public class ResourceNotFoundException extends Exception{ 4 | /** 5 | * 6 | */ 7 | private static final long serialVersionUID = 1L; 8 | 9 | public ResourceNotFoundException(String message){ 10 | super(message); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /jersey-crud-example/src/main/java/com/javadevelopersguide/jersey/model/APIResponse.java: -------------------------------------------------------------------------------- 1 | package com.javadevelopersguide.jersey.model; 2 | 3 | import javax.xml.bind.annotation.XmlRootElement; 4 | 5 | @XmlRootElement 6 | public class APIResponse { 7 | private int errorCode; 8 | private String message; 9 | 10 | public APIResponse(){ 11 | 12 | } 13 | 14 | public APIResponse(int errorCode, String message) { 15 | super(); 16 | this.errorCode = errorCode; 17 | this.message = message; 18 | } 19 | 20 | public int getErrorCode() { 21 | return errorCode; 22 | } 23 | 24 | public void setErrorCode(int errorCode) { 25 | this.errorCode = errorCode; 26 | } 27 | 28 | public String getMessage() { 29 | return message; 30 | } 31 | 32 | public void setMessage(String message) { 33 | this.message = message; 34 | } 35 | 36 | 37 | } 38 | -------------------------------------------------------------------------------- /jersey-crud-example/src/main/java/com/javadevelopersguide/jersey/model/User.java: -------------------------------------------------------------------------------- 1 | package com.javadevelopersguide.jersey.model; 2 | 3 | import javax.xml.bind.annotation.XmlRootElement; 4 | 5 | @XmlRootElement 6 | public class User { 7 | private long id; 8 | private String name; 9 | private String email; 10 | 11 | public User() { 12 | 13 | } 14 | 15 | 16 | public User(long id, String name, String email) { 17 | super(); 18 | this.id = id; 19 | this.name = name; 20 | this.email = email; 21 | } 22 | public long getId() { 23 | return id; 24 | } 25 | public void setId(long id) { 26 | this.id = id; 27 | } 28 | public String getName() { 29 | return name; 30 | } 31 | public void setName(String name) { 32 | this.name = name; 33 | } 34 | public String getEmail() { 35 | return email; 36 | } 37 | public void setEmail(String email) { 38 | this.email = email; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /jersey-crud-example/src/main/java/com/javadevelopersguide/jersey/resources/CustomExceptionMapper.java: -------------------------------------------------------------------------------- 1 | package com.javadevelopersguide.jersey.resources; 2 | 3 | import java.util.HashMap; 4 | 5 | import javax.ws.rs.NotFoundException; 6 | import javax.ws.rs.core.Response; 7 | import javax.ws.rs.core.Response.Status; 8 | import javax.ws.rs.ext.ExceptionMapper; 9 | import javax.ws.rs.ext.Provider; 10 | 11 | import com.javadevelopersguide.jersey.exception.BadRequestException; 12 | import com.javadevelopersguide.jersey.exception.ResourceNotFoundException; 13 | import com.javadevelopersguide.jersey.model.APIResponse; 14 | 15 | @Provider 16 | public class CustomExceptionMapper { 17 | 18 | // -- Exception Mappers 19 | @Provider 20 | public static class ResourceNotFoundExceptionMapper implements ExceptionMapper { 21 | 22 | @Override 23 | public Response toResponse(ResourceNotFoundException exception) { 24 | return Response 25 | .status(Status.NOT_FOUND) 26 | .entity(new HashMap<>().put(Status.INTERNAL_SERVER_ERROR, exception.getMessage())).build(); 27 | } 28 | } 29 | 30 | @Provider 31 | public static class BadRequestExceptionMapper implements ExceptionMapper { 32 | 33 | @Override 34 | public Response toResponse(BadRequestException exception) { 35 | return Response.status(Response.Status.BAD_REQUEST).entity( 36 | "Code:" + Response.Status.BAD_REQUEST + ":" + exception.getMessage()).build(); 37 | } 38 | } 39 | 40 | @Provider 41 | public static class NotFoundExceptionMapper implements ExceptionMapper { 42 | 43 | @Override 44 | public Response toResponse(NotFoundException exception) { 45 | Response r = exception.getResponse(); 46 | return Response.status(r.getStatus()).entity( 47 | new APIResponse(r.getStatus(),exception.getMessage())).build(); 48 | } 49 | } 50 | 51 | } 52 | 53 | 54 | -------------------------------------------------------------------------------- /jersey-crud-example/src/main/java/com/javadevelopersguide/jersey/services/UserService.java: -------------------------------------------------------------------------------- 1 | package com.javadevelopersguide.jersey.services; 2 | 3 | import java.util.ArrayList; 4 | import java.util.List; 5 | 6 | import javax.ws.rs.NotFoundException; 7 | 8 | import com.javadevelopersguide.jersey.model.User; 9 | 10 | public class UserService { 11 | 12 | private List users = new ArrayList(); 13 | 14 | public List fetchAll() { 15 | 16 | users.add(new User(100, "A", "demo@gmail.com")); 17 | users.add(new User(101, "B", "demo1@gmail.com")); 18 | users.add(new User(102, "C", "demo2@gmail.com")); 19 | return users; 20 | } 21 | 22 | public User fetchBy(long id) throws NotFoundException { 23 | for (User user2 : fetchAll()) { 24 | if (id == user2.getId()) { 25 | return user2; 26 | }else{ 27 | throw new NotFoundException("Resource not found with Id :: " + id); 28 | } 29 | } 30 | return null; 31 | } 32 | 33 | public void create(User user) { 34 | users.add(user); 35 | } 36 | 37 | public void update(User user) { 38 | for (User user2 : users) { 39 | if (user.getId() == user2.getId()) { 40 | users.remove(user2); 41 | users.add(user); 42 | } 43 | } 44 | } 45 | 46 | public void delete(long id) throws NotFoundException { 47 | // delete operation 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /jersey-crud-example/src/main/webapp/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | Archetype Created Web Application 7 | 8 | -------------------------------------------------------------------------------- /jersey-crud-example/src/main/webapp/index.jsp: -------------------------------------------------------------------------------- 1 | 2 | 3 |

Hello World!

4 | 5 | 6 | -------------------------------------------------------------------------------- /jersey-ejb/src/main/java/org/glassfish/jersey/examples/jersey_ejb/exceptions/CustomNotFoundException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 3 | * 4 | * Copyright (c) 2010-2017 Oracle and/or its affiliates. All rights reserved. 5 | * 6 | * The contents of this file are subject to the terms of either the GNU 7 | * General Public License Version 2 only ("GPL") or the Common Development 8 | * and Distribution License("CDDL") (collectively, the "License"). You 9 | * may not use this file except in compliance with the License. You can 10 | * obtain a copy of the License at 11 | * https://oss.oracle.com/licenses/CDDL+GPL-1.1 12 | * or LICENSE.txt. See the License for the specific 13 | * language governing permissions and limitations under the License. 14 | * 15 | * When distributing the software, include this License Header Notice in each 16 | * file and include the License file at LICENSE.txt. 17 | * 18 | * GPL Classpath Exception: 19 | * Oracle designates this particular file as subject to the "Classpath" 20 | * exception as provided by Oracle in the GPL Version 2 section of the License 21 | * file that accompanied this code. 22 | * 23 | * Modifications: 24 | * If applicable, add the following below the License Header, with the fields 25 | * enclosed by brackets [] replaced by your own identifying information: 26 | * "Portions Copyright [year] [name of copyright owner]" 27 | * 28 | * Contributor(s): 29 | * If you wish your version of this file to be governed by only the CDDL or 30 | * only the GPL Version 2, indicate your decision by adding "[Contributor] 31 | * elects to include this software in this distribution under the [CDDL or GPL 32 | * Version 2] license." If you don't indicate a single choice of license, a 33 | * recipient has the option to distribute your version of this file under 34 | * either the CDDL, the GPL Version 2 or to extend the choice of license to 35 | * its licensees as provided above. However, if you add GPL Version 2 code 36 | * and therefore, elected the GPL Version 2 license, then the option applies 37 | * only if the new code is made subject to such option by the copyright 38 | * holder. 39 | */ 40 | 41 | package org.glassfish.jersey.examples.jersey_ejb.exceptions; 42 | 43 | /** 44 | * This exceptions will get mapped to a 404 response with the application exception mapper 45 | * implemented by {@link NotFoundExceptionMapper} class. 46 | * 47 | * @author Pavel Bucek (pavel.bucek at oracle.com) 48 | */ 49 | public class CustomNotFoundException extends Exception { 50 | 51 | } 52 | -------------------------------------------------------------------------------- /jersey-exception-mapping-example/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /jersey-exception-mapping-example/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | jersey-exception-mapping-example 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.wst.common.project.facet.core.builder 15 | 16 | 17 | 18 | 19 | org.eclipse.m2e.core.maven2Builder 20 | 21 | 22 | 23 | 24 | org.eclipse.wst.validation.validationbuilder 25 | 26 | 27 | 28 | 29 | 30 | org.eclipse.jem.workbench.JavaEMFNature 31 | org.eclipse.wst.common.modulecore.ModuleCoreNature 32 | org.eclipse.jdt.core.javanature 33 | org.eclipse.m2e.core.maven2Nature 34 | org.eclipse.wst.common.project.facet.core.nature 35 | org.eclipse.wst.jsdt.core.jsNature 36 | 37 | 38 | -------------------------------------------------------------------------------- /jersey-exception-mapping-example/.settings/.jsdtscope: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /jersey-exception-mapping-example/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate 4 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 5 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 6 | org.eclipse.jdt.core.compiler.compliance=1.8 7 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate 8 | org.eclipse.jdt.core.compiler.debug.localVariable=generate 9 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate 10 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 11 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 12 | org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning 13 | org.eclipse.jdt.core.compiler.source=1.8 14 | -------------------------------------------------------------------------------- /jersey-exception-mapping-example/.settings/org.eclipse.m2e.core.prefs: -------------------------------------------------------------------------------- 1 | activeProfiles= 2 | eclipse.preferences.version=1 3 | resolveWorkspaceProjects=true 4 | version=1 5 | -------------------------------------------------------------------------------- /jersey-exception-mapping-example/.settings/org.eclipse.wst.common.component: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /jersey-exception-mapping-example/.settings/org.eclipse.wst.common.project.facet.core.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /jersey-exception-mapping-example/.settings/org.eclipse.wst.jsdt.ui.superType.container: -------------------------------------------------------------------------------- 1 | org.eclipse.wst.jsdt.launching.baseBrowserLibrary -------------------------------------------------------------------------------- /jersey-exception-mapping-example/.settings/org.eclipse.wst.jsdt.ui.superType.name: -------------------------------------------------------------------------------- 1 | Window -------------------------------------------------------------------------------- /jersey-exception-mapping-example/.settings/org.eclipse.wst.validation.prefs: -------------------------------------------------------------------------------- 1 | disabled=06target 2 | eclipse.preferences.version=1 3 | -------------------------------------------------------------------------------- /jersey-exception-mapping-example/pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | com.javadevelopersguide.jersey 5 | jersey-exception-mapping-example 6 | war 7 | 0.0.1-SNAPSHOT 8 | jersey-exception-mapping-example Maven Webapp 9 | http://maven.apache.org 10 | 11 | 12 | 13 | 14 | 15 | javax.servlet 16 | javax.servlet-api 17 | 3.1.0 18 | provided 19 | 20 | 21 | 22 | org.glassfish.jersey.core 23 | jersey-server 24 | 2.7 25 | 26 | 27 | org.glassfish.jersey.containers 28 | jersey-container-servlet 29 | 2.7 30 | 31 | 32 | 33 | jersey-exception-mapping-example 34 | 35 | 36 | org.apache.maven.plugins 37 | maven-war-plugin 38 | 39 | false 40 | 41 | 42 | 43 | maven-compiler-plugin 44 | 2.0.2 45 | 46 | 1.8 47 | 1.8 48 | 49 | 50 | 51 | org.apache.tomcat.maven 52 | tomcat7-maven-plugin 53 | 2.2 54 | 55 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /jersey-exception-mapping-example/src/main/java/com/javadevelopersguide/jersey/config/JerseyServletContainerConfig.java: -------------------------------------------------------------------------------- 1 | package com.javadevelopersguide.jersey.config; 2 | 3 | import javax.ws.rs.ApplicationPath; 4 | 5 | // Deployment of a JAX-RS application using @ApplicationPath with Servlet 3.0 6 | // Descriptor-less deployment 7 | import org.glassfish.jersey.server.ResourceConfig; 8 | 9 | @ApplicationPath("resources") 10 | public class JerseyServletContainerConfig extends ResourceConfig { 11 | public JerseyServletContainerConfig() { 12 | 13 | // if there are more than two packanges then separate them with semicolon 14 | // exmaple : packages("org.foo.rest;org.bar.rest"); 15 | packages("com.javadevelopersguide.jersey.helloworld;com.javadevelopersguide.jersey.resources"); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /jersey-exception-mapping-example/src/main/java/com/javadevelopersguide/jersey/helloworld/HelloWorldResource.java: -------------------------------------------------------------------------------- 1 | package com.javadevelopersguide.jersey.helloworld; 2 | 3 | import javax.ws.rs.GET; 4 | import javax.ws.rs.Path; 5 | 6 | @Path("/") 7 | public class HelloWorldResource { 8 | 9 | @GET 10 | @Path("helloworld") 11 | public String helloworld(){ 12 | return "Helloworld !!!!"; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /jersey-exception-mapping-example/src/main/java/com/javadevelopersguide/jersey/resources/ApiResponse.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2016 SmartBear Software 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.javadevelopersguide.jersey.resources; 18 | 19 | import javax.xml.bind.annotation.XmlTransient; 20 | 21 | @javax.xml.bind.annotation.XmlRootElement 22 | public class ApiResponse { 23 | public static final int ERROR = 1; 24 | public static final int WARNING = 2; 25 | public static final int INFO = 3; 26 | public static final int OK = 4; 27 | public static final int TOO_BUSY = 5; 28 | 29 | int code; 30 | String type; 31 | String message; 32 | 33 | public ApiResponse(){} 34 | 35 | public ApiResponse(int code, String message){ 36 | this.code = code; 37 | switch(code){ 38 | case ERROR: 39 | setType("error"); 40 | break; 41 | case WARNING: 42 | setType("warning"); 43 | break; 44 | case INFO: 45 | setType("info"); 46 | break; 47 | case OK: 48 | setType("ok"); 49 | break; 50 | case TOO_BUSY: 51 | setType("too busy"); 52 | break; 53 | default: 54 | setType("unknown"); 55 | break; 56 | } 57 | this.message = message; 58 | } 59 | 60 | @XmlTransient 61 | public int getCode() { 62 | return code; 63 | } 64 | 65 | public void setCode(int code) { 66 | this.code = code; 67 | } 68 | 69 | public String getType() { 70 | return type; 71 | } 72 | 73 | public void setType(String type) { 74 | this.type = type; 75 | } 76 | 77 | public String getMessage() { 78 | return message; 79 | } 80 | 81 | public void setMessage(String message) { 82 | this.message = message; 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /jersey-exception-mapping-example/src/main/java/com/javadevelopersguide/jersey/resources/CustomExceptionMapper.java: -------------------------------------------------------------------------------- 1 | package com.javadevelopersguide.jersey.resources; 2 | 3 | import javax.ws.rs.core.Response; 4 | import javax.ws.rs.core.Response.Status; 5 | import javax.ws.rs.ext.ExceptionMapper; 6 | import javax.ws.rs.ext.Provider; 7 | 8 | @Provider 9 | public class CustomExceptionMapper implements ExceptionMapper { 10 | 11 | @Override 12 | public Response toResponse(ResourceNotFoundException exception) { 13 | return Response 14 | .status(Status.NOT_FOUND) 15 | .entity(new ApiResponse(ApiResponse.ERROR, exception 16 | .getMessage())).build(); 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /jersey-exception-mapping-example/src/main/java/com/javadevelopersguide/jersey/resources/CustomExceptionResource.java: -------------------------------------------------------------------------------- 1 | package com.javadevelopersguide.jersey.resources; 2 | 3 | import javax.ws.rs.GET; 4 | import javax.ws.rs.Path; 5 | import javax.ws.rs.Produces; 6 | import javax.ws.rs.core.MediaType; 7 | 8 | import com.javadevelopersguide.jersey.resources.exception.BadRequestException; 9 | 10 | @Path("customexception/") 11 | public class CustomExceptionResource { 12 | 13 | @GET 14 | @Path("notfound") 15 | @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) 16 | public String notfound() throws ResourceNotFoundException { 17 | throw new ResourceNotFoundException("Resource not found exception."); 18 | } 19 | 20 | @GET 21 | @Path("badrequest") 22 | @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) 23 | public String badrequest() throws BadRequestException { 24 | throw new BadRequestException(400, "Bad Request Exception."); 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /jersey-exception-mapping-example/src/main/java/com/javadevelopersguide/jersey/resources/ResourceNotFoundException.java: -------------------------------------------------------------------------------- 1 | package com.javadevelopersguide.jersey.resources; 2 | 3 | public class ResourceNotFoundException extends Exception{ 4 | /** 5 | * 6 | */ 7 | private static final long serialVersionUID = 1L; 8 | 9 | public ResourceNotFoundException(String message){ 10 | super(message); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /jersey-exception-mapping-example/src/main/java/com/javadevelopersguide/jersey/resources/exception/ApiException.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2016 SmartBear Software 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.javadevelopersguide.jersey.resources.exception; 18 | 19 | public class ApiException extends Exception{ 20 | private int code; 21 | public ApiException (int code, String msg) { 22 | super(msg); 23 | this.code = code; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /jersey-exception-mapping-example/src/main/java/com/javadevelopersguide/jersey/resources/exception/BadRequestException.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2016 SmartBear Software 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.javadevelopersguide.jersey.resources.exception; 18 | 19 | public class BadRequestException extends ApiException{ 20 | private int code; 21 | public BadRequestException (int code, String msg) { 22 | super(code, msg); 23 | this.code = code; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /jersey-exception-mapping-example/src/main/java/com/javadevelopersguide/jersey/resources/exception/NotFoundException.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2016 SmartBear Software 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.javadevelopersguide.jersey.resources.exception; 18 | 19 | public class NotFoundException extends ApiException { 20 | private int code; 21 | public NotFoundException (int code, String msg) { 22 | super(code, msg); 23 | this.code = code; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /jersey-exception-mapping-example/src/main/webapp/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | Archetype Created Web Application 7 | 8 | -------------------------------------------------------------------------------- /jersey-exception-mapping-example/src/main/webapp/index.jsp: -------------------------------------------------------------------------------- 1 | 2 | 3 |

Hello World!

4 | 5 | 6 | -------------------------------------------------------------------------------- /jersey-helloworld-example/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /jersey-helloworld-example/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | jersey-helloworld-example 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.wst.common.project.facet.core.builder 15 | 16 | 17 | 18 | 19 | org.eclipse.m2e.core.maven2Builder 20 | 21 | 22 | 23 | 24 | org.eclipse.wst.validation.validationbuilder 25 | 26 | 27 | 28 | 29 | 30 | org.eclipse.jem.workbench.JavaEMFNature 31 | org.eclipse.wst.common.modulecore.ModuleCoreNature 32 | org.eclipse.jdt.core.javanature 33 | org.eclipse.m2e.core.maven2Nature 34 | org.eclipse.wst.common.project.facet.core.nature 35 | org.eclipse.wst.jsdt.core.jsNature 36 | 37 | 38 | -------------------------------------------------------------------------------- /jersey-helloworld-example/.settings/.jsdtscope: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /jersey-helloworld-example/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 4 | org.eclipse.jdt.core.compiler.compliance=1.5 5 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 6 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 7 | org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning 8 | org.eclipse.jdt.core.compiler.source=1.5 9 | -------------------------------------------------------------------------------- /jersey-helloworld-example/.settings/org.eclipse.m2e.core.prefs: -------------------------------------------------------------------------------- 1 | activeProfiles= 2 | eclipse.preferences.version=1 3 | resolveWorkspaceProjects=true 4 | version=1 5 | -------------------------------------------------------------------------------- /jersey-helloworld-example/.settings/org.eclipse.wst.common.component: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /jersey-helloworld-example/.settings/org.eclipse.wst.common.project.facet.core.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /jersey-helloworld-example/.settings/org.eclipse.wst.jsdt.ui.superType.container: -------------------------------------------------------------------------------- 1 | org.eclipse.wst.jsdt.launching.baseBrowserLibrary -------------------------------------------------------------------------------- /jersey-helloworld-example/.settings/org.eclipse.wst.jsdt.ui.superType.name: -------------------------------------------------------------------------------- 1 | Window -------------------------------------------------------------------------------- /jersey-helloworld-example/.settings/org.eclipse.wst.validation.prefs: -------------------------------------------------------------------------------- 1 | disabled=06target 2 | eclipse.preferences.version=1 3 | -------------------------------------------------------------------------------- /jersey-helloworld-example/pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | com.javadevelopersguide.jersey 5 | jersey-helloworld-example 6 | war 7 | 0.0.1-SNAPSHOT 8 | jersey-helloworld-example Maven Webapp 9 | http://maven.apache.org 10 | 11 | 12 | 13 | 14 | javax.servlet 15 | javax.servlet-api 16 | 3.1.0 17 | provided 18 | 19 | 20 | 21 | org.glassfish.jersey.core 22 | jersey-server 23 | 2.7 24 | 25 | 26 | org.glassfish.jersey.containers 27 | jersey-container-servlet 28 | 2.7 29 | 30 | 31 | 32 | jersey-helloworld-example 33 | 34 | 35 | org.apache.maven.plugins 36 | maven-war-plugin 37 | 38 | false 39 | 40 | 41 | 42 | maven-compiler-plugin 43 | 2.0.2 44 | 45 | 1.8 46 | 1.8 47 | 48 | 49 | 50 | org.apache.tomcat.maven 51 | tomcat7-maven-plugin 52 | 2.2 53 | 54 | 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /jersey-helloworld-example/src/main/java/com/javadevelopersguide/jersey/config/AppResourceConfig.java: -------------------------------------------------------------------------------- 1 | package com.javadevelopersguide.jersey.config; 2 | 3 | import javax.ws.rs.ApplicationPath; 4 | 5 | import org.glassfish.jersey.server.ResourceConfig; 6 | 7 | @ApplicationPath("resources") 8 | public class AppResourceConfig extends ResourceConfig { 9 | public AppResourceConfig() { 10 | // if there are more than two packanges then separate them with semicolon 11 | // exmaple : packages("org.foo.rest;org.bar.rest"); 12 | packages("com.javadevelopersguide.jersey.helloworld"); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /jersey-helloworld-example/src/main/java/com/javadevelopersguide/jersey/helloworld/HelloWorldResource.java: -------------------------------------------------------------------------------- 1 | package com.javadevelopersguide.jersey.helloworld; 2 | 3 | import javax.ws.rs.GET; 4 | 5 | import javax.ws.rs.Path; 6 | 7 | @Path("/") 8 | public class HelloWorldResource { 9 | 10 | @GET 11 | @Path("helloworld") 12 | public String helloworld(){ 13 | return "Helloworld !!!!"; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /jersey-helloworld-example/src/main/webapp/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | Archetype Created Web Application 7 | 8 | -------------------------------------------------------------------------------- /jersey-helloworld-example/src/main/webapp/index.jsp: -------------------------------------------------------------------------------- 1 | 2 | 3 |

Hello World!

4 | 5 | 6 | -------------------------------------------------------------------------------- /jersey-java8-example/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /jersey-java8-example/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | jersey-java8-example 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.wst.common.project.facet.core.builder 15 | 16 | 17 | 18 | 19 | org.eclipse.m2e.core.maven2Builder 20 | 21 | 22 | 23 | 24 | org.eclipse.wst.validation.validationbuilder 25 | 26 | 27 | 28 | 29 | 30 | org.eclipse.jem.workbench.JavaEMFNature 31 | org.eclipse.wst.common.modulecore.ModuleCoreNature 32 | org.eclipse.jdt.core.javanature 33 | org.eclipse.m2e.core.maven2Nature 34 | org.eclipse.wst.common.project.facet.core.nature 35 | org.eclipse.wst.jsdt.core.jsNature 36 | 37 | 38 | -------------------------------------------------------------------------------- /jersey-java8-example/.settings/.jsdtscope: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /jersey-java8-example/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate 4 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 5 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 6 | org.eclipse.jdt.core.compiler.compliance=1.8 7 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate 8 | org.eclipse.jdt.core.compiler.debug.localVariable=generate 9 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate 10 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 11 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 12 | org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning 13 | org.eclipse.jdt.core.compiler.source=1.8 14 | -------------------------------------------------------------------------------- /jersey-java8-example/.settings/org.eclipse.m2e.core.prefs: -------------------------------------------------------------------------------- 1 | activeProfiles= 2 | eclipse.preferences.version=1 3 | resolveWorkspaceProjects=true 4 | version=1 5 | -------------------------------------------------------------------------------- /jersey-java8-example/.settings/org.eclipse.wst.common.component: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /jersey-java8-example/.settings/org.eclipse.wst.common.project.facet.core.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /jersey-java8-example/.settings/org.eclipse.wst.jsdt.ui.superType.container: -------------------------------------------------------------------------------- 1 | org.eclipse.wst.jsdt.launching.baseBrowserLibrary -------------------------------------------------------------------------------- /jersey-java8-example/.settings/org.eclipse.wst.jsdt.ui.superType.name: -------------------------------------------------------------------------------- 1 | Window -------------------------------------------------------------------------------- /jersey-java8-example/.settings/org.eclipse.wst.validation.prefs: -------------------------------------------------------------------------------- 1 | disabled=06target 2 | eclipse.preferences.version=1 3 | -------------------------------------------------------------------------------- /jersey-java8-example/pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | com.javadevelopersguide.jersey 5 | jersey-helloworld-example 6 | war 7 | 0.0.1-SNAPSHOT 8 | jersey-helloworld-example Maven Webapp 9 | http://maven.apache.org 10 | 11 | 12 | 13 | 14 | 15 | javax.servlet 16 | javax.servlet-api 17 | 3.1.0 18 | provided 19 | 20 | 21 | 22 | org.glassfish.jersey.core 23 | jersey-server 24 | 2.7 25 | 26 | 27 | org.glassfish.jersey.containers 28 | jersey-container-servlet 29 | 2.7 30 | 31 | 32 | 33 | jersey-helloworld-example 34 | 35 | 36 | org.apache.maven.plugins 37 | maven-war-plugin 38 | 39 | false 40 | 41 | 42 | 43 | maven-compiler-plugin 44 | 2.0.2 45 | 46 | 1.8 47 | 1.8 48 | 49 | 50 | 51 | org.apache.tomcat.maven 52 | tomcat7-maven-plugin 53 | 2.2 54 | 55 | 56 | 57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /jersey-java8-example/readme: -------------------------------------------------------------------------------- 1 | Lambda expression 2 | http://localhost:8080/jersey-java8-example/java8/lambdas/12 3 | 4 | http://localhost:8080/jersey-java8-example/java8/default-method -------------------------------------------------------------------------------- /jersey-java8-example/src/main/java/com/javadevelopersguide/jersey/config/Java8Application.java: -------------------------------------------------------------------------------- 1 | package com.javadevelopersguide.jersey.config; 2 | 3 | import javax.ws.rs.ApplicationPath; 4 | 5 | // Deployment of a JAX-RS application using @ApplicationPath with Servlet 3.0 6 | // Descriptor-less deployment 7 | import org.glassfish.jersey.server.ResourceConfig; 8 | 9 | @ApplicationPath("java8") 10 | public class Java8Application extends ResourceConfig { 11 | public Java8Application() { 12 | 13 | // if there are more than two packanges then separate them with semicolon 14 | // exmaple : packages("org.foo.rest;org.bar.rest"); 15 | packages("com.javadevelopersguide.jersey.java8"); 16 | 17 | // Resources. 18 | //register(DefaultMethodResource.class); 19 | //register(LambdaResource.class); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /jersey-java8-example/src/main/java/com/javadevelopersguide/jersey/java8/DefaultMethodResource.java: -------------------------------------------------------------------------------- 1 | package com.javadevelopersguide.jersey.java8; 2 | 3 | import javax.ws.rs.GET; 4 | import javax.ws.rs.Path; 5 | import javax.ws.rs.Produces; 6 | 7 | /** 8 | * JAX-RS resource inheriting some resource method implementations from the implemented interface. 9 | * 10 | */ 11 | @Path("default-method") 12 | @Produces("text/plain") 13 | public class DefaultMethodResource implements DefaultMethodInterface { 14 | 15 | @GET 16 | @Path("class") 17 | public String fromClass() { 18 | return "class"; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /jersey-java8-example/src/main/webapp/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | Archetype Created Web Application 7 | 8 | -------------------------------------------------------------------------------- /jersey-java8-example/src/main/webapp/index.jsp: -------------------------------------------------------------------------------- 1 | 2 | 3 |

Hello World!

4 | 5 | 6 | -------------------------------------------------------------------------------- /jersey-jpa-bookmark-example/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /jersey-jpa-bookmark-example/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | jersey-jpa-bookmark-example 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.wst.common.project.facet.core.builder 15 | 16 | 17 | 18 | 19 | org.eclipse.m2e.core.maven2Builder 20 | 21 | 22 | 23 | 24 | org.eclipse.wst.validation.validationbuilder 25 | 26 | 27 | 28 | 29 | 30 | org.eclipse.jem.workbench.JavaEMFNature 31 | org.eclipse.wst.common.modulecore.ModuleCoreNature 32 | org.eclipse.jdt.core.javanature 33 | org.eclipse.m2e.core.maven2Nature 34 | org.eclipse.wst.common.project.facet.core.nature 35 | org.eclipse.wst.jsdt.core.jsNature 36 | 37 | 38 | -------------------------------------------------------------------------------- /jersey-jpa-bookmark-example/.settings/.jsdtscope: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /jersey-jpa-bookmark-example/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 4 | org.eclipse.jdt.core.compiler.compliance=1.5 5 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 6 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 7 | org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning 8 | org.eclipse.jdt.core.compiler.source=1.5 9 | -------------------------------------------------------------------------------- /jersey-jpa-bookmark-example/.settings/org.eclipse.m2e.core.prefs: -------------------------------------------------------------------------------- 1 | activeProfiles= 2 | eclipse.preferences.version=1 3 | resolveWorkspaceProjects=true 4 | version=1 5 | -------------------------------------------------------------------------------- /jersey-jpa-bookmark-example/.settings/org.eclipse.wst.common.component: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /jersey-jpa-bookmark-example/.settings/org.eclipse.wst.common.project.facet.core.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /jersey-jpa-bookmark-example/.settings/org.eclipse.wst.jsdt.ui.superType.container: -------------------------------------------------------------------------------- 1 | org.eclipse.wst.jsdt.launching.baseBrowserLibrary -------------------------------------------------------------------------------- /jersey-jpa-bookmark-example/.settings/org.eclipse.wst.jsdt.ui.superType.name: -------------------------------------------------------------------------------- 1 | Window -------------------------------------------------------------------------------- /jersey-jpa-bookmark-example/.settings/org.eclipse.wst.validation.prefs: -------------------------------------------------------------------------------- 1 | disabled=06target 2 | eclipse.preferences.version=1 3 | -------------------------------------------------------------------------------- /jersey-jpa-bookmark-example/src/main/java/com/javadevelopersguide/jersey/exception/ExtendedNotFoundException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 3 | * 4 | * Copyright (c) 2012-2017 Oracle and/or its affiliates. All rights reserved. 5 | * 6 | * The contents of this file are subject to the terms of either the GNU 7 | * General Public License Version 2 only ("GPL") or the Common Development 8 | * and Distribution License("CDDL") (collectively, the "License"). You 9 | * may not use this file except in compliance with the License. You can 10 | * obtain a copy of the License at 11 | * https://oss.oracle.com/licenses/CDDL+GPL-1.1 12 | * or LICENSE.txt. See the License for the specific 13 | * language governing permissions and limitations under the License. 14 | * 15 | * When distributing the software, include this License Header Notice in each 16 | * file and include the License file at LICENSE.txt. 17 | * 18 | * GPL Classpath Exception: 19 | * Oracle designates this particular file as subject to the "Classpath" 20 | * exception as provided by Oracle in the GPL Version 2 section of the License 21 | * file that accompanied this code. 22 | * 23 | * Modifications: 24 | * If applicable, add the following below the License Header, with the fields 25 | * enclosed by brackets [] replaced by your own identifying information: 26 | * "Portions Copyright [year] [name of copyright owner]" 27 | * 28 | * Contributor(s): 29 | * If you wish your version of this file to be governed by only the CDDL or 30 | * only the GPL Version 2, indicate your decision by adding "[Contributor] 31 | * elects to include this software in this distribution under the [CDDL or GPL 32 | * Version 2] license." If you don't indicate a single choice of license, a 33 | * recipient has the option to distribute your version of this file under 34 | * either the CDDL, the GPL Version 2 or to extend the choice of license to 35 | * its licensees as provided above. However, if you add GPL Version 2 code 36 | * and therefore, elected the GPL Version 2 license, then the option applies 37 | * only if the new code is made subject to such option by the copyright 38 | * holder. 39 | */ 40 | 41 | package com.javadevelopersguide.jersey.exception; 42 | 43 | import javax.ws.rs.NotFoundException; 44 | import javax.ws.rs.core.Response; 45 | 46 | /** 47 | * @author Michal Gajdos 48 | */ 49 | public class ExtendedNotFoundException extends NotFoundException { 50 | 51 | public ExtendedNotFoundException(final String message) { 52 | super(Response.status(Response.Status.NOT_FOUND).entity(message).build()); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /jersey-jpa-bookmark-example/src/main/webapp/index.jsp: -------------------------------------------------------------------------------- 1 | 2 | 3 |

Hello World!

4 | 5 | 6 | -------------------------------------------------------------------------------- /jersey-json-moxy/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /jersey-json-moxy/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | jersey-json-moxy 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.wst.common.project.facet.core.builder 15 | 16 | 17 | 18 | 19 | org.eclipse.m2e.core.maven2Builder 20 | 21 | 22 | 23 | 24 | org.eclipse.wst.validation.validationbuilder 25 | 26 | 27 | 28 | 29 | 30 | org.eclipse.jem.workbench.JavaEMFNature 31 | org.eclipse.wst.common.modulecore.ModuleCoreNature 32 | org.eclipse.jdt.core.javanature 33 | org.eclipse.m2e.core.maven2Nature 34 | org.eclipse.wst.common.project.facet.core.nature 35 | org.eclipse.wst.jsdt.core.jsNature 36 | 37 | 38 | -------------------------------------------------------------------------------- /jersey-json-moxy/.settings/.jsdtscope: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /jersey-json-moxy/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate 4 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 5 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 6 | org.eclipse.jdt.core.compiler.compliance=1.8 7 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate 8 | org.eclipse.jdt.core.compiler.debug.localVariable=generate 9 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate 10 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 11 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 12 | org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning 13 | org.eclipse.jdt.core.compiler.source=1.8 14 | -------------------------------------------------------------------------------- /jersey-json-moxy/.settings/org.eclipse.m2e.core.prefs: -------------------------------------------------------------------------------- 1 | activeProfiles= 2 | eclipse.preferences.version=1 3 | resolveWorkspaceProjects=true 4 | version=1 5 | -------------------------------------------------------------------------------- /jersey-json-moxy/.settings/org.eclipse.wst.common.component: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /jersey-json-moxy/.settings/org.eclipse.wst.common.project.facet.core.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /jersey-json-moxy/.settings/org.eclipse.wst.jsdt.ui.superType.container: -------------------------------------------------------------------------------- 1 | org.eclipse.wst.jsdt.launching.baseBrowserLibrary -------------------------------------------------------------------------------- /jersey-json-moxy/.settings/org.eclipse.wst.jsdt.ui.superType.name: -------------------------------------------------------------------------------- 1 | Window -------------------------------------------------------------------------------- /jersey-json-moxy/.settings/org.eclipse.wst.validation.prefs: -------------------------------------------------------------------------------- 1 | disabled=06target 2 | eclipse.preferences.version=1 3 | -------------------------------------------------------------------------------- /jersey-json-moxy/pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | com.javadevelopersguide.jersey 5 | jersey-json-moxy 6 | war 7 | 0.0.1-SNAPSHOT 8 | jersey-json-moxy Maven Webapp 9 | http://maven.apache.org 10 | 11 | 12 | 13 | 14 | 15 | javax.servlet 16 | javax.servlet-api 17 | 3.1.0 18 | provided 19 | 20 | 21 | 22 | org.glassfish.jersey.media 23 | jersey-media-moxy 24 | 2.26 25 | 26 | 27 | 28 | 29 | org.glassfish.jersey.core 30 | jersey-server 31 | 2.7 32 | 33 | 34 | org.glassfish.jersey.containers 35 | jersey-container-servlet 36 | 2.7 37 | 38 | 39 | 40 | 41 | jersey-json-moxy 42 | 43 | 44 | org.apache.maven.plugins 45 | maven-war-plugin 46 | 47 | false 48 | 49 | 50 | 51 | maven-compiler-plugin 52 | 2.0.2 53 | 54 | 1.8 55 | 1.8 56 | 57 | 58 | 59 | org.apache.tomcat.maven 60 | tomcat7-maven-plugin 61 | 2.2 62 | 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /jersey-json-moxy/src/main/java/com/javadevelopersguide/jersey/config/JerseyServletContainerConfig.java: -------------------------------------------------------------------------------- 1 | package com.javadevelopersguide.jersey.config; 2 | 3 | import java.util.HashMap; 4 | import java.util.Map; 5 | 6 | import javax.ws.rs.ApplicationPath; 7 | import javax.ws.rs.ext.ContextResolver; 8 | 9 | import org.glassfish.jersey.moxy.json.MoxyJsonConfig; 10 | // Deployment of a JAX-RS application using @ApplicationPath with Servlet 3.0 11 | // Descriptor-less deployment 12 | import org.glassfish.jersey.server.ResourceConfig; 13 | 14 | @ApplicationPath("resources") 15 | public class JerseyServletContainerConfig extends ResourceConfig { 16 | public JerseyServletContainerConfig() { 17 | 18 | // if there are more than two packanges then separate them with semicolon 19 | // exmaple : packages("org.foo.rest;org.bar.rest"); 20 | packages("com.javadevelopersguide.jersey.helloworld;com.javadevelopersguide.jersey.jsonmoxy"); 21 | } 22 | 23 | /* public ContextResolver createMoxyJsonResolver() { 24 | final MoxyJsonConfig moxyJsonConfig = new MoxyJsonConfig(); 25 | Map namespacePrefixMapper = new HashMap(1); 26 | namespacePrefixMapper.put("http://www.w3.org/2001/XMLSchema-instance", "xsi"); 27 | moxyJsonConfig.setNamespacePrefixMapper(namespacePrefixMapper).setNamespaceSeparator(':'); 28 | return moxyJsonConfig.resolver(); 29 | }*/ 30 | } 31 | -------------------------------------------------------------------------------- /jersey-json-moxy/src/main/java/com/javadevelopersguide/jersey/helloworld/HelloWorldResource.java: -------------------------------------------------------------------------------- 1 | package com.javadevelopersguide.jersey.helloworld; 2 | 3 | import javax.ws.rs.GET; 4 | import javax.ws.rs.Path; 5 | 6 | @Path("/") 7 | public class HelloWorldResource { 8 | 9 | @GET 10 | @Path("helloworld") 11 | public String helloworld(){ 12 | return "Helloworld !!!!"; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /jersey-json-moxy/src/main/webapp/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | Archetype Created Web Application 7 | 8 | -------------------------------------------------------------------------------- /jersey-json-moxy/src/main/webapp/index.jsp: -------------------------------------------------------------------------------- 1 | 2 | 3 |

Hello World!

4 | 5 | 6 | -------------------------------------------------------------------------------- /jersey-logging-server-client-example/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /jersey-logging-server-client-example/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | jersey-logging-server-client-example 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.wst.common.project.facet.core.builder 15 | 16 | 17 | 18 | 19 | org.eclipse.m2e.core.maven2Builder 20 | 21 | 22 | 23 | 24 | org.eclipse.wst.validation.validationbuilder 25 | 26 | 27 | 28 | 29 | 30 | org.eclipse.jem.workbench.JavaEMFNature 31 | org.eclipse.wst.common.modulecore.ModuleCoreNature 32 | org.eclipse.jdt.core.javanature 33 | org.eclipse.m2e.core.maven2Nature 34 | org.eclipse.wst.common.project.facet.core.nature 35 | org.eclipse.wst.jsdt.core.jsNature 36 | 37 | 38 | -------------------------------------------------------------------------------- /jersey-logging-server-client-example/.settings/.jsdtscope: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /jersey-logging-server-client-example/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 4 | org.eclipse.jdt.core.compiler.compliance=1.5 5 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 6 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 7 | org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning 8 | org.eclipse.jdt.core.compiler.source=1.5 9 | -------------------------------------------------------------------------------- /jersey-logging-server-client-example/.settings/org.eclipse.m2e.core.prefs: -------------------------------------------------------------------------------- 1 | activeProfiles= 2 | eclipse.preferences.version=1 3 | resolveWorkspaceProjects=true 4 | version=1 5 | -------------------------------------------------------------------------------- /jersey-logging-server-client-example/.settings/org.eclipse.wst.common.component: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /jersey-logging-server-client-example/.settings/org.eclipse.wst.common.project.facet.core.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /jersey-logging-server-client-example/.settings/org.eclipse.wst.jsdt.ui.superType.container: -------------------------------------------------------------------------------- 1 | org.eclipse.wst.jsdt.launching.baseBrowserLibrary -------------------------------------------------------------------------------- /jersey-logging-server-client-example/.settings/org.eclipse.wst.jsdt.ui.superType.name: -------------------------------------------------------------------------------- 1 | Window -------------------------------------------------------------------------------- /jersey-logging-server-client-example/.settings/org.eclipse.wst.validation.prefs: -------------------------------------------------------------------------------- 1 | disabled=06target 2 | eclipse.preferences.version=1 3 | -------------------------------------------------------------------------------- /jersey-logging-server-client-example/src/main/java/com/javadevelopersguide/jersey/client/UserResourceClient.java: -------------------------------------------------------------------------------- 1 | package com.javadevelopersguide.jersey.client; 2 | 3 | import java.util.logging.Level; 4 | import java.util.logging.Logger; 5 | 6 | import javax.ws.rs.client.Client; 7 | import javax.ws.rs.client.ClientBuilder; 8 | import javax.ws.rs.core.MediaType; 9 | 10 | import org.glassfish.jersey.client.ClientConfig; 11 | import org.glassfish.jersey.logging.LoggingFeature; 12 | 13 | public class UserResourceClient { 14 | 15 | public static void main(String[] args) { 16 | getUsers(); 17 | } 18 | protected static ClientConfig createClientConfig() { 19 | ClientConfig config = new ClientConfig(); 20 | config.register(new LoggingFeature(Logger.getLogger(LoggingFeature.DEFAULT_LOGGER_NAME), Level.INFO, LoggingFeature.Verbosity.PAYLOAD_ANY, 10000)); 21 | return config; 22 | } 23 | 24 | private static void getUsers() { 25 | Client client = ClientBuilder.newClient(createClientConfig()); 26 | 27 | String entity = client.target("http://localhost:8080/jersey-logging-server-client-example/resources").path("users") 28 | .request(MediaType.APPLICATION_JSON).header("some-header", "true").get(String.class); 29 | 30 | System.out.println(entity); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /jersey-logging-server-client-example/src/main/java/com/javadevelopersguide/jersey/config/AppResourceConfig.java: -------------------------------------------------------------------------------- 1 | package com.javadevelopersguide.jersey.config; 2 | 3 | import java.util.logging.Level; 4 | import java.util.logging.Logger; 5 | 6 | import javax.ws.rs.ApplicationPath; 7 | 8 | import org.glassfish.jersey.logging.LoggingFeature; 9 | import org.glassfish.jersey.server.ResourceConfig; 10 | 11 | @ApplicationPath("resources") 12 | public class AppResourceConfig extends ResourceConfig { 13 | public AppResourceConfig() { 14 | packages("com.javadevelopersguide.jersey.resources"); 15 | register(new LoggingFeature(Logger.getLogger(LoggingFeature.DEFAULT_LOGGER_NAME), 16 | Level.INFO, LoggingFeature.Verbosity.PAYLOAD_ANY, 10000)); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /jersey-logging-server-client-example/src/main/java/com/javadevelopersguide/jersey/model/APIResponse.java: -------------------------------------------------------------------------------- 1 | package com.javadevelopersguide.jersey.model; 2 | 3 | import javax.xml.bind.annotation.XmlRootElement; 4 | 5 | @XmlRootElement 6 | public class APIResponse { 7 | private int errorCode; 8 | private String message; 9 | 10 | public APIResponse(){ 11 | 12 | } 13 | 14 | public APIResponse(int errorCode, String message) { 15 | super(); 16 | this.errorCode = errorCode; 17 | this.message = message; 18 | } 19 | 20 | public int getErrorCode() { 21 | return errorCode; 22 | } 23 | 24 | public void setErrorCode(int errorCode) { 25 | this.errorCode = errorCode; 26 | } 27 | 28 | public String getMessage() { 29 | return message; 30 | } 31 | 32 | public void setMessage(String message) { 33 | this.message = message; 34 | } 35 | 36 | 37 | } 38 | -------------------------------------------------------------------------------- /jersey-logging-server-client-example/src/main/java/com/javadevelopersguide/jersey/model/User.java: -------------------------------------------------------------------------------- 1 | package com.javadevelopersguide.jersey.model; 2 | 3 | import javax.xml.bind.annotation.XmlRootElement; 4 | 5 | @XmlRootElement 6 | public class User { 7 | private long id; 8 | private String name; 9 | private String email; 10 | 11 | public User() { 12 | 13 | } 14 | 15 | 16 | public User(long id, String name, String email) { 17 | super(); 18 | this.id = id; 19 | this.name = name; 20 | this.email = email; 21 | } 22 | public long getId() { 23 | return id; 24 | } 25 | public void setId(long id) { 26 | this.id = id; 27 | } 28 | public String getName() { 29 | return name; 30 | } 31 | public void setName(String name) { 32 | this.name = name; 33 | } 34 | public String getEmail() { 35 | return email; 36 | } 37 | public void setEmail(String email) { 38 | this.email = email; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /jersey-logging-server-client-example/src/main/java/com/javadevelopersguide/jersey/resources/HelloWorldResource.java: -------------------------------------------------------------------------------- 1 | package com.javadevelopersguide.jersey.resources; 2 | 3 | import javax.ws.rs.GET; 4 | 5 | import javax.ws.rs.Path; 6 | 7 | @Path("/") 8 | public class HelloWorldResource { 9 | 10 | @GET 11 | @Path("helloworld") 12 | public String helloworld(){ 13 | return "Helloworld !!!!"; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /jersey-logging-server-client-example/src/main/java/com/javadevelopersguide/jersey/resources/UserResource.java: -------------------------------------------------------------------------------- 1 | package com.javadevelopersguide.jersey.resources; 2 | 3 | import java.util.ArrayList; 4 | import java.util.List; 5 | 6 | import javax.ws.rs.GET; 7 | import javax.ws.rs.Path; 8 | import javax.ws.rs.Produces; 9 | import javax.ws.rs.core.MediaType; 10 | 11 | import com.javadevelopersguide.jersey.model.User; 12 | 13 | @Path("/users") 14 | public class UserResource { 15 | 16 | @GET 17 | @Produces(MediaType.APPLICATION_JSON) 18 | public List fetchAll() { 19 | List users = new ArrayList(); 20 | users.add(new User(100, "A", "demo@gmail.com")); 21 | users.add(new User(101, "B", "demo1@gmail.com")); 22 | users.add(new User(102, "C", "demo2@gmail.com")); 23 | return users; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /jersey-logging-server-client-example/src/main/webapp/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | Archetype Created Web Application 7 | 8 | -------------------------------------------------------------------------------- /jersey-logging-server-client-example/src/main/webapp/index.jsp: -------------------------------------------------------------------------------- 1 | 2 | 3 |

Hello World!

4 | 5 | 6 | -------------------------------------------------------------------------------- /json-jackson/src/main/assembly/src.xml: -------------------------------------------------------------------------------- 1 | 42 | 43 | 44 | project 45 | 46 | zip 47 | 48 | 49 | 50 | . 51 | 52 | true 53 | 54 | **/target/** 55 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /json-jackson/src/main/java/org/glassfish/jersey/examples/jackson/EmptyArrayBean.java: -------------------------------------------------------------------------------- 1 | /* 2 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 3 | * 4 | * Copyright (c) 2010-2017 Oracle and/or its affiliates. All rights reserved. 5 | * 6 | * The contents of this file are subject to the terms of either the GNU 7 | * General Public License Version 2 only ("GPL") or the Common Development 8 | * and Distribution License("CDDL") (collectively, the "License"). You 9 | * may not use this file except in compliance with the License. You can 10 | * obtain a copy of the License at 11 | * https://oss.oracle.com/licenses/CDDL+GPL-1.1 12 | * or LICENSE.txt. See the License for the specific 13 | * language governing permissions and limitations under the License. 14 | * 15 | * When distributing the software, include this License Header Notice in each 16 | * file and include the License file at LICENSE.txt. 17 | * 18 | * GPL Classpath Exception: 19 | * Oracle designates this particular file as subject to the "Classpath" 20 | * exception as provided by Oracle in the GPL Version 2 section of the License 21 | * file that accompanied this code. 22 | * 23 | * Modifications: 24 | * If applicable, add the following below the License Header, with the fields 25 | * enclosed by brackets [] replaced by your own identifying information: 26 | * "Portions Copyright [year] [name of copyright owner]" 27 | * 28 | * Contributor(s): 29 | * If you wish your version of this file to be governed by only the CDDL or 30 | * only the GPL Version 2, indicate your decision by adding "[Contributor] 31 | * elects to include this software in this distribution under the [CDDL or GPL 32 | * Version 2] license." If you don't indicate a single choice of license, a 33 | * recipient has the option to distribute your version of this file under 34 | * either the CDDL, the GPL Version 2 or to extend the choice of license to 35 | * its licensees as provided above. However, if you add GPL Version 2 code 36 | * and therefore, elected the GPL Version 2 license, then the option applies 37 | * only if the new code is made subject to such option by the copyright 38 | * holder. 39 | */ 40 | 41 | package org.glassfish.jersey.examples.jackson; 42 | 43 | import javax.xml.bind.annotation.XmlRootElement; 44 | 45 | /** 46 | * TODO javadoc. 47 | * 48 | * @author Jakub Podlesak (jakub.podlesak at oracle.com) 49 | */ 50 | @XmlRootElement 51 | public class EmptyArrayBean { 52 | 53 | public String[] emtpyArray = new String[0]; 54 | } 55 | -------------------------------------------------------------------------------- /json-jackson1/src/main/java/org/glassfish/jersey/examples/jackson1/EmptyArrayBean.java: -------------------------------------------------------------------------------- 1 | /* 2 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 3 | * 4 | * Copyright (c) 2010-2017 Oracle and/or its affiliates. All rights reserved. 5 | * 6 | * The contents of this file are subject to the terms of either the GNU 7 | * General Public License Version 2 only ("GPL") or the Common Development 8 | * and Distribution License("CDDL") (collectively, the "License"). You 9 | * may not use this file except in compliance with the License. You can 10 | * obtain a copy of the License at 11 | * https://oss.oracle.com/licenses/CDDL+GPL-1.1 12 | * or LICENSE.txt. See the License for the specific 13 | * language governing permissions and limitations under the License. 14 | * 15 | * When distributing the software, include this License Header Notice in each 16 | * file and include the License file at LICENSE.txt. 17 | * 18 | * GPL Classpath Exception: 19 | * Oracle designates this particular file as subject to the "Classpath" 20 | * exception as provided by Oracle in the GPL Version 2 section of the License 21 | * file that accompanied this code. 22 | * 23 | * Modifications: 24 | * If applicable, add the following below the License Header, with the fields 25 | * enclosed by brackets [] replaced by your own identifying information: 26 | * "Portions Copyright [year] [name of copyright owner]" 27 | * 28 | * Contributor(s): 29 | * If you wish your version of this file to be governed by only the CDDL or 30 | * only the GPL Version 2, indicate your decision by adding "[Contributor] 31 | * elects to include this software in this distribution under the [CDDL or GPL 32 | * Version 2] license." If you don't indicate a single choice of license, a 33 | * recipient has the option to distribute your version of this file under 34 | * either the CDDL, the GPL Version 2 or to extend the choice of license to 35 | * its licensees as provided above. However, if you add GPL Version 2 code 36 | * and therefore, elected the GPL Version 2 license, then the option applies 37 | * only if the new code is made subject to such option by the copyright 38 | * holder. 39 | */ 40 | 41 | package org.glassfish.jersey.examples.jackson1; 42 | 43 | import javax.xml.bind.annotation.XmlRootElement; 44 | 45 | /** 46 | * @author Jakub Podlesak (jakub.podlesak at oracle.com) 47 | */ 48 | @XmlRootElement 49 | public class EmptyArrayBean { 50 | 51 | public String[] emtpyArray = new String[0]; 52 | } 53 | -------------------------------------------------------------------------------- /json-with-padding/src/main/assembly/src.xml: -------------------------------------------------------------------------------- 1 | 42 | 43 | 44 | project 45 | 46 | zip 47 | 48 | 49 | 50 | . 51 | 52 | true 53 | 54 | **/target/** 55 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /managed-beans-webapp/src/main/java/org/glassfish/jersey/examples/managedbeans/resources/ManagedBeanException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 3 | * 4 | * Copyright (c) 2010-2017 Oracle and/or its affiliates. All rights reserved. 5 | * 6 | * The contents of this file are subject to the terms of either the GNU 7 | * General Public License Version 2 only ("GPL") or the Common Development 8 | * and Distribution License("CDDL") (collectively, the "License"). You 9 | * may not use this file except in compliance with the License. You can 10 | * obtain a copy of the License at 11 | * https://oss.oracle.com/licenses/CDDL+GPL-1.1 12 | * or LICENSE.txt. See the License for the specific 13 | * language governing permissions and limitations under the License. 14 | * 15 | * When distributing the software, include this License Header Notice in each 16 | * file and include the License file at LICENSE.txt. 17 | * 18 | * GPL Classpath Exception: 19 | * Oracle designates this particular file as subject to the "Classpath" 20 | * exception as provided by Oracle in the GPL Version 2 section of the License 21 | * file that accompanied this code. 22 | * 23 | * Modifications: 24 | * If applicable, add the following below the License Header, with the fields 25 | * enclosed by brackets [] replaced by your own identifying information: 26 | * "Portions Copyright [year] [name of copyright owner]" 27 | * 28 | * Contributor(s): 29 | * If you wish your version of this file to be governed by only the CDDL or 30 | * only the GPL Version 2, indicate your decision by adding "[Contributor] 31 | * elects to include this software in this distribution under the [CDDL or GPL 32 | * Version 2] license." If you don't indicate a single choice of license, a 33 | * recipient has the option to distribute your version of this file under 34 | * either the CDDL, the GPL Version 2 or to extend the choice of license to 35 | * its licensees as provided above. However, if you add GPL Version 2 code 36 | * and therefore, elected the GPL Version 2 license, then the option applies 37 | * only if the new code is made subject to such option by the copyright 38 | * holder. 39 | */ 40 | 41 | package org.glassfish.jersey.examples.managedbeans.resources; 42 | 43 | /** 44 | * Exception to be thrown and mapped by the web application. 45 | * 46 | * @author Paul Sandoz 47 | */ 48 | public class ManagedBeanException extends RuntimeException { 49 | 50 | } 51 | -------------------------------------------------------------------------------- /monitoring-webapp/src/main/java/org/glassfish/jersey/examples/monitoring/MyException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 3 | * 4 | * Copyright (c) 2013-2017 Oracle and/or its affiliates. All rights reserved. 5 | * 6 | * The contents of this file are subject to the terms of either the GNU 7 | * General Public License Version 2 only ("GPL") or the Common Development 8 | * and Distribution License("CDDL") (collectively, the "License"). You 9 | * may not use this file except in compliance with the License. You can 10 | * obtain a copy of the License at 11 | * https://oss.oracle.com/licenses/CDDL+GPL-1.1 12 | * or LICENSE.txt. See the License for the specific 13 | * language governing permissions and limitations under the License. 14 | * 15 | * When distributing the software, include this License Header Notice in each 16 | * file and include the License file at LICENSE.txt. 17 | * 18 | * GPL Classpath Exception: 19 | * Oracle designates this particular file as subject to the "Classpath" 20 | * exception as provided by Oracle in the GPL Version 2 section of the License 21 | * file that accompanied this code. 22 | * 23 | * Modifications: 24 | * If applicable, add the following below the License Header, with the fields 25 | * enclosed by brackets [] replaced by your own identifying information: 26 | * "Portions Copyright [year] [name of copyright owner]" 27 | * 28 | * Contributor(s): 29 | * If you wish your version of this file to be governed by only the CDDL or 30 | * only the GPL Version 2, indicate your decision by adding "[Contributor] 31 | * elects to include this software in this distribution under the [CDDL or GPL 32 | * Version 2] license." If you don't indicate a single choice of license, a 33 | * recipient has the option to distribute your version of this file under 34 | * either the CDDL, the GPL Version 2 or to extend the choice of license to 35 | * its licensees as provided above. However, if you add GPL Version 2 code 36 | * and therefore, elected the GPL Version 2 license, then the option applies 37 | * only if the new code is made subject to such option by the copyright 38 | * holder. 39 | */ 40 | 41 | package org.glassfish.jersey.examples.monitoring; 42 | 43 | /** 44 | * 45 | * @author Miroslav Fuksa 46 | */ 47 | 48 | public class MyException extends RuntimeException { 49 | public MyException(String message) { 50 | super(message); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /monitoring-webapp/src/main/java/org/glassfish/jersey/examples/monitoring/MyExceptionMapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 3 | * 4 | * Copyright (c) 2013-2017 Oracle and/or its affiliates. All rights reserved. 5 | * 6 | * The contents of this file are subject to the terms of either the GNU 7 | * General Public License Version 2 only ("GPL") or the Common Development 8 | * and Distribution License("CDDL") (collectively, the "License"). You 9 | * may not use this file except in compliance with the License. You can 10 | * obtain a copy of the License at 11 | * https://oss.oracle.com/licenses/CDDL+GPL-1.1 12 | * or LICENSE.txt. See the License for the specific 13 | * language governing permissions and limitations under the License. 14 | * 15 | * When distributing the software, include this License Header Notice in each 16 | * file and include the License file at LICENSE.txt. 17 | * 18 | * GPL Classpath Exception: 19 | * Oracle designates this particular file as subject to the "Classpath" 20 | * exception as provided by Oracle in the GPL Version 2 section of the License 21 | * file that accompanied this code. 22 | * 23 | * Modifications: 24 | * If applicable, add the following below the License Header, with the fields 25 | * enclosed by brackets [] replaced by your own identifying information: 26 | * "Portions Copyright [year] [name of copyright owner]" 27 | * 28 | * Contributor(s): 29 | * If you wish your version of this file to be governed by only the CDDL or 30 | * only the GPL Version 2, indicate your decision by adding "[Contributor] 31 | * elects to include this software in this distribution under the [CDDL or GPL 32 | * Version 2] license." If you don't indicate a single choice of license, a 33 | * recipient has the option to distribute your version of this file under 34 | * either the CDDL, the GPL Version 2 or to extend the choice of license to 35 | * its licensees as provided above. However, if you add GPL Version 2 code 36 | * and therefore, elected the GPL Version 2 license, then the option applies 37 | * only if the new code is made subject to such option by the copyright 38 | * holder. 39 | */ 40 | 41 | package org.glassfish.jersey.examples.monitoring; 42 | 43 | import javax.ws.rs.core.Response; 44 | import javax.ws.rs.ext.ExceptionMapper; 45 | 46 | /** 47 | * 48 | * @author Miroslav Fuksa 49 | */ 50 | 51 | public class MyExceptionMapper implements ExceptionMapper { 52 | 53 | @Override 54 | public Response toResponse(MyException exception) { 55 | return Response.ok("mapped").build(); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /multipart-webapp/src/main/java/org/glassfish/jersey/examples/multipart/webapp/Bean.java: -------------------------------------------------------------------------------- 1 | /* 2 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 3 | * 4 | * Copyright (c) 2012-2017 Oracle and/or its affiliates. All rights reserved. 5 | * 6 | * The contents of this file are subject to the terms of either the GNU 7 | * General Public License Version 2 only ("GPL") or the Common Development 8 | * and Distribution License("CDDL") (collectively, the "License"). You 9 | * may not use this file except in compliance with the License. You can 10 | * obtain a copy of the License at 11 | * https://oss.oracle.com/licenses/CDDL+GPL-1.1 12 | * or LICENSE.txt. See the License for the specific 13 | * language governing permissions and limitations under the License. 14 | * 15 | * When distributing the software, include this License Header Notice in each 16 | * file and include the License file at LICENSE.txt. 17 | * 18 | * GPL Classpath Exception: 19 | * Oracle designates this particular file as subject to the "Classpath" 20 | * exception as provided by Oracle in the GPL Version 2 section of the License 21 | * file that accompanied this code. 22 | * 23 | * Modifications: 24 | * If applicable, add the following below the License Header, with the fields 25 | * enclosed by brackets [] replaced by your own identifying information: 26 | * "Portions Copyright [year] [name of copyright owner]" 27 | * 28 | * Contributor(s): 29 | * If you wish your version of this file to be governed by only the CDDL or 30 | * only the GPL Version 2, indicate your decision by adding "[Contributor] 31 | * elects to include this software in this distribution under the [CDDL or GPL 32 | * Version 2] license." If you don't indicate a single choice of license, a 33 | * recipient has the option to distribute your version of this file under 34 | * either the CDDL, the GPL Version 2 or to extend the choice of license to 35 | * its licensees as provided above. However, if you add GPL Version 2 code 36 | * and therefore, elected the GPL Version 2 license, then the option applies 37 | * only if the new code is made subject to such option by the copyright 38 | * holder. 39 | */ 40 | 41 | package org.glassfish.jersey.examples.multipart.webapp; 42 | 43 | import javax.xml.bind.annotation.XmlRootElement; 44 | 45 | @XmlRootElement 46 | public class Bean { 47 | 48 | public String value; 49 | 50 | public Bean() { 51 | } 52 | 53 | public Bean(String str) { 54 | value = str; 55 | } 56 | 57 | } 58 | -------------------------------------------------------------------------------- /oauth2-client-google-webapp/src/main/java/org/glassfish/jersey/examples/oauth2/googleclient/model/TaskModel.java: -------------------------------------------------------------------------------- 1 | /* 2 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 3 | * 4 | * Copyright (c) 2013-2017 Oracle and/or its affiliates. All rights reserved. 5 | * 6 | * The contents of this file are subject to the terms of either the GNU 7 | * General Public License Version 2 only ("GPL") or the Common Development 8 | * and Distribution License("CDDL") (collectively, the "License"). You 9 | * may not use this file except in compliance with the License. You can 10 | * obtain a copy of the License at 11 | * https://oss.oracle.com/licenses/CDDL+GPL-1.1 12 | * or LICENSE.txt. See the License for the specific 13 | * language governing permissions and limitations under the License. 14 | * 15 | * When distributing the software, include this License Header Notice in each 16 | * file and include the License file at LICENSE.txt. 17 | * 18 | * GPL Classpath Exception: 19 | * Oracle designates this particular file as subject to the "Classpath" 20 | * exception as provided by Oracle in the GPL Version 2 section of the License 21 | * file that accompanied this code. 22 | * 23 | * Modifications: 24 | * If applicable, add the following below the License Header, with the fields 25 | * enclosed by brackets [] replaced by your own identifying information: 26 | * "Portions Copyright [year] [name of copyright owner]" 27 | * 28 | * Contributor(s): 29 | * If you wish your version of this file to be governed by only the CDDL or 30 | * only the GPL Version 2, indicate your decision by adding "[Contributor] 31 | * elects to include this software in this distribution under the [CDDL or GPL 32 | * Version 2] license." If you don't indicate a single choice of license, a 33 | * recipient has the option to distribute your version of this file under 34 | * either the CDDL, the GPL Version 2 or to extend the choice of license to 35 | * its licensees as provided above. However, if you add GPL Version 2 code 36 | * and therefore, elected the GPL Version 2 license, then the option applies 37 | * only if the new code is made subject to such option by the copyright 38 | * holder. 39 | */ 40 | 41 | package org.glassfish.jersey.examples.oauth2.googleclient.model; 42 | 43 | /** 44 | * Model (MVC) that contains one google task. 45 | * 46 | * @author Miroslav Fuksa 47 | */ 48 | public class TaskModel { 49 | private final String title; 50 | 51 | public TaskModel(String title) { 52 | this.title = title; 53 | } 54 | 55 | public String getTitle() { 56 | return title; 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /osgi-helloworld-webapp/functional-test/src/test/resources/log4j.properties: -------------------------------------------------------------------------------- 1 | # 2 | # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 3 | # 4 | # Copyright (c) 2013-2017 Oracle and/or its affiliates. All rights reserved. 5 | # 6 | # The contents of this file are subject to the terms of either the GNU 7 | # General Public License Version 2 only ("GPL") or the Common Development 8 | # and Distribution License("CDDL") (collectively, the "License"). You 9 | # may not use this file except in compliance with the License. You can 10 | # obtain a copy of the License at 11 | # https://oss.oracle.com/licenses/CDDL+GPL-1.1 12 | # or LICENSE.txt. See the License for the specific 13 | # language governing permissions and limitations under the License. 14 | # 15 | # When distributing the software, include this License Header Notice in each 16 | # file and include the License file at LICENSE.txt. 17 | # 18 | # GPL Classpath Exception: 19 | # Oracle designates this particular file as subject to the "Classpath" 20 | # exception as provided by Oracle in the GPL Version 2 section of the License 21 | # file that accompanied this code. 22 | # 23 | # Modifications: 24 | # If applicable, add the following below the License Header, with the fields 25 | # enclosed by brackets [] replaced by your own identifying information: 26 | # "Portions Copyright [year] [name of copyright owner]" 27 | # 28 | # Contributor(s): 29 | # If you wish your version of this file to be governed by only the CDDL or 30 | # only the GPL Version 2, indicate your decision by adding "[Contributor] 31 | # elects to include this software in this distribution under the [CDDL or GPL 32 | # Version 2] license." If you don't indicate a single choice of license, a 33 | # recipient has the option to distribute your version of this file under 34 | # either the CDDL, the GPL Version 2 or to extend the choice of license to 35 | # its licensees as provided above. However, if you add GPL Version 2 code 36 | # and therefore, elected the GPL Version 2 license, then the option applies 37 | # only if the new code is made subject to such option by the copyright 38 | # holder. 39 | # 40 | 41 | log4j.rootCategory=ERROR, stdout 42 | log4j.appender.stdout=org.apache.log4j.ConsoleAppender 43 | log4j.appender.stdout.layout.ConversionPattern=[%30.30c{1}] - %m%n 44 | log4j.appender.stdout.layout=org.apache.log4j.PatternLayout 45 | -------------------------------------------------------------------------------- /osgi-helloworld-webapp/functional-test/src/test/resources/runtime.policy: -------------------------------------------------------------------------------- 1 | /* 2 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 3 | * 4 | * Copyright (c) 2014-2017 Oracle and/or its affiliates. All rights reserved. 5 | * 6 | * The contents of this file are subject to the terms of either the GNU 7 | * General Public License Version 2 only ("GPL") or the Common Development 8 | * and Distribution License("CDDL") (collectively, the "License"). You 9 | * may not use this file except in compliance with the License. You can 10 | * obtain a copy of the License at 11 | * https://oss.oracle.com/licenses/CDDL+GPL-1.1 12 | * or LICENSE.txt. See the License for the specific 13 | * language governing permissions and limitations under the License. 14 | * 15 | * When distributing the software, include this License Header Notice in each 16 | * file and include the License file at LICENSE.txt. 17 | * 18 | * GPL Classpath Exception: 19 | * Oracle designates this particular file as subject to the "Classpath" 20 | * exception as provided by Oracle in the GPL Version 2 section of the License 21 | * file that accompanied this code. 22 | * 23 | * Modifications: 24 | * If applicable, add the following below the License Header, with the fields 25 | * enclosed by brackets [] replaced by your own identifying information: 26 | * "Portions Copyright [year] [name of copyright owner]" 27 | * 28 | * Contributor(s): 29 | * If you wish your version of this file to be governed by only the CDDL or 30 | * only the GPL Version 2, indicate your decision by adding "[Contributor] 31 | * elects to include this software in this distribution under the [CDDL or GPL 32 | * Version 2] license." If you don't indicate a single choice of license, a 33 | * recipient has the option to distribute your version of this file under 34 | * either the CDDL, the GPL Version 2 or to extend the choice of license to 35 | * its licensees as provided above. However, if you add GPL Version 2 code 36 | * and therefore, elected the GPL Version 2 license, then the option applies 37 | * only if the new code is made subject to such option by the copyright 38 | * holder. 39 | */ 40 | 41 | grant { 42 | permission java.security.AllPermission; 43 | }; 44 | -------------------------------------------------------------------------------- /osgi-helloworld-webapp/lib-bundle/src/main/java/org/glassfish/jersey/examples/osgi/helloworld/resource/AnotherResource.java: -------------------------------------------------------------------------------- 1 | /* 2 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 3 | * 4 | * Copyright (c) 2012-2017 Oracle and/or its affiliates. All rights reserved. 5 | * 6 | * The contents of this file are subject to the terms of either the GNU 7 | * General Public License Version 2 only ("GPL") or the Common Development 8 | * and Distribution License("CDDL") (collectively, the "License"). You 9 | * may not use this file except in compliance with the License. You can 10 | * obtain a copy of the License at 11 | * https://oss.oracle.com/licenses/CDDL+GPL-1.1 12 | * or LICENSE.txt. See the License for the specific 13 | * language governing permissions and limitations under the License. 14 | * 15 | * When distributing the software, include this License Header Notice in each 16 | * file and include the License file at LICENSE.txt. 17 | * 18 | * GPL Classpath Exception: 19 | * Oracle designates this particular file as subject to the "Classpath" 20 | * exception as provided by Oracle in the GPL Version 2 section of the License 21 | * file that accompanied this code. 22 | * 23 | * Modifications: 24 | * If applicable, add the following below the License Header, with the fields 25 | * enclosed by brackets [] replaced by your own identifying information: 26 | * "Portions Copyright [year] [name of copyright owner]" 27 | * 28 | * Contributor(s): 29 | * If you wish your version of this file to be governed by only the CDDL or 30 | * only the GPL Version 2, indicate your decision by adding "[Contributor] 31 | * elects to include this software in this distribution under the [CDDL or GPL 32 | * Version 2] license." If you don't indicate a single choice of license, a 33 | * recipient has the option to distribute your version of this file under 34 | * either the CDDL, the GPL Version 2 or to extend the choice of license to 35 | * its licensees as provided above. However, if you add GPL Version 2 code 36 | * and therefore, elected the GPL Version 2 license, then the option applies 37 | * only if the new code is made subject to such option by the copyright 38 | * holder. 39 | */ 40 | 41 | package org.glassfish.jersey.examples.osgi.helloworld.resource; 42 | 43 | import javax.ws.rs.GET; 44 | import javax.ws.rs.Path; 45 | import javax.ws.rs.Produces; 46 | 47 | @Path("/another") 48 | public class AnotherResource { 49 | 50 | @GET 51 | @Produces("text/plain") 52 | public String getAnotherMessage() { 53 | return "Another"; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /osgi-helloworld-webapp/lib-bundle/src/main/java/org/glassfish/jersey/examples/osgi/helloworld/resource/HelloWorldResource.java: -------------------------------------------------------------------------------- 1 | /* 2 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 3 | * 4 | * Copyright (c) 2010-2017 Oracle and/or its affiliates. All rights reserved. 5 | * 6 | * The contents of this file are subject to the terms of either the GNU 7 | * General Public License Version 2 only ("GPL") or the Common Development 8 | * and Distribution License("CDDL") (collectively, the "License"). You 9 | * may not use this file except in compliance with the License. You can 10 | * obtain a copy of the License at 11 | * https://oss.oracle.com/licenses/CDDL+GPL-1.1 12 | * or LICENSE.txt. See the License for the specific 13 | * language governing permissions and limitations under the License. 14 | * 15 | * When distributing the software, include this License Header Notice in each 16 | * file and include the License file at LICENSE.txt. 17 | * 18 | * GPL Classpath Exception: 19 | * Oracle designates this particular file as subject to the "Classpath" 20 | * exception as provided by Oracle in the GPL Version 2 section of the License 21 | * file that accompanied this code. 22 | * 23 | * Modifications: 24 | * If applicable, add the following below the License Header, with the fields 25 | * enclosed by brackets [] replaced by your own identifying information: 26 | * "Portions Copyright [year] [name of copyright owner]" 27 | * 28 | * Contributor(s): 29 | * If you wish your version of this file to be governed by only the CDDL or 30 | * only the GPL Version 2, indicate your decision by adding "[Contributor] 31 | * elects to include this software in this distribution under the [CDDL or GPL 32 | * Version 2] license." If you don't indicate a single choice of license, a 33 | * recipient has the option to distribute your version of this file under 34 | * either the CDDL, the GPL Version 2 or to extend the choice of license to 35 | * its licensees as provided above. However, if you add GPL Version 2 code 36 | * and therefore, elected the GPL Version 2 license, then the option applies 37 | * only if the new code is made subject to such option by the copyright 38 | * holder. 39 | */ 40 | 41 | package org.glassfish.jersey.examples.osgi.helloworld.resource; 42 | 43 | import javax.ws.rs.GET; 44 | import javax.ws.rs.Path; 45 | import javax.ws.rs.Produces; 46 | 47 | @Path("/helloworld") 48 | public class HelloWorldResource { 49 | 50 | @GET 51 | @Produces("text/plain") 52 | public String getClichedMessage() { 53 | return "Hello World"; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /osgi-http-service/bundle/src/main/java/org/glassfish/jersey/examples/osgihttpservice/StatusResource.java: -------------------------------------------------------------------------------- 1 | /* 2 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 3 | * 4 | * Copyright (c) 2010-2017 Oracle and/or its affiliates. All rights reserved. 5 | * 6 | * The contents of this file are subject to the terms of either the GNU 7 | * General Public License Version 2 only ("GPL") or the Common Development 8 | * and Distribution License("CDDL") (collectively, the "License"). You 9 | * may not use this file except in compliance with the License. You can 10 | * obtain a copy of the License at 11 | * https://oss.oracle.com/licenses/CDDL+GPL-1.1 12 | * or LICENSE.txt. See the License for the specific 13 | * language governing permissions and limitations under the License. 14 | * 15 | * When distributing the software, include this License Header Notice in each 16 | * file and include the License file at LICENSE.txt. 17 | * 18 | * GPL Classpath Exception: 19 | * Oracle designates this particular file as subject to the "Classpath" 20 | * exception as provided by Oracle in the GPL Version 2 section of the License 21 | * file that accompanied this code. 22 | * 23 | * Modifications: 24 | * If applicable, add the following below the License Header, with the fields 25 | * enclosed by brackets [] replaced by your own identifying information: 26 | * "Portions Copyright [year] [name of copyright owner]" 27 | * 28 | * Contributor(s): 29 | * If you wish your version of this file to be governed by only the CDDL or 30 | * only the GPL Version 2, indicate your decision by adding "[Contributor] 31 | * elects to include this software in this distribution under the [CDDL or GPL 32 | * Version 2] license." If you don't indicate a single choice of license, a 33 | * recipient has the option to distribute your version of this file under 34 | * either the CDDL, the GPL Version 2 or to extend the choice of license to 35 | * its licensees as provided above. However, if you add GPL Version 2 code 36 | * and therefore, elected the GPL Version 2 license, then the option applies 37 | * only if the new code is made subject to such option by the copyright 38 | * holder. 39 | */ 40 | 41 | package org.glassfish.jersey.examples.osgihttpservice; 42 | 43 | import javax.ws.rs.GET; 44 | import javax.ws.rs.Path; 45 | import javax.ws.rs.Produces; 46 | 47 | /** 48 | * @author Jakub Podlesak (jakub.podlesak at oracle.com) 49 | */ 50 | @Path("status") 51 | public class StatusResource { 52 | 53 | @GET 54 | @Produces("text/plain") 55 | public String getStatus() { 56 | return "active"; 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /osgi-http-service/functional-test/src/test/resources/log4j.properties: -------------------------------------------------------------------------------- 1 | # 2 | # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 3 | # 4 | # Copyright (c) 2013-2017 Oracle and/or its affiliates. All rights reserved. 5 | # 6 | # The contents of this file are subject to the terms of either the GNU 7 | # General Public License Version 2 only ("GPL") or the Common Development 8 | # and Distribution License("CDDL") (collectively, the "License"). You 9 | # may not use this file except in compliance with the License. You can 10 | # obtain a copy of the License at 11 | # https://oss.oracle.com/licenses/CDDL+GPL-1.1 12 | # or LICENSE.txt. See the License for the specific 13 | # language governing permissions and limitations under the License. 14 | # 15 | # When distributing the software, include this License Header Notice in each 16 | # file and include the License file at LICENSE.txt. 17 | # 18 | # GPL Classpath Exception: 19 | # Oracle designates this particular file as subject to the "Classpath" 20 | # exception as provided by Oracle in the GPL Version 2 section of the License 21 | # file that accompanied this code. 22 | # 23 | # Modifications: 24 | # If applicable, add the following below the License Header, with the fields 25 | # enclosed by brackets [] replaced by your own identifying information: 26 | # "Portions Copyright [year] [name of copyright owner]" 27 | # 28 | # Contributor(s): 29 | # If you wish your version of this file to be governed by only the CDDL or 30 | # only the GPL Version 2, indicate your decision by adding "[Contributor] 31 | # elects to include this software in this distribution under the [CDDL or GPL 32 | # Version 2] license." If you don't indicate a single choice of license, a 33 | # recipient has the option to distribute your version of this file under 34 | # either the CDDL, the GPL Version 2 or to extend the choice of license to 35 | # its licensees as provided above. However, if you add GPL Version 2 code 36 | # and therefore, elected the GPL Version 2 license, then the option applies 37 | # only if the new code is made subject to such option by the copyright 38 | # holder. 39 | # 40 | 41 | log4j.rootCategory=ERROR, stdout 42 | log4j.appender.stdout=org.apache.log4j.ConsoleAppender 43 | log4j.appender.stdout.layout.ConversionPattern=[%30.30c{1}] - %m%n 44 | log4j.appender.stdout.layout=org.apache.log4j.PatternLayout 45 | -------------------------------------------------------------------------------- /reload/resources: -------------------------------------------------------------------------------- 1 | org.glassfish.jersey.examples.reload.DeparturesResource 2 | org.glassfish.jersey.examples.reload.ArrivalsResource 3 | #org.glassfish.jersey.examples.reload.StatsResource 4 | -------------------------------------------------------------------------------- /reload/src/main/java/org/glassfish/jersey/examples/reload/FlightsDB.java: -------------------------------------------------------------------------------- 1 | /* 2 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 3 | * 4 | * Copyright (c) 2012-2017 Oracle and/or its affiliates. All rights reserved. 5 | * 6 | * The contents of this file are subject to the terms of either the GNU 7 | * General Public License Version 2 only ("GPL") or the Common Development 8 | * and Distribution License("CDDL") (collectively, the "License"). You 9 | * may not use this file except in compliance with the License. You can 10 | * obtain a copy of the License at 11 | * https://oss.oracle.com/licenses/CDDL+GPL-1.1 12 | * or LICENSE.txt. See the License for the specific 13 | * language governing permissions and limitations under the License. 14 | * 15 | * When distributing the software, include this License Header Notice in each 16 | * file and include the License file at LICENSE.txt. 17 | * 18 | * GPL Classpath Exception: 19 | * Oracle designates this particular file as subject to the "Classpath" 20 | * exception as provided by Oracle in the GPL Version 2 section of the License 21 | * file that accompanied this code. 22 | * 23 | * Modifications: 24 | * If applicable, add the following below the License Header, with the fields 25 | * enclosed by brackets [] replaced by your own identifying information: 26 | * "Portions Copyright [year] [name of copyright owner]" 27 | * 28 | * Contributor(s): 29 | * If you wish your version of this file to be governed by only the CDDL or 30 | * only the GPL Version 2, indicate your decision by adding "[Contributor] 31 | * elects to include this software in this distribution under the [CDDL or GPL 32 | * Version 2] license." If you don't indicate a single choice of license, a 33 | * recipient has the option to distribute your version of this file under 34 | * either the CDDL, the GPL Version 2 or to extend the choice of license to 35 | * its licensees as provided above. However, if you add GPL Version 2 code 36 | * and therefore, elected the GPL Version 2 license, then the option applies 37 | * only if the new code is made subject to such option by the copyright 38 | * holder. 39 | */ 40 | 41 | package org.glassfish.jersey.examples.reload; 42 | 43 | import java.util.concurrent.atomic.AtomicInteger; 44 | 45 | /** 46 | * 47 | * @author Jakub Podlesak (jakub.podlesak at oracle.com) 48 | */ 49 | public class FlightsDB { 50 | 51 | static AtomicInteger departuresReqCount = new AtomicInteger(); 52 | static AtomicInteger arrivalsReqCount = new AtomicInteger(); 53 | } 54 | -------------------------------------------------------------------------------- /shortener-webapp/src/main/resources/ValidationMessages.properties: -------------------------------------------------------------------------------- 1 | # 2 | # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 3 | # 4 | # Copyright (c) 2013-2017 Oracle and/or its affiliates. All rights reserved. 5 | # 6 | # The contents of this file are subject to the terms of either the GNU 7 | # General Public License Version 2 only ("GPL") or the Common Development 8 | # and Distribution License("CDDL") (collectively, the "License"). You 9 | # may not use this file except in compliance with the License. You can 10 | # obtain a copy of the License at 11 | # https://oss.oracle.com/licenses/CDDL+GPL-1.1 12 | # or LICENSE.txt. See the License for the specific 13 | # language governing permissions and limitations under the License. 14 | # 15 | # When distributing the software, include this License Header Notice in each 16 | # file and include the License file at LICENSE.txt. 17 | # 18 | # GPL Classpath Exception: 19 | # Oracle designates this particular file as subject to the "Classpath" 20 | # exception as provided by Oracle in the GPL Version 2 section of the License 21 | # file that accompanied this code. 22 | # 23 | # Modifications: 24 | # If applicable, add the following below the License Header, with the fields 25 | # enclosed by brackets [] replaced by your own identifying information: 26 | # "Portions Copyright [year] [name of copyright owner]" 27 | # 28 | # Contributor(s): 29 | # If you wish your version of this file to be governed by only the CDDL or 30 | # only the GPL Version 2, indicate your decision by adding "[Contributor] 31 | # elects to include this software in this distribution under the [CDDL or GPL 32 | # Version 2] license." If you don't indicate a single choice of license, a 33 | # recipient has the option to distribute your version of this file under 34 | # either the CDDL, the GPL Version 2 or to extend the choice of license to 35 | # its licensees as provided above. However, if you add GPL Version 2 code 36 | # and therefore, elected the GPL Version 2 license, then the option applies 37 | # only if the new code is made subject to such option by the copyright 38 | # holder. 39 | # 40 | 41 | not.valid.shortened.link=Given identifier doesn't represent a valid shortened link: 42 | not.valid.url=Provided URL for shortening is not valid: 43 | -------------------------------------------------------------------------------- /sse-twitter-aggregator/client.cert: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIDJTCCAuOgAwIBAgIET5ZyYjALBgcqhkjOOAQDBQAwdjELMAkGA1UEBhMCQ1oxFzAVBgNVBAgT 3 | DkN6ZWNoIFJlcHVibGljMQ8wDQYDVQQHEwZQcmFndWUxGzAZBgNVBAoTEk9yYWNsZSBDb3Jwb3Jh 4 | dGlvbjEPMA0GA1UECxMGSmVyc2V5MQ8wDQYDVQQDEwZDbGllbnQwHhcNMTIwNDI0MDkyOTA2WhcN 5 | MTIwNzIzMDkyOTA2WjB2MQswCQYDVQQGEwJDWjEXMBUGA1UECBMOQ3plY2ggUmVwdWJsaWMxDzAN 6 | BgNVBAcTBlByYWd1ZTEbMBkGA1UEChMST3JhY2xlIENvcnBvcmF0aW9uMQ8wDQYDVQQLEwZKZXJz 7 | ZXkxDzANBgNVBAMTBkNsaWVudDCCAbcwggEsBgcqhkjOOAQBMIIBHwKBgQD9f1OBHXUSKVLfSpwu 8 | 7OTn9hG3UjzvRADDHj+AtlEmaUVdQCJR+1k9jVj6v8X1ujD2y5tVbNeBO4AdNG/yZmC3a5lQpaSf 9 | n+gEexAiwk+7qdf+t8Yb+DtX58aophUPBPuD9tPFHsMCNVQTWhaRMvZ1864rYdcq7/IiAxmd0UgB 10 | xwIVAJdgUI8VIwvMspK5gqLrhAvwWBz1AoGBAPfhoIXWmz3ey7yrXDa4V7l5lK+7+jrqgvlXTAs9 11 | B4JnUVlXjrrUWU/mcQcQgYC0SRZxI+hMKBYTt88JMozIpuE8FnqLVHyNKOCjrh4rs6Z1kW6jfwv6 12 | ITVi8ftiegEkO8yk8b6oUZCJqIPf4VrlnwaSi2ZegHtVJWQBTDv+z0kqA4GEAAKBgBmHNACDk1aw 13 | vUZjsRecMSBlkkCSqr/cCrYOsNwpfleQKsM6rdOofujANUVeoUFhX8e8K45FknxEqAugmhGQ9NRn 14 | uMenrvV+XupC0V2uGH0OciXeAzHbfeItBCbmJcvMdPW/q+I2vFchv6+ajEiNHogBrCc3qwSMhyVQ 15 | ug2fXHmJMAsGByqGSM44BAMFAAMvADAsAhQYznYmH0hrcLni4EqX3Ovac+pNJgIUehnEaW1V5djn 16 | dhYBAYUkSycETl4= 17 | -----END CERTIFICATE----- 18 | -------------------------------------------------------------------------------- /sse-twitter-aggregator/keystore_client: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RameshMF/jersey-tutorial/ab3c070fba68a09fa4f4eceb49e9b8795f07c685/sse-twitter-aggregator/keystore_client -------------------------------------------------------------------------------- /sse-twitter-aggregator/src/main/java/org/glassfish/jersey/examples/aggregator/DataAggregator.java: -------------------------------------------------------------------------------- 1 | /* 2 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 3 | * 4 | * Copyright (c) 2012-2017 Oracle and/or its affiliates. All rights reserved. 5 | * 6 | * The contents of this file are subject to the terms of either the GNU 7 | * General Public License Version 2 only ("GPL") or the Common Development 8 | * and Distribution License("CDDL") (collectively, the "License"). You 9 | * may not use this file except in compliance with the License. You can 10 | * obtain a copy of the License at 11 | * https://oss.oracle.com/licenses/CDDL+GPL-1.1 12 | * or LICENSE.txt. See the License for the specific 13 | * language governing permissions and limitations under the License. 14 | * 15 | * When distributing the software, include this License Header Notice in each 16 | * file and include the License file at LICENSE.txt. 17 | * 18 | * GPL Classpath Exception: 19 | * Oracle designates this particular file as subject to the "Classpath" 20 | * exception as provided by Oracle in the GPL Version 2 section of the License 21 | * file that accompanied this code. 22 | * 23 | * Modifications: 24 | * If applicable, add the following below the License Header, with the fields 25 | * enclosed by brackets [] replaced by your own identifying information: 26 | * "Portions Copyright [year] [name of copyright owner]" 27 | * 28 | * Contributor(s): 29 | * If you wish your version of this file to be governed by only the CDDL or 30 | * only the GPL Version 2, indicate your decision by adding "[Contributor] 31 | * elects to include this software in this distribution under the [CDDL or GPL 32 | * Version 2] license." If you don't indicate a single choice of license, a 33 | * recipient has the option to distribute your version of this file under 34 | * either the CDDL, the GPL Version 2 or to extend the choice of license to 35 | * its licensees as provided above. However, if you add GPL Version 2 code 36 | * and therefore, elected the GPL Version 2 license, then the option applies 37 | * only if the new code is made subject to such option by the copyright 38 | * holder. 39 | */ 40 | 41 | package org.glassfish.jersey.examples.aggregator; 42 | 43 | /** 44 | * Data aggregator for listening for events aggregated based on give keywords. 45 | * 46 | * @author Marek Potociar (marek.potociar at oracle.com) 47 | */ 48 | public interface DataAggregator { 49 | void start(String keywords, DataListener msgListener); 50 | 51 | void stop(); 52 | } 53 | -------------------------------------------------------------------------------- /sse-twitter-aggregator/src/main/resources/webroot/css/main.css: -------------------------------------------------------------------------------- 1 | /* 2 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 3 | * 4 | * Copyright (c) 2012-2017 Oracle and/or its affiliates. All rights reserved. 5 | * 6 | * The contents of this file are subject to the terms of either the GNU 7 | * General Public License Version 2 only ("GPL") or the Common Development 8 | * and Distribution License("CDDL") (collectively, the "License"). You 9 | * may not use this file except in compliance with the License. You can 10 | * obtain a copy of the License at 11 | * https://oss.oracle.com/licenses/CDDL+GPL-1.1 12 | * or LICENSE.txt. See the License for the specific 13 | * language governing permissions and limitations under the License. 14 | * 15 | * When distributing the software, include this License Header Notice in each 16 | * file and include the License file at LICENSE.txt. 17 | * 18 | * GPL Classpath Exception: 19 | * Oracle designates this particular file as subject to the "Classpath" 20 | * exception as provided by Oracle in the GPL Version 2 section of the License 21 | * file that accompanied this code. 22 | * 23 | * Modifications: 24 | * If applicable, add the following below the License Header, with the fields 25 | * enclosed by brackets [] replaced by your own identifying information: 26 | * "Portions Copyright [year] [name of copyright owner]" 27 | * 28 | * Contributor(s): 29 | * If you wish your version of this file to be governed by only the CDDL or 30 | * only the GPL Version 2, indicate your decision by adding "[Contributor] 31 | * elects to include this software in this distribution under the [CDDL or GPL 32 | * Version 2] license." If you don't indicate a single choice of license, a 33 | * recipient has the option to distribute your version of this file under 34 | * either the CDDL, the GPL Version 2 or to extend the choice of license to 35 | * its licensees as provided above. However, if you add GPL Version 2 code 36 | * and therefore, elected the GPL Version 2 license, then the option applies 37 | * only if the new code is made subject to such option by the copyright 38 | * holder. 39 | */ 40 | 41 | div.message { 42 | border: thick solid; 43 | border-radius: 10px; 44 | margin: 10px; 45 | width: 300px; 46 | padding: 10px; 47 | box-shadow: 5px 5px 5px #888888; 48 | font-family: Helvetica, serif; 49 | color: #444444; 50 | } 51 | -------------------------------------------------------------------------------- /sse-twitter-aggregator/src/main/resources/webroot/index.html: -------------------------------------------------------------------------------- 1 | 42 | 43 | 44 | 45 | 46 | Jersey Message Streaming Example 47 | 48 | 49 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /sse-twitter-aggregator/truststore_client: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RameshMF/jersey-tutorial/ab3c070fba68a09fa4f4eceb49e9b8795f07c685/sse-twitter-aggregator/truststore_client -------------------------------------------------------------------------------- /sse-twitter-aggregator/twitter-api.properties: -------------------------------------------------------------------------------- 1 | # 2 | # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 3 | # 4 | # Copyright (c) 2012-2017 Oracle and/or its affiliates. All rights reserved. 5 | # 6 | # The contents of this file are subject to the terms of either the GNU 7 | # General Public License Version 2 only ("GPL") or the Common Development 8 | # and Distribution License("CDDL") (collectively, the "License"). You 9 | # may not use this file except in compliance with the License. You can 10 | # obtain a copy of the License at 11 | # https://oss.oracle.com/licenses/CDDL+GPL-1.1 12 | # or LICENSE.txt. See the License for the specific 13 | # language governing permissions and limitations under the License. 14 | # 15 | # When distributing the software, include this License Header Notice in each 16 | # file and include the License file at LICENSE.txt. 17 | # 18 | # GPL Classpath Exception: 19 | # Oracle designates this particular file as subject to the "Classpath" 20 | # exception as provided by Oracle in the GPL Version 2 section of the License 21 | # file that accompanied this code. 22 | # 23 | # Modifications: 24 | # If applicable, add the following below the License Header, with the fields 25 | # enclosed by brackets [] replaced by your own identifying information: 26 | # "Portions Copyright [year] [name of copyright owner]" 27 | # 28 | # Contributor(s): 29 | # If you wish your version of this file to be governed by only the CDDL or 30 | # only the GPL Version 2, indicate your decision by adding "[Contributor] 31 | # elects to include this software in this distribution under the [CDDL or GPL 32 | # Version 2] license." If you don't indicate a single choice of license, a 33 | # recipient has the option to distribute your version of this file under 34 | # either the CDDL, the GPL Version 2 or to extend the choice of license to 35 | # its licensees as provided above. However, if you add GPL Version 2 code 36 | # and therefore, elected the GPL Version 2 license, then the option applies 37 | # only if the new code is made subject to such option by the copyright 38 | # holder. 39 | # 40 | 41 | twitter.user.name= 42 | twitter.user.password= 43 | --------------------------------------------------------------------------------