diff --git a/.awestruct_ignore b/.awestruct_ignore deleted file mode 100644 index 6d2bf4f..0000000 --- a/.awestruct_ignore +++ /dev/null @@ -1,3 +0,0 @@ -Gemfile* -Rakefile -spec diff --git a/.gitignore b/.gitignore index ff2d19a..8c4ee80 100644 --- a/.gitignore +++ b/.gitignore @@ -1,17 +1,10 @@ -_deploy/ -_site/ -_tmp/ -.sass-cache -*.swp -.project -*.bak -.rvmrc -.ruby-version +.awestruct/ +.bundle/ +.github-auth .ruby-gemset -TODO -.awestruct -Guardfile +.ruby-version +.sass-cache/ Gemfile.lock -.*-auth -*~ -.bundle +_site/ +_tmp/ + diff --git a/Gemfile b/Gemfile deleted file mode 100644 index 5414607..0000000 --- a/Gemfile +++ /dev/null @@ -1,54 +0,0 @@ -# This is a bundler configuration file (http://gembundler.com). -# -# Bundler makes it easy to make sure that your application has the dependencies -# it needs to start up and run without errors. It locates and installs the gems -# and their dependencies listed in this file, Gemfile. -# -# After installing any needed gems to your system, bundler writes a snapshot of -# all of the gems and versions that it installed to Gemfile.lock. -# -# Gemfile.lock makes your application a single package of both your own code -# and the third-party code so it remains stable in a known working state. -# -# To get started, first make sure you've installed bundler using gem install -# (or jgem install for JRuby): -# -# gem install bundler -# -# Then, use bundler to fetch the remaining libraries you'll need: -# -# bundle install -# -# Now, you're ready to start developing! -# -# awestruct -s -# -# Though if you want to be strict, you should execute in a bundle sandbox: -# -# bundle exec awestruct -s - -source "https://rubygems.org" - -ruby '1.9.3', :engine => 'jruby', :engine_version => '1.7.17' - -gem "awestruct", "0.5.5" - -gem "slim" -gem "kramdown" -gem "asciidoctor" -gem "uglifier" -gem "htmlcompressor" -gem "coffee-script" - -gem "rest-client" -gem "hpricot" -gem "git" - -gem "bouncy-castle-java", :platforms => :jruby -gem "therubyrhino", :platforms => :jruby -gem "therubyracer", "0.10.1", :platforms => :ruby -gem "jruby-openssl", :platforms => :jruby -gem "rb-inotify", :platforms => [:ruby, :jruby] - -gem "puma" -gem "rspec", ">= 2.9" diff --git a/README.asciidoc b/README.asciidoc deleted file mode 100644 index a69fc3c..0000000 --- a/README.asciidoc +++ /dev/null @@ -1,121 +0,0 @@ -== JavaEE Samples Website - -=== How to setup the environment - -The website rely on Awestruct to generate the dynamic content, and Awestruct is written in Ruby. So the first step is to install Ruby. We *highly* recommend using http://rvm.io/[RVM] to control your Ruby environment as it makes the whole thing a lot easier. - -For Linux users all you need to do to install RVM is to run the following command in your terminal: - -[source,console] ----- -curl -sSL https://get.rvm.io | bash ----- - -NOTE: For Mac or Windows users, please see the http://rvm.io/rvm/install[RVM Install Guide] - -The website rely on running some Java code, e.g. JavaDoc, so we need to use JRuby. Next is to install JRuby in your RVM environment. In your terminal execute the following command: - -[source,console] ----- -rvm install jruby-1.7.9 ----- - -NOTE: If the install aborts with messages regarding permission errors, try re executing with root permissions; "sudo rvm.." - -NOTE: If the rvm command can't be found, try to restart the terminal. - -NOTE: The site requires JRUBY to use JDK 1.8.0. You can set this by using JAVA_HOME. - -That should be it on the ruby environment side for now. Next we need to get the website repository by cloning the Git repository: - -[source,console] ----- -git clone git@github.com:javaee-samples/javaee-samples.github.io.git ----- - -Next we need to link the repository to a RVM configuration. - -Create two new files under the repository root, but first remember to go into the root folder: - -[source,console] ----- -cd javaee-samples.github.io ----- - -NOTE: On first entry you will be presented with a message from RVM telling you it read the environment from the Gemfile. Doing the next steps will remove this. - -Create file *.ruby-gemset* in your favorite editor and add this as content: -[source,content] ----- -javaee-samples ----- - -Create file *.ruby-version* in your favorite editor and add this as content: -[source,ruby] ----- -jruby-1.7.9 ----- - -At this point you can allow RVM to pickup the new environment settings by leaving the folder and re-entering. - -[source,console] ----- -cd .. & cd javaee-samples.github.io ----- - -Run the next command to verify that the environment is picked up correctly: - -[source,console] ----- -rvm info ----- - -The first line should tell you something like *jruby-1.7.9@javaee-samples*. - -Then on to the Awestruct bits! - -First we need to pull in all the dependencies. Execute the following in the terminal: - -[source,console] ----- -bundle install ----- - -NOTE: If you get an error telling you bundle could not be found, execute *gem install bundler* and reexecute the previous step - -NOTE: If you get an error telling you _libxml2_ is missing, please visit http://nokogiri.org/tutorials/installing_nokogiri.html[Installing Nokogiri]. Additional development packages for *libxslt* and *libxml2* are required. Depending on system, install dependencies (for Ubuntu execute *sudo apt-get install libxslt-dev libxml2-dev*) and reexecute the previous step - -NOTE: If you get an error telling you _no such file to load -- mkmf (LoadError)_, *rvm install ruby-1.9.3-dev* and reexecute the previous step - - -The site rely on fetching data from Github so we need to give it a *Personal Access Tokens* to use. -Create a file called *.github-auth* in the javaee-samples.github.io folder and add the Access token generated from the https://github.com/settings/applications[Gihub settings page]. - -That's it! - -=== How to generate the site - -The website not only requires Java, but it also requires the JDK. More specifically tools.jar on classpath to call JavaDoc. - -You can either set JAVA_HOME to point to your JDK installation as a global environment variable if it's not already set, or include it on the command line: - -[source,console] ----- -JAVA_HOME=/usr/lib/jvm/java-1.7.0/ bundle exec awestruct --force -d -P production ----- - -You can now point your browser to http://localhost:4242 to see the result. - - -=== How to deploy to production - -When deploying to production you execute a similar command as when generating: - -[source,console] ----- -JAVA_HOME=/usr/lib/jvm/java-1.7.0/ bundle exec awestruct --deploy -P production ----- - -WARNING: --deploy will only deploy what is currently in the _site folder. Remember to generate it first! - -WARNING: Remember to have no uncommitted changes when you execute this command, or else it will complain. diff --git a/README/index.html b/README/index.html new file mode 100644 index 0000000..4aa8970 --- /dev/null +++ b/README/index.html @@ -0,0 +1,670 @@ + + + + + + + +JavaEE Samples Website + + + + + +
+
+

JavaEE Samples Website

+
+
+

How to setup the environment

+
+

The website rely on Awestruct to generate the dynamic content, and Awestruct is written in Ruby. So the first step is to install Ruby. We highly recommend using RVM to control your Ruby environment as it makes the whole thing a lot easier.

+
+
+

For Linux users all you need to do to install RVM is to run the following command in your terminal:

+
+
+
+
curl -sSL https://get.rvm.io | bash
+
+
+
+ + + + + +
+
Note
+
+For Mac or Windows users, please see the RVM Install Guide +
+
+
+

The website rely on running some Java code, e.g. JavaDoc, so we need to use JRuby. Next is to install JRuby in your RVM environment. In your terminal execute the following command:

+
+
+
+
rvm install jruby-1.7.9
+
+
+
+ + + + + +
+
Note
+
+If the install aborts with messages regarding permission errors, try re executing with root permissions; "sudo rvm.." +
+
+
+ + + + + +
+
Note
+
+If the rvm command can’t be found, try to restart the terminal. +
+
+
+ + + + + +
+
Note
+
+The site requires JRUBY to use JDK 1.8.0. You can set this by using JAVA_HOME. +
+
+
+

That should be it on the ruby environment side for now. Next we need to get the website repository by cloning the Git repository:

+
+
+
+
git clone git@github.com:javaee-samples/javaee-samples.github.io.git
+
+
+
+

Next we need to link the repository to a RVM configuration.

+
+
+

Create two new files under the repository root, but first remember to go into the root folder:

+
+
+
+
cd javaee-samples.github.io
+
+
+
+ + + + + +
+
Note
+
+On first entry you will be presented with a message from RVM telling you it read the environment from the Gemfile. Doing the next steps will remove this. +
+
+
+

Create file .ruby-gemset in your favorite editor and add this as content:

+
+
+
+
javaee-samples
+
+
+
+

Create file .ruby-version in your favorite editor and add this as content:

+
+
+
+
jruby-1.7.9
+
+
+
+

At this point you can allow RVM to pickup the new environment settings by leaving the folder and re-entering.

+
+
+
+
cd .. & cd javaee-samples.github.io
+
+
+
+

Run the next command to verify that the environment is picked up correctly:

+
+
+
+
rvm info
+
+
+
+

The first line should tell you something like jruby-1.7.9@javaee-samples.

+
+
+

Then on to the Awestruct bits!

+
+
+

First we need to pull in all the dependencies. Execute the following in the terminal:

+
+
+
+
bundle install
+
+
+
+ + + + + +
+
Note
+
+If you get an error telling you bundle could not be found, execute gem install bundler and reexecute the previous step +
+
+
+ + + + + +
+
Note
+
+If you get an error telling you libxml2 is missing, please visit Installing Nokogiri. Additional development packages for libxslt and libxml2 are required. Depending on system, install dependencies (for Ubuntu execute sudo apt-get install libxslt-dev libxml2-dev) and reexecute the previous step +
+
+
+ + + + + +
+
Note
+
+If you get an error telling you no such file to load — mkmf (LoadError), rvm install ruby-1.9.3-dev and reexecute the previous step +
+
+
+

The site rely on fetching data from Github so we need to give it a Personal Access Tokens to use. +Create a file called .github-auth in the javaee-samples.github.io folder and add the Access token generated from the Gihub settings page.

+
+
+

That’s it!

+
+
+
+

How to generate the site

+
+

The website not only requires Java, but it also requires the JDK. More specifically tools.jar on classpath to call JavaDoc.

+
+
+

You can either set JAVA_HOME to point to your JDK installation as a global environment variable if it’s not already set, or include it on the command line:

+
+
+
+
JAVA_HOME=/usr/lib/jvm/java-1.7.0/ bundle exec awestruct --force -d -P production
+
+
+
+

You can now point your browser to http://localhost:4242 to see the result.

+
+
+
+

How to deploy to production

+
+

When deploying to production you execute a similar command as when generating:

+
+
+
+
JAVA_HOME=/usr/lib/jvm/java-1.7.0/ bundle exec awestruct --deploy -P production
+
+
+
+ + + + + +
+
Warning
+
+--deploy will only deploy what is currently in the _site folder. Remember to generate it first! +
+
+
+ + + + + +
+
Warning
+
+Remember to have no uncommitted changes when you execute this command, or else it will complain. +
+
+
+
+
+
+ + + \ No newline at end of file diff --git a/Rakefile b/Rakefile deleted file mode 100644 index 2a7d0b9..0000000 --- a/Rakefile +++ /dev/null @@ -1,200 +0,0 @@ -# This file is a rake build file. The purpose of this file is to simplify -# setting up and using Awestruct. It's not required to use Awestruct, though it -# does save you time (hopefully). If you don't want to use rake, just ignore or -# delete this file. -# -# If you're just getting started, execute this command to install Awestruct and -# the libraries on which it depends: -# -# rake setup -# -# The setup task installs the necessary libraries according to which Ruby -# environment you are using. If you want the libraries kept inside the project, -# execute this command instead: -# -# rake setup[local] -# -# IMPORTANT: To install gems, you'll need development tools on your machine, -# which include a C compiler, the Ruby development libraries and some other -# development libraries as well. -# -# There are also tasks for running Awestruct. The build will auto-detect -# whether you are using Bundler and, if you are, wrap calls to awestruct in -# `bundle exec`. -# -# To run in Awestruct in development mode, execute: -# -# rake -# -# To clean the generated site before you build, execute: -# -# rake clean preview -# -# To deploy using the production profile, execute: -# -# rake deploy -# -# To get a list of all tasks, execute: -# -# rake -T -# -# Now you're Awestruct with rake! - -$use_bundle_exec = true -$install_gems = ['awestruct -v "~> 0.5.0"', 'rb-inotify -v "~> 0.9.0"'] -$awestruct_cmd = nil -task :default => :preview - -desc 'Setup the environment to run Awestruct' -task :setup, [:env] => :init do |task, args| - next if !which('awestruct').nil? - - if File.exist? 'Gemfile' - if args[:env] == 'local' - require 'fileutils' - FileUtils.remove_file 'Gemfile.lock', true - FileUtils.remove_dir '.bundle', true - system 'bundle install --binstubs=_bin --path=.bundle' - else - system 'bundle install' - end - else - if args[:env] == 'local' - $install_gems.each do |gem| - msg "Installing #{gem}..." - system "gem install --bindir=_bin --install-dir=.bundle #{gem}" - end - else - $install_gems.each do |gem| - msg "Installing #{gem}..." - system "gem install #{gem}" - end - end - end - msg 'Run awestruct using `awestruct` or `rake`' - # Don't execute any more tasks, need to reset env - exit 0 -end - -desc 'Update the environment to run Awestruct' -task :update => :init do - if File.exist? 'Gemfile' - system 'bundle update' - else - system 'gem update awestruct' - end - # Don't execute any more tasks, need to reset env - exit 0 -end - -desc 'Build and preview the site locally in development mode' -task :preview => :check do - run_awestruct '-d' -end - -# provide a serve task for those used to Jekyll commands -desc 'An alias to the preview task' -task :serve => :preview - -desc 'Generate the site using the specified profile (default: development)' -task :gen, [:profile] => :check do |task, args| - profile = args[:profile] || 'development' - profile = 'production' if profile == 'prod' - run_awestruct "-P #{profile} -g --force" -end - -desc 'Generate the site and deploy to production' -task :deploy => :check do - run_awestruct '-P production -g --force --deploy' -end - -desc 'Clean out generated site and temporary files' -task :clean, :spec do |task, args| - require 'fileutils' - dirs = ['.awestruct', '.sass-cache', '_site'] - if args[:spec] == 'all' - dirs << '_tmp' - end - dirs.each do |dir| - FileUtils.remove_dir dir unless !File.directory? dir - end -end - -# Perform initialization steps, such as setting up the PATH -task :init do - # Detect using gems local to project - if File.exist? '_bin' - ENV['PATH'] = "_bin#{File::PATH_SEPARATOR}#{ENV['PATH']}" - ENV['GEM_HOME'] = '.bundle' - end -end - -desc 'Check to ensure the environment is properly configured' -task :check => :init do - if !File.exist? 'Gemfile' - if which('awestruct').nil? - msg 'Could not find awestruct.', :warn - msg 'Run `rake setup` or `rake setup[local]` to install from RubyGems.' - # Enable once the rubygem-awestruct RPM is available - #msg 'Run `sudo yum install rubygem-awestruct` to install via RPM. (Fedora >= 18)' - exit 1 - else - $use_bundle_exec = false - next - end - end - - begin - require 'bundler' - Bundler.setup - rescue LoadError - $use_bundle_exec = false - rescue StandardError => e - msg e.message, :warn - if which('awestruct').nil? - msg 'Run `rake setup` or `rake setup[local]` to install required gems from RubyGems.' - else - msg 'Run `rake update` to install additional required gems from RubyGems.' - end - exit e.status_code - end -end - -# Execute Awestruct -def run_awestruct(args) - system "#{$use_bundle_exec ? 'bundle exec ' : ''}awestruct #{args}" -end - -# A cross-platform means of finding an executable in the $PATH. -# Respects $PATHEXT, which lists valid file extensions for executables on Windows -# -# which 'awestruct' -# => /usr/bin/awestruct -def which(cmd, opts = {}) - unless $awestruct_cmd.nil? || opts[:clear_cache] - return $awestruct_cmd - end - - $awestruct_cmd = nil - exts = ENV['PATHEXT'] ? ENV['PATHEXT'].split(';') : [''] - ENV['PATH'].split(File::PATH_SEPARATOR).each do |path| - exts.each do |ext| - candidate = File.join path, "#{cmd}#{ext}" - if File.executable? candidate - $awestruct_cmd = candidate - return $awestruct_cmd - end - end - end - return $awestruct_cmd -end - -# Print a message to STDOUT -def msg(text, level = :info) - case level - when :warn - puts "\e[31m#{text}\e[0m" - else - puts "\e[33m#{text}\e[0m" - end -end diff --git a/_config/categories.yml b/_config/categories.yml deleted file mode 100644 index a582697..0000000 --- a/_config/categories.yml +++ /dev/null @@ -1,138 +0,0 @@ -- id: WebSocket - name: Java API for WebSocket 1.0 - jsrs: - - JSR-356 - packages: - - javax.websocket - -- id: Batch - name: Batch Processing for Java Platform 1.0 - jsrs: - - JSR-352 - packages: - - javax.batch - -- id: Concurrency - name: Concurrency Utilities for Java EE 1.0 - jsrs: - - JSR-166 - packages: - - javax.enterprise.concurrent - -- id: JSON - name: Java API for JSON Processing 1.0 - jsrs: - - JSR-353 - packages: - - javax.json - -- id: JAXRS - name: Java API for RESTful Web Services 2.0 - jsrs: - - JSR-311 - - JSR-339 - packages: - - javax.ws.rs - -- id: JMS - name: Java Message Service API 2.0 - jsrs: - - JSR-914 - packages: - - javax.jms - -- id: CDI - name: Context and Dependency Injection 1.1 - jsrs: - - JSR-299 - - JSR-346 - packages: - - javax.inject - - javax.enterprise - -- id: EJB - name: Enterprise JavaBeans 3.2 - jsrs: - - JSR-220 - - JSR-318 - - JSR-345 - packages: - - javax.ejb - -- id: EL - name: Expression Language 3.0 - jsrs: - - JSR-341 - packages: - - javax.el - -- id: JASPIC - name: Java Authentication Service Provider Interface for Containers 1.1 MR2 - jsrs: - - JSR-196 - packages: - - javax.security.auth - -- id: JavaMail - name: JavaMail 1.5 - jsrs: - - JSR-919 - packages: - - javax.mail - -- id: JCA - name: Java EE Connector Architecture 1.6 - jsrs: - - JSR-322 - packages: - - javax.resource - -- id: JPA - name: Java Persistence API 2.1 - jsrs: - - JSR-317 - packages: - - javax.persistence - -- id: JSF - name: JavaServer Faces 2.2 - jsrs: - - JSR-344 - - JSR-314 - - JSR-127 - packages: - - javax.faces - -- id: JTA - name: Java Transaction API 1.2 - jsrs: - - JSR-907 - packages: - - javax.transaction - -- id: Servlet - name: Java Servlet 3.1 - jsrs: - - JSR-340 - - JSR-315 - - JSR-154 - packages: - - javax.servlet - -- id: validation - name: Bean Validation 1.1 - jsrs: - - JSR-349 - - JSR-303 - packages: - - javax.validation - -- id: jaxws - name: Java API for XML Web Services 2.2 - jsrs: - - JSR-224 - packages: - - javax.xml.ws - - javax.jws -- id: extra - name: External Integrations diff --git a/_config/github_mapping.yml b/_config/github_mapping.yml deleted file mode 100644 index 1f53c39..0000000 --- a/_config/github_mapping.yml +++ /dev/null @@ -1,20 +0,0 @@ -- email: arun.p.gupta@oracle.com - github_id: arun-gupta -- email: argupta@argupta.csb - github_id: arun-gupta -- email: arungupta@users.noreply.github.com - github_id: arun-gupta -- email: patrik@dudits.net - github_id: pdudits -- email: contact@mgreau.com - github_id: mgreau -- email: psakar@redhat.com - github_id: psakar -- email: scherrer@openwms.org - github_id: openwms -- email: johndament@apache.org - github_id: johnament -- email: john.ament@spartasystems.com - github_id: johnament -- email: arjan.tijms@kizitos.com - github_id: arjantijms \ No newline at end of file diff --git a/_config/site.yml b/_config/site.yml deleted file mode 100644 index a13b878..0000000 --- a/_config/site.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: JavaEE Support -title: Navigate your way through EE via Tests -org: JavaEE Samples -issue_tracker: 'https://github.com/javaee-samples/javaee7-samples/issues' -base_url: '' -profiles: - development: - base_url: '' - deploy: nil # force development as the default - production: - base_url: 'https://javaee.github.io' - fingerprint_assets: true - minify: true - google_analytics: - account: UA-18727998-5 - deploy: - host: github_pages - branch: master - repository: upstream diff --git a/_ext/asciidocify.rb b/_ext/asciidocify.rb deleted file mode 100644 index 4bd2cf3..0000000 --- a/_ext/asciidocify.rb +++ /dev/null @@ -1,94 +0,0 @@ -require "asciidoctor" -require 'asciidoctor/extensions' - -module AsciiDoc - - def asciidocify(content, sample = {}) - Asciidoctor.render(content, {:attributes => {"sample" => sample, "compat-mode" => true}}) - end - - def sourcify(source, lang = "java", render = true) - parsed = outlinify(source) - block = '' - block += %Q([source,#{lang}]\n) - block += %Q(----\n) - block += %Q(#{parsed[:code]}\n) - block += %Q(----\n) - parsed[:outlines].each {|x| - block += %Q(#{x}\n) - } - - return asciidocify block if render - return block - end - - def outlinify(source) - outlines = [] - code = source.lines.collect{ - |x| - new_line = x - if new_line =~ /(.*)(<[0-9]+>) (.*)/ - outlines << "#{$2} #{$3}" - new_line = "#{$1}#{$2}\n" - end - new_line - }.join() - {:outlines => outlines, :code => code} - end - -end - -class SiteIncludeProcessor < Asciidoctor::Extensions::IncludeProcessor - include AsciiDoc - - def handles? target - true - end - - def process document, reader, target, attributes - sample = document.attributes["sample"] - target_file = target - target_method = nil - - if target =~ /(.*)#(.*)/ - target_file = $1 - target_method = $2 - end - - file = sample.sources.find {|x| x.name.eql? target_file} unless sample.sources.nil? - file = sample.tests.find {|x| x.name.eql? target_file} if file.nil? and !sample.tests.nil? - - if file.nil? - return reader.push_include "WARNING: #{target} not found", target, target, 1, attributes - end - - source = file.content - unless target_method.nil? - method = file.children.find{|x| x.name.eql? target_method} unless file.children.nil? - if method.nil? - return reader.push_include "WARNING: Method in #{target} not found", target, target, 1, attributes - end - source = method.content - end - type = File.extname(file.path)[1..-1] - block = sourcify source, type, false - reader.push_include block, target, target, 1, attributes - end -end - -Asciidoctor::Extensions.register do - include_processor SiteIncludeProcessor - - inline_macro do - named :javaapi - using_format :short - match /((?:java|javax)\.\w[\.\w]+\.[A-Z]\w+)/ - process do |parent, target| - doc_uri_pattern = 'https://javaee-spec.java.net/nonav/javadocs/%s.html' - doc_uri = doc_uri_pattern % target.gsub(/\./, '/') - link_name = target - link_name = $1 if target =~ /([A-Z]\w*$)/ - (create_anchor parent, link_name, type: :link, target: doc_uri, attributes: {'title' => target}).render - end - end -end diff --git a/_ext/identities.rb b/_ext/identities.rb deleted file mode 100644 index f9a3ffd..0000000 --- a/_ext/identities.rb +++ /dev/null @@ -1,202 +0,0 @@ -require 'json' -require_relative 'restclient_extensions' -require_relative 'identities/github' -require_relative 'identities/gravatar' -require_relative 'identities/confluence' -require_relative 'identities/jbosscommunity' - -module Awestruct::Extensions::Identities - # QUESTION should we call this Initializer or Loader instead? - class Storage - def initialize(opts = {}) - @use_data_cache = opts[:use_data_cache] || true - end - - def execute(site) - data_file = File.join(site.tmp_dir, 'datacache', 'identities.yml') - loaded = false - identities = [] - if @use_data_cache and File.exist? data_file - identities = YAML.load_file data_file - loaded = true - else - if site.identities - identities = site.identities.map{|i| OpenStruct.new i} - end - end - identities.extend(Locators) - identities.loaded = loaded - site.identities = identities - end - - module Locators - attr_accessor :loaded - - def lookup(username, create = false) - return nil if username.nil? - identity = self.find {|e| username.eql? e.username} || - self.find {|e| username.eql? e.jboss_username} - if create and identity.nil? - identity = OpenStruct.new({:username => username}) - if block_given? - yield identity - end - self << identity - end - identity - end - - def lookup_by_name(name, create = false) - return nil if name.nil? - search = name.downcase - identity = self.find {|e| search.eql? e.name.to_s.downcase} - if create and identity.nil? - identity = OpenStruct.new({:name => name}) - if block_given? - yield identity - end - self << identity - end - identity - end - - def lookup_by_emails(email) - identity = lookup_by_email(email) - identity = lookup_by_contributor_email(email) if identity.nil? - identity - end - - # contributors[].email, return unique Identity - def unique_by_emails(contributors) - contributors.map{|a| lookup_by_emails(a.email)}.uniq {|a| a.github_id } - end - - - def lookup_by_contributor_email(email) - identity = self.find {|e| e.contributor and e.contributor.emails and e.contributor.emails.include? email } - if identity.nil? - # Indication that we have a mismatched account - puts "Could not find contributor with e-mail " + contributor.email - end - identity - end - - def lookup_by_contributor(contributor) - identity = self.find {|e| e.contributor and e.contributor.emails and e.contributor.emails.include? contributor.email } - if identity.nil? - # Indication that we have a mismatched account - puts "Could not find contributor with e-mail " + contributor.email - end - identity - end - - def lookup_by_email(email, create = false) - return nil if email.nil? - identity = self.find {|e| email.eql? e.email or !e.emails.nil? and e.emails.include? email} - if create and identity.nil? - identity = OpenStruct.new({:email => email}) - if block_given? - yield identity - end - self << identity - end - identity - end - - def lookup_by_github_id(github_id, create = false) - return nil if github_id.nil? - identity = self.find {|e| github_id.eql? e.github_id} - if create and identity.nil? - identity = OpenStruct.new({:github_id => github_id}) - if block_given? - yield identity - end - self << identity - end - identity - end - - def lookup_by_twitter_username(username) - return nil if username.nil? - self.find {|e| !e.twitter.nil? and username.eql? e.twitter.username } - end - - def locate(*query) - query.map! {|e| e.downcase} - self.find {|e| not ([e.username, e.name.to_s.downcase, e.email] & query).empty? } - end - - def core_team() - self.select {|e| e.core} - end - - def contributors() - self.select {|e| e.contributor} - end - - def speakers() - self.select {|e| e.speaker} - end - - def translators() - self.select {|e| e.translator} - end - end - end - - module IdentityHelper - # SEMI-HACK this should received contributions from crawlers - def url - self.jbosscommunity ? self.jbosscommunity.profile_url : self.github.profile_url - end - - # TODO support for CSS class, or just attributes in general - def to_link - "#{self.name}" - end - - def to_s - self.name - end - end - - class Collect - def initialize(*collectors) - @collectors = collectors - end - - def execute(site) - if !site.identities.loaded - @collectors.each do |c| - c.collect(site.identities) - end - end - end - end - - class Crawl - def initialize(*crawlers) - @crawlers = crawlers - end - - def execute(site) - site.identities.each do |i| - @crawlers.each do |c| - c.crawl(i) if !site.identities.loaded - i.extend(IdentityHelper) - c.enhance(i) if c.respond_to? 'enhance' - end - end - end - end - - class Cache - def execute(site) - data_file = File.join(site.tmp_dir, 'datacache', 'identities.yml') - FileUtils.mkdir_p File.dirname data_file - File.open(data_file, 'w') do |out| - YAML.dump site.identities, out - end - end - end -end diff --git a/_ext/identities/confluence.rb b/_ext/identities/confluence.rb deleted file mode 100644 index 733b526..0000000 --- a/_ext/identities/confluence.rb +++ /dev/null @@ -1,104 +0,0 @@ -require 'pathname' - -module Identities - module Confluence - class Crawler - SESSION_PATH = '/rest/prototype/1/session' - SEARCH_PATH = '/rest/prototype/1/search/user' - SEARCH_PARAM = 'query' - - # Public: Initialize a Crawler - # - # base_url - The String of the base confluence url, no trailing slash - # opts[:assign_to] - The String OpenStruct keys to send the data - # opts[:identity_search_keys] - The String OpenStruct keys to use to locate the search query - # opts[:assign_username_to] - The String OpenStruct key to which to assign the username - # opts[:auth_file] - The File containing the authentication credentials for secure requests - def initialize(base_url, opts = {}) - @base_url = base_url - @identity_search_keys = opts[:identity_search_keys] || ['name'] - @assign_to = opts[:assign_to] || 'confluence' - @assign_username_to = opts[:assign_username_to] - @auth_file = opts[:auth_file] - @session_cookie = nil - end - - def crawl(identity) - search = nil - queries = [] - data = nil - return unless identity.send(@assign_username_to).nil? - @identity_search_keys.each do |k| - search = identity.send(k) - next if search.nil? - # lowercase and remove middle names (shouldn't affect usernames) - search = search.downcase.gsub(/^([^ ]+ ?).*?([^ ]+)$/, '\1\2') - # don't search on same string twice - next if queries.include? search - queries << search - cleansed_query = search.gsub(' ', '-') - url = File.join(@base_url, SEARCH_PATH) + '?query=' + URI.encode(search) - data = RestClient.get(url, :cache_key => "confluence/query-#{cleansed_query}.json", :accept => 'application/json') - if data['totalSize'].to_i == 0 - #puts "No results, advancing confluence user crawler to next query string for #{search}" - data = nil - #elsif data['totalSize'] > 1 - # puts "Too many results, skipping confluence user crawler for #{search}." - # data = nil - else - break - end - end - - if data.nil? - if queries.empty? - puts "No property found to search, skipping confluence user crawler for #{identity.name}" - else - puts "No results, skipping confluence user crawler for #{queries.join ' / '}" - end - return - end - - user = data['result'].first - username = user['username'] - url = user['link'].select{|l| l['href'].end_with? "~#{username}" }.first['href'] - identity.send(@assign_to + '=', OpenStruct.new({:username => username, :profile_url => url})) - if !@assign_username_to.nil? - identity.send(@assign_username_to + '=', username) - end - - get_session_cookie() - if @session_cookie - profile = RestClient.get(url, :cache_key => "confluence/user-#{username}.html", :cookie => @session_cookie) - if profile.match(/ id="email".*?>(.+?) '.', ' at ' => '@'} - email = $1.gsub(/ (dot|at) /) {|m| replace[m]} - identity.email = email if identity.email.nil? - identity.emails ||= [] - identity.emails |= [identity.email, email] - end - end - - end - - def get_session_cookie() - if @session_cookie.nil? - @session_cookie = false - credentials = nil - if !@auth_file.nil? - if File.exist? @auth_file - credentials = File.read(@auth_file) - elsif Pathname.new(@auth_file).relative? and File.exist? File.join(ENV['HOME'], @auth_file) - credentials = File.read(File.join(ENV['HOME'], @auth_file)) - end - end - if !credentials.nil? - url = @base_url.gsub(/^(https?:\/\/)/, '\1' + credentials.chomp + '@') + SESSION_PATH - response = RestClient.head(url) - @session_cookie = response.headers[:set_cookie].first.split(';').first - end - end - end - end - end -end diff --git a/_ext/identities/github.rb b/_ext/identities/github.rb deleted file mode 100644 index becafbb..0000000 --- a/_ext/identities/github.rb +++ /dev/null @@ -1,221 +0,0 @@ -module Identities - module GitHub - CONTRIBUTORS_URL_TEMPLATE = 'https://api.github.com/repos/%s/%s/contributors' - TEAM_MEMBERS_URL_TEMPLATE = 'https://api.github.com/teams/%s/members' - USER_URL_TEMPLATE = 'https://api.github.com/users/%s' - PROFILE_URL_TEMPLATE = 'https://api.github.com/users/%s' - - # It appears that all github users have a gravatar_id - AVATAR_URL_TEMPLATE = 'http://gravatar.com/avatar/%s?s=%i' - # TODO make the default avatar configurable - FALLBACK_AVATAR_URL_TEMPLATE = 'https://community.jboss.org/people/sbs-default-avatar/avatar/%i.png' - module IdentityHelper - def avatar_url(size = 48) - if !self.gravatar_id.nil? - AVATAR_URL_TEMPLATE % [self.gravatar_id, size] - else - FALLBACK_URL_TEMPLATE % size - end - end - end - - class Collector - - def initialize(opts = {}) - @repositories = [] - @match_filters = [] - @teams = opts[:teams] - end - - def add_repository(repository) - @repositories << repository - end - - def add_match_filter(match_filter) - @match_filters << match_filter - #File.open('/tmp/committers.yml', 'w') do |out| - # YAML.dump(match_filter, out) - #end - end - - def collect(identities) - visited = [] - @repositories.each do |r| - url = CONTRIBUTORS_URL_TEMPLATE % [ r.owner, r.path ] - contributors = RestClient.get url, :accept => 'application/json' - contributors.each do |acct| - github_id = acct['login'].downcase - author = nil - @match_filters.each do |filter| - author = filter.values.find{|candidate| candidate.github_id.eql? github_id } - break unless author.nil? - end - if author.nil? - #puts "Skipping non-Arquillian contributor #{github_id} in repository #{r.owner}/#{r.path}" - next - end - identity = identities.lookup_by_github_id(github_id, true) - github_acct_to_identity(acct, author, identity) - visited << github_id - end - end - - # github doesn't keep perfect records of contributors, so handle those omitted contributors - @match_filters.each do |filter| - filter.values.select{|author| !author.github_id.nil? and !visited.include? author.github_id}.each do |author| - github_id = author.github_id - puts "Manually adding #{author.name} (#{github_id}) as a contributor" - url = USER_URL_TEMPLATE % [ github_id ] - user = RestClient.get url, :accept => 'application/json' - identity = identities.lookup_by_github_id(github_id, true) - github_acct_to_identity(user, author, identity) - end - end - - if !@teams.nil? - @teams.each do |team| - url = TEAM_MEMBERS_URL_TEMPLATE % team[:id] - members = RestClient.get(url, :accept => 'application/json') - members.each do |m| - github_id = m['login'] - identity = identities.lookup_by_github_id(github_id) - # identity should not be null, mostly for testing - if !identity.nil? - identity.send(team[:name] + '=', true) - identity.teams = [] if identity.teams.nil? - identity.teams << team[:name] - end - end - end - end - end - - def github_acct_to_identity(acct, author, identity) - # setup if first visit - if identity.github.nil? or identity.github.contributions.nil? - identity.github = OpenStruct.new if identity.github.nil? - identity.github.contributions = acct.has_key?('contributions') ? acct['contributions'] : 0 - identity.github_url = acct['url'].downcase - identity.gravatar_id = acct['gravatar_id'] - # author contains the commits we counted from analyzing the repositories - identity.contributor = author - identity.email = author.emails.first if identity.email.nil? - identity.emails ||= [] - identity.emails |= [identity.email, author.emails.first] - # alias for convenience - identity.commits = author.commits - # assume they want their commit name as the preferred name (unless it's an email) - if identity.name.nil? and author.name.index('@').nil? - if !author.name.index(' ').nil? - # FIXME this could be made into a smarter utility function - identity.name = author.name.split(' ').map{|n| n.capitalize}.join(' ') - # special exception for Lincoln :) - identity.name.sub!('Iii', 'III') - else - identity.name = author.name.capitalize - end - end - # if been there, just add contributions according to github - else - identity.github.contributions += acct.has_key?('contributions') ? acct['contributions'] : 0 - end - end - - end - - class Auth - def initialize(auth_file = '.github-auth') - @auth_file = auth_file - @token = nil - end - - def supports?(url) - url =~ /.*github.com.*/ - end - - def invoke(request) - token = get_token - request.processed_headers["Authorization"] = "token #{token}" unless token.nil? - end - - def get_token() - if @token.nil? - @token = false - if !@auth_file.nil? - if File.exist? @auth_file - @token = File.read(@auth_file) - elsif Pathname.new(@auth_file).relative? and File.exist? File.join(ENV['HOME'], @auth_file) - @token = File.read(File.join(ENV['HOME'], @auth_file)) - end - end - end - @token - end - end - - class Crawler - - def initialize(opts = {}) - end - - def enhance(identity) - identity.extend(IdentityHelper) - end - - def crawl(identity) - url = identity.github_url - if url.nil? - if !identity.github_id.nil? - url = PROFILE_URL_TEMPLATE % identity.github_id - end - end - - # can't find user, give up (no github id or explicit url) - if url.nil? - return - end - - data = RestClient.get url, :accept => 'application/json' - identity.github_id = data['login'].downcase - identity.username = identity.github_id - identity.github = OpenStruct.new if identity.github.nil? - identity.github.merge!(OpenStruct.new({ - :id => data['id'], - :created => data['created_at'], - :username => identity.username, - :profile_url => data['html_url'].downcase - })) - # only overwrite name if it's longer than the one already there - if !data['name'].nil? and (identity.name.nil? or data['name'].length > identity.name.length) - identity.name = data['name'].titleize - end - identity.emails ||= [] - identity.emails |= [identity.email].compact - keys_to_identity = ['email', 'gravatar_id', 'blog', 'location', 'bio', 'company'] - # merge keys, overwriting duplicates - identity.merge!(OpenStruct.new(data.select{|k, v| - !v.to_s.strip.empty? and keys_to_identity.include? k - })) - if identity.email - identity.email = identity.email.downcase - end - # append email if we got a new one - identity.emails |= [identity.email] - # fix blog urls missing http:// prefix - if !identity.blog.nil? and identity.blog !~ /^https?:\/\// - identity.blog = 'http://' + identity.blog - end - - # manually credited commits - if identity.commits and !identity.contributor - identity.contributor = OpenStruct.new({ - :commits => identity.commits, - :emails => [identity.email], - :name => identity.name - }) - end - end - - end - end -end diff --git a/_ext/identities/gravatar.rb b/_ext/identities/gravatar.rb deleted file mode 100644 index af983a7..0000000 --- a/_ext/identities/gravatar.rb +++ /dev/null @@ -1,112 +0,0 @@ -require 'digest/md5' - -module Identities - module Gravatar - - class Crawler - API_URL_TEMPLATE = 'http://en.gravatar.com/%s.json' - LANYRD_PROFILE_URL_TEMPLATE = 'http://lanyrd.com/profile/%s' - def enhance(identity) - #identity.extend(IdentityHelper) - end - - def crawl(identity) - hash = identity.gravatar_id - if hash.nil? - hash = Digest::MD5.new().update(identity.email.downcase).hexdigest - end - url = API_URL_TEMPLATE % hash - response = RestClient.get(url, :user_agent => "rest-client") do |rsp, req, res, &blk| - if rsp.code.eql? 404 - rsp = RestClient::Response.create('{}', rsp.net_http_res, rsp.args) - rsp.instance_variable_set(:@code, 200) - rsp - else - rsp.return!(req, res, &blk) - end - end - - data = JSON.parse response - if data.empty? - return - end - - entry = data['entry'].first - # update with found hash. should be the same, but if we created it, we need to set identity - identity.gravatar_id = entry['hash'] - keys_to_gravatar = { - 'id' => 'id', - 'hash' => 'hash', - 'profileUrl' => 'profile_url' - } - identity.gravatar = OpenStruct.new(entry.select {|k, v| - !v.to_s.strip.empty? and keys_to_gravatar.has_key? k - }.inject({}) {|h,(k,v)| h.store(keys_to_gravatar[k], v); h}) - - keys_to_identity = { - 'preferredUsername' => 'preferred_username', - 'displayName' => 'name_cloak', - 'aboutMe' => 'bio', - 'currentLocation' => 'location' - } - identity.merge!(OpenStruct.new(entry.select {|k, v| - !v.to_s.strip.empty? and keys_to_identity.has_key? k - }.inject({}) {|h,(k,v)| h.store(keys_to_identity[k], v); h}), false) - - # TODO check if we need a merge here - if entry.has_key? 'name' and !(entry['name'].is_a? Array) and !(name = entry['name'].to_s.strip).empty? - if identity.names.nil? - identity.names = OpenStruct.new(entry['name']) - end - if identity.name.nil? - identity.name = identity.names.formatted - end - end - - if entry.has_key? 'email' and !entry['email'].to_s.strip.empty? - email = entry['email'].downcase - identity.email = email if identity.email.nil? - identity.emails ||= [] - identity.emails |= [identity.email, email] - end - - (entry['accounts'] || []).each do |a| - astruct = OpenStruct.new(a) - if identity.send(a['shortname']).nil? - identity.send(a['shortname'] + '=', astruct) - else - identity.send(a['shortname']).merge!(astruct) - end - end - - # grab twitter usernames supplied by _config/identities.yml - if identity.twitter.nil? and !identity.twitter_username.nil? - identity.twitter = OpenStruct.new({ - :username => identity.twitter_username, - :url => 'http://twitter.com/' + identity.twitter_username - }) - end - - # QUESTION do we need the speaker flag check? - if identity.speaker and !identity.twitter.nil? and identity.lanyrd.nil? - identity.lanyrd = OpenStruct.new({ - :username => identity.twitter.username, - :profile_url => LANYRD_PROFILE_URL_TEMPLATE % identity.twitter.username - }) - end - - # FIXME either map url to profile_url, or change everywhere else - (entry['urls'] || []).each do |u| - identity.urls = [] if identity.urls.nil? - identity.urls << OpenStruct.new(u) - if identity.blog.to_s.empty? and u['title'] =~ /blog/i - identity.blog = u['value'] - end - if identity.homepage.to_s.empty? and u['title'] =~ /personal/i - identity.homepage = u['value'] - end - end - end - end - end -end diff --git a/_ext/identities/jbosscommunity.rb b/_ext/identities/jbosscommunity.rb deleted file mode 100644 index 27538ab..0000000 --- a/_ext/identities/jbosscommunity.rb +++ /dev/null @@ -1,30 +0,0 @@ -module Identities - module JBossCommunity - class Crawler - PROFILE_URL_TEMPLATE = 'https://community.jboss.org/people/%s' - - def crawl(identity) - if !identity.jboss_username.nil? - identity.jbosscommunity = OpenStruct.new({ - :username => identity.jboss_username, - :profile_url => PROFILE_URL_TEMPLATE % identity.jboss_username - }) - end - - if identity.jbosscommunity.nil? and !identity.urls.nil? - identity.urls.each do |u| - if u.title =~ /jboss community/i - identity.jbosscommunity = OpenStruct.new({ - :username => u.value.split('/').last, - :profile_url => u.value - }) - identity.jboss_username = identity.jbosscommunity.username - break - end - end - end - # TODO actually rip data from community.jboss.org - end - end - end -end diff --git a/_ext/javadoc.rb b/_ext/javadoc.rb deleted file mode 100644 index 837b8cd..0000000 --- a/_ext/javadoc.rb +++ /dev/null @@ -1,37 +0,0 @@ -require 'java' -raise "Missing JAVA_HOME, require tools.jar" unless ENV['JAVA_HOME'] - -$CLASSPATH << "#{ENV['JAVA_HOME']}/lib/tools.jar" - -module Java - module Doc - - def self.parse(source_path, quiet = true, &block) - context = com.sun.tools.javac.util.Context.new - - options = com.sun.tools.javac.util.Options.instance context - options.put '-sourcepath', source_path - options.put '-Xmaxerrs', '1' - options.put '-Xmaxwarns', '1' - - # Silence!! - out = java.io.PrintWriter.new java.io.StringWriter.new - com.sun.tools.javadoc.Messager.preRegister context, "javadoc", out, out, out - - tool = com.sun.tools.javadoc.JavadocTool.make0 context - - sub_packages = com.sun.tools.javac.util.List.of 'org', 'com' - options_list = com.sun.tools.javac.util.List.nil - empty = com.sun.tools.javac.util.List.nil - filter = com.sun.tools.javadoc.ModifierFilter.new com.sun.tools.javadoc.ModifierFilter::ALL_ACCESS - - com.sun.tools.javadoc.DocEnv.instance(context).silent = quiet - - root = tool.getRootDocImpl('en', 'ascii', filter, empty, empty, options_list, false, sub_packages, empty, false, false, quiet) - - block.call(root) if block - return root - end - - end -end diff --git a/_ext/javaeesamples.rb b/_ext/javaeesamples.rb deleted file mode 100644 index 6b20c63..0000000 --- a/_ext/javaeesamples.rb +++ /dev/null @@ -1,418 +0,0 @@ -# encoding: utf-8 -require 'git' -require 'fileutils' -require 'rexml/document' -require_relative 'repository' - -module Awestruct::Extensions::Repository::Visitors - module Clone - include Base - - def visit(repository, site) - repos_dir = nil - if site.repos_dir - repos_dir = site.repos_dir - else - repos_dir = File.join(site.tmp_dir, 'repos') - end - if !File.directory? repos_dir - FileUtils.mkdir_p(repos_dir) - end - clone_dir = File.join(repos_dir, repository.path) - rc = nil - if !File.directory? clone_dir - puts "Cloning repository #{repository.clone_url} -> #{clone_dir}" - rc = Git.clone(repository.clone_url, clone_dir) - if repository.master_branch.nil? - rc.checkout(repository.master_branch) - else - repository.master_branch = rc.current_branch - end - else - puts "Using cloned repository #{clone_dir}" - rc = Git.open(clone_dir) - master_branch = repository.master_branch - if master_branch.nil? - master_branch = rc.branches.find{|b| !b.remote and !(b.name.include? 'detached' or b.name.include? 'no branch')}.name - repository.master_branch = master_branch - end - rc.checkout(master_branch) - begin - # attempt a light pull - rc.pull('origin') - rescue - # do hard reset to master branch, some forced change might have occured upstream - rc.fetch('origin') - rc.reset_hard("origin/#{master_branch}") - end - end - repository.clone_dir = clone_dir - repository.client = rc - end - end - - module RepositoryHelpers - # Retrieves the contributors between the two commits, filtering - # by the relative path, if present - def self.resolve_contributors_between(site, repository, sha1, sha2, update_index = true) - range_author_index = {} - RepositoryHelpers.resolve_commits_between(repository, sha1, sha2).map {|c| - # we'll use email as the key to finding their identity; the sha we just need temporarily - # clear out bogus characters from email and downcase - OpenStruct.new({:name => c.author.name, :email => c.author.email.downcase.gsub(/[^\w@\.\(\)]/, ''), :commits => 0, :sha => c.sha}) - }.each {|e| - # This loop both grabs unique authors by email and counts their commits - if !range_author_index.has_key? e.email - range_author_index[e.email] = e - end - range_author_index[e.email].commits += 1 - } - - range_author_index.values.each {|e| - # this loop registers author in global index if not present - if repository.host.eql? 'github.com' and update_index - site.git_author_index[e.email] ||= OpenStruct.new({ - :email => e.email, - :name => e.name, - :sample_commit_sha => e.sha, - :sample_commit_url => RepositoryHelpers.build_commit_url(repository, e.sha, 'json'), - :commits => 0, - :repositories => [] - }) - site.git_author_index[e.email].commits += e.commits - site.git_author_index[e.email].repositories |= [repository.html_url] - end - e.delete_field('sha') - }.sort {|a, b| a.name <=> b.name} - end - - # Retrieves the commits in the range, filtered on the relative - # path in the repository, if present - def self.resolve_commits_between(repository, sha1, sha2) - rc = repository.client - log = rc.log(10000).path(repository.relative_path) - if sha1.nil? - log = log.object(sha2) - else - log = log.between(sha1, sha2) - end - end - - def self.build_commit_url(repository, sha, ext) - if !repository.commits_url.nil? - url = repository.commits_url.gsub(/\{.*/, "/#{sha}") - else - url = repository.html_url + '/commit/' + sha + '.' + ext - end - return url - end - end - - module MavenHelpers - - # Traverse all modules recursivly in a repository from a given rev:root - def self.traverse_modules(rev, repository) - pomrev = repository.client.revparse("#{rev}pom.xml") - pom = REXML::Document.new(repository.client.cat_file(pomrev)) - yield rev, pom - - unique_modules = Set.new - pom.each_element('/project/modules/module') do |mod| - unique_modules << mod.text() - end - pom.each_element('/project/profiles/profile/modules/module') do |mod| - unique_modules << mod.text() - end - - unique_modules.each do |submodule| - MavenHelpers.traverse_modules("#{rev}#{submodule}/", repository) { |y, x| yield(y, x)} - end - end - - def self.to_relative_sub_path(rev, relative_repository_path) - rev.gsub(/.*:/, '').gsub(relative_repository_path, '') - end - end - - # SEMI-HACK think about how best to curate & display info about these special repos - # FIXME at least try to make GenericMavenComponent build on this one; perhaps a website component? - module GenericComponent - include Base - def handles(repository) - !File.exist? File.join(repository.clone_dir, repository.relative_path, 'pom.xml') - end - - def visit(repository, site) - rc = repository.client - c = OpenStruct.new({ - :repository => repository, - :basepath => repository.path.eql?(repository.owner) ? repository.path : repository.path.sub(/^#{repository.owner}-/, ''), - :owner => repository.owner, - :name => repository.name, - :desc => repository.desc, - :contributors => [] - }) - # FIXME not dry (from below)! - RepositoryHelpers.resolve_contributors_between(site, repository, nil, rc.revparse('HEAD')).each do |contrib| - i = c.contributors.index {|n| n.email == contrib.email} - if i.nil? - c.contributors << contrib - else - c.contributors[i].commits += contrib.commits - end - end - end - end - - module GenericMavenComponent - include Base - - def initialize - @root_head_pom = nil - end - - def handles(repository) - repository.path != 'arquillian-showcase' and - repository.path != 'arquillian-container-reloaded' and - File.exist? File.join(repository.clone_dir, repository.relative_path, 'pom.xml') - #repository.path =~ /^arquillian-(core$|(testrunner|container|extension)-.+$)/ and - # repository.path != 'arquillian-testrunner-jbehave' - end - - def visit(repository, site) - @root_head_pom = nil - rc = repository.client - c = OpenStruct.new({ - :repository => repository, - :basepath => repository.path.eql?(repository.owner) ? repository.path : repository.path.sub(/^#{repository.owner}-/, ''), - :key => repository.path.split('-').last, # this is how components are matched in jira - :owner => repository.owner, - :html_url => repository.relative_path.empty? ? repository.html_url : "#{repository.html_url}/tree/#{repository.master_branch}/#{repository.relative_path.chomp('/')}", - :external => !repository.owner.eql?('arquillian'), - :name => resolve_name(repository), - :desc => repository.desc, - :groupId => resolve_group_id(repository), - :parent => true, - :lead => resolve_current_lead(repository, site.component_leads), - # we should not assume the license for external modules (hardcoding is not ideal either) - :license => ['jbossas', 'wildfly' 'jsfunit'].include?(repository.owner) ? 'LGPL-2.1' : 'Apache-2.0', - :releases => [], - :contributors => [] - }) - prev_sha = nil - rc.tags.select {|t| - # supports formats: 1.0.0.Alpha1 - #t.name =~ /^[1-9]\d*\.\d+\.\d+\.((Alpha|Beta|CR)[1-9]\d*|Final)$/ - # supports formats: 1.0.0.Alpha1 or 1.0.0-alpha-1 or with prefix- or 1.0.0 or 0.1 - t.name =~ /^([a-z]+-?)?[0-9]\d*\.\d+(\.\d+)?([\.-]((alpha|beta|cr)-?[1-9]\d*|final))?$/i - }.sort_by{|t| rc.gcommit(t).author_date}.each do |t| - # skip tag if arquillian has nothing to do with it - next if repository.relative_path and rc.log(1).object(t.name).path(repository.relative_path).size.zero? - # for some reason, we have to use ^0 to get to the actual commit, can't use t.sha - sha = rc.revparse(t.name + '^0') - commit = rc.gcommit(sha) - committer = commit.committer - release = OpenStruct.new({ - :tag => t.name, - :version => t.name.gsub(/^([a-z]+-?)/, ''), - :key => (c.key.eql?('core') ? '' : c.key + '_') + t.name, # jira release version key, should we add owner? - #:license => 'track?', - :sha => sha, - :html_url => RepositoryHelpers.build_commit_url(repository, sha, 'html'), - :json_url => RepositoryHelpers.build_commit_url(repository, sha, 'json'), - :date => commit.author_date, - :released_by => OpenStruct.new({ - :name => committer.name, - :email => committer.email.downcase - }), - :contributors => RepositoryHelpers.resolve_contributors_between(site, repository, prev_sha, sha), - :published_artifacts => [] - }) - if site.resolve_published_artifacts and repository.owner.eql? 'arquillian' - resolve_published_artifacts(site.dir, repository, release) - end - # not assigning to release for now since it can be very space intensive - #if site.release_notes_by_version.has_key? release.key - # release.issues = site.release_notes_by_version[release.key] - #end - depversions = resolve_dep_versions(repository, release.tag) - release.compiledeps = [] - { - 'arquillian' => 'Arquillian Core', - 'arquillian_core' => 'Arquillian Core', - 'jboss_arquillian_core' => 'Arquillian Core', - 'org_jboss_arquillian' => 'Arquillian Core', - 'org_jboss_arquillian_core' => 'Arquillian Core', - 'arquillian_drone' => 'Arquillian Drone', - 'arquillian_warp' => 'Arquillian Warp', - 'arquillian_transaction' => 'Arquillian Transaction', - 'org_jboss_arquillian_graphene' => 'Arquillian Graphene', - 'shrinkwrap_shrinkwrap' => 'ShrinkWrap Core', - 'jboss_shrinkwrap' => 'ShrinkWrap Core', - 'shrinkwrap' => 'ShrinkWrap Core', - 'shrinkwrap_descriptors' => 'ShrinkWrap Descriptors', - 'shrinkwrap_descriptor' => 'ShrinkWrap Descriptors', - 'shrinkwrap_resolver' => 'ShrinkWrap Resolvers', - 'selenium' => 'Selenium', - 'junit_junit' => 'JUnit', - 'testng_testng' => 'TestNG', - 'spock' => 'Spock' - }.each do |key, name| - if depversions.has_key? key - release.compiledeps << OpenStruct.new({:name => name, :key => key, :version => depversions[key]}) - end - end - c.releases << release - prev_sha = sha - end - c.latest_version = (!c.releases.empty? ? c.releases.last.version : resolve_head_version(repository)) - c.latest_tag = (!c.releases.empty? ? c.releases.last.tag : 'HEAD') - c.releases.each do |r| - # FIXME not dry! - r.contributors.each do |contrib| - i = c.contributors.index {|n| n.email == contrib.email} - if i.nil? - c.contributors << contrib - else - c.contributors[i].commits += contrib.commits - end - end - end - # FIXME not dry! - RepositoryHelpers.resolve_contributors_between(site, repository, prev_sha, rc.revparse('HEAD')).each do |contrib| - i = c.contributors.index {|n| n.email == contrib.email} - if i.nil? - c.contributors << contrib - else - c.contributors[i].commits += contrib.commits - end - end - - # we can be pretty sure we'll have at least one commit, otherwise why the repository ;) - last = rc.log(1).path(repository.relative_path).first - c.last_commit = OpenStruct.new({ - :author => last.author, - :date => last.date, - :message => last.message, - :sha => last.sha, - :html_url => RepositoryHelpers.build_commit_url(repository, last.sha, 'html'), - :json_url => RepositoryHelpers.build_commit_url(repository, last.sha, 'json') - }) - c.unreleased_commits = RepositoryHelpers.resolve_commits_between(repository, prev_sha, rc.revparse('HEAD')).size - - c.modules = [] - site.components[repository.path] = c - end - - def resolve_name(repository) - pom = load_root_head_pom(repository) - name = pom.root.text('name') - # FIXME note misspelling of Aggregator in Drone extension - name.nil? ? repository.path : name.gsub(/[ :]*(Aggregator|Agreggator|Parent|module)+/, '') - end - - def resolve_group_id(repository) - pom = load_root_head_pom(repository) - pom.root.text('groupId') || pom.root.elements['parent'].text('groupId') - end - - def resolve_head_version(repository) - pom = load_root_head_pom(repository) - pom.root.text('version') - end - - # QUESTION should we track lead by release version? (for historical reasons) - def resolve_current_lead(repository, component_leads) - if !component_leads.nil? and component_leads.has_key? repository.path - lead = component_leads[repository.path] - else - lead = nil - pom = load_root_head_pom(repository) - pom.each_element('/project/developers/developer') do |dev| - # capture first developer as fallback lead - if lead.nil? and !dev.text('email').nil? - lead = OpenStruct.new({:name => dev.text('name'), :email => dev.text('email').downcase}) - end - - if !dev.elements['roles'].nil? - if !dev.elements['roles'].elements.find { |role| role.name.eql? 'role' and role.text =~ / Lead/ }.nil? - lead = OpenStruct.new({:name => dev.text('name'), :email => dev.text('email').downcase}) - break - end - end - end - if lead.nil? - # FIXME parameterize (keep in mind the JIRA extension hits most of the leads) - if repository.path.eql? 'jboss-as' or repository.path.eql? 'wildfly' - lead = OpenStruct.new({ - :name => 'Jason T. Greene', - :jboss_username => 'jason.greene' - }) - elsif repository.path.eql? 'plugin-arquillian' - lead = OpenStruct.new({ - :name => 'Paul Bakker', - :jboss_username => 'pbakker' - }) - elsif repository.path.eql? 'arquillian-graphene' - lead = OpenStruct.new({ - :name => 'Lukáš Fryč', - :jboss_username => 'lfryc' - }) - elsif repository.owner.eql? 'arquillian' - lead = OpenStruct.new({ - :name => 'Aslak Knutsen', - :jboss_username => 'aslak' - }) - elsif repository.path.eql? 'tomee' - lead = OpenStruct.new({ - :name => 'David Blevins', - :jboss_username => 'dblevins' - }) - end - end - # update the global index (why not?) - if !lead.nil? - component_leads[repository.path] = lead - end - end - lead - end - - def resolve_dep_versions(repository, rev) - rc = repository.client - versions = {} - # FIXME Android extension defines versions in android-bom/pom.xml - ['pom.xml', 'build/pom.xml', 'android-bom/pom.xml', "#{repository.relative_path}pom.xml"].each do |path| - # skip if path is not present in this revision - next if rc.log(1).object(rev).path(path).size.zero? - - pom = REXML::Document.new(rc.cat_file(rc.revparse("#{rev}:#{path}"))) - pom.each_element('/project/properties/*') do |prop| - if (prop.name.start_with? 'version.' or prop.name.end_with? '.version') and - not prop.name =~ /[\._]plugin$/ and - not prop.name =~ /\.maven[\._]/ - versions[prop.name.sub(/\.?version\.?/, '').gsub('.', '_')] = prop.text - end - end - end - versions - end - - def resolve_published_artifacts(sitedir, repository, release) - rc = repository.client - rc.checkout(release.sha) - if File.exist? File.join(repository.clone_dir, 'pom.xml') - artifacts = `cd #{repository.clone_dir} && #{sitedir}/_bin/list-reactor-artifacts`.split("\n") - release.published_artifacts = artifacts.map{|a| Artifact::Coordinates.parse a}.sort_by{|a| a.artifactId} - end - rc.checkout(repository.master_branch) - end - - def load_root_head_pom(repository) - @root_head_pom ||= REXML::Document.new( - repository.client.cat_file(repository.client.revparse("HEAD:#{repository.relative_path}pom.xml")) - ) - end - end - -end diff --git a/_ext/jenkins.rb b/_ext/jenkins.rb deleted file mode 100644 index 4f35a02..0000000 --- a/_ext/jenkins.rb +++ /dev/null @@ -1,106 +0,0 @@ -module Awestruct::Extensions::Jenkins - - API_URL = "%s/api/json?pretty" - TEST_RESULTS = "%s/lastCompletedBuild/testReport/api/json?pretty" - - class Jobs - DURATION_1_DAY = 60 * 60 * 24 - - def initialize(base_url) - @base_url = base_url - end - - def execute(site) - - site.results = OpenStruct.new - site.results.extend(Locators) - site.results.containers = [] - site.results.tests = {} - - jobs_overview_url = API_URL % [@base_url] - jobs_overview = RestClient.get jobs_overview_url, :accept => 'application/json', :cache_expiry_age => DURATION_1_DAY - jobs_overview['jobs'].select{|j|j['name'] =~ /javaee7-samples-*/i}.each do |job| - - container = nil - if job['name'] =~ /javaee7-samples-([A-Za-z0-9 \.]+).*/i - name = $1 - container = site.results.containers.find{|c|c.name.eql? name} - if container.nil? - container = OpenStruct.new - container.name = $1 - site.results.containers << container - end - else - return #ignore unknown name pattern - end - - result_url = TEST_RESULTS % [job['url']] - result = nil - begin - result = RestClient.get result_url, :accept => 'application/json', :cache_expiry_age => DURATION_1_DAY - rescue Exception => e - puts "Could not download lastCompletedBuild for #{job['name']}" - puts e.message - end - next if result.nil? - - result['childReports'].each do |childReports| - childReports['result']['suites'].each do |suites| - suites['cases'].each do |c| - - class_name = c['className'] - test_name = c['name'] - - test = site.results.tests[class_name] - if test.nil? - test = OpenStruct.new - test.class_name = class_name - test.children = {} - site.results.tests[class_name] = test - end - - method = test.children[test_name] - if method.nil? - method = OpenStruct.new - method.name = test_name - method.status = {} - test.children[test_name] = method - end - - method.status[container] = c['status'] - end - end - end - end - - #puts site.results - end - - module Locators - - def summary_by_sample(sample) - return {} if sample.tests.nil? - a = sample.tests.map{ - |test| - summary_by_testclass(test.qualified_name, test) - }.inject{|a, b| a.merge(b) {|k, x, y| x and y}} - return a - end - - def summary_by_testclass(qualified_name, scenario) - results = self.tests[qualified_name] - return {} if results.nil? - result = {} - number_of_tests = scenario.children.select{|x| x.is_test}.size - for value in results.children.each_value - value.status.each{ - |k, v| - result[k.name] ||= 0; result[k.name] +=1 if v.eql? "PASSED" - } - end - result.each{|k, v| result[k] = v == number_of_tests ? true : false} - end - - end - end -end diff --git a/_ext/pipeline.rb b/_ext/pipeline.rb deleted file mode 100644 index d1e13e6..0000000 --- a/_ext/pipeline.rb +++ /dev/null @@ -1,49 +0,0 @@ -require 'slim' -require 'zurb-foundation' -require './_ext/tweakruby.rb' -require './_ext/restclient_extensions_enabler.rb' -require './_ext/identities.rb' -require './_ext/repository.rb' -require './_ext/javaeesamples.rb' -require './_ext/jenkins.rb' -require './_ext/samples.rb' -require './_ext/asciidocify.rb' - -Awestruct::Extensions::Pipeline.new do - - # GitHub API calls should be wrapped with credentials to up limit - github_auth = Identities::GitHub::Auth.new('.github-auth') - github_collector = Identities::GitHub::Collector.new(:teams => - [] - ) - - extension Awestruct::Extensions::RestClientExtensions::EnableAuth.new([github_auth]) - extension Awestruct::Extensions::RestClientExtensions::EnableGetCache.new - extension Awestruct::Extensions::RestClientExtensions::EnableJsonConverter.new - - extension Awestruct::Extensions::Identities::Storage.new - - extension Awestruct::Extensions::Repository::Collector.new(:observers => [github_collector]) - extension Awestruct::Extensions::Identities::Collect.new(github_collector) - extension Awestruct::Extensions::Identities::Crawl.new( - Identities::GitHub::Crawler.new, - Identities::Gravatar::Crawler.new - ) - - extension SampleExtension.new - - # Indexifier moves HTML files to their own directory to achieve "pretty" URLs (e.g., features.html -> /features/index.html) - extension Awestruct::Extensions::Indexifier.new - extension Awestruct::Extensions::Sitemap.new - - extension Awestruct::Extensions::Jenkins::Jobs.new('https://javaee-support.ci.cloudbees.com/') - - # Must be after all other extensions that might populate identities - extension Awestruct::Extensions::Identities::Cache.new - - # Transformers - transformer Awestruct::Extensions::Minify.new([:js]) - - helper Awestruct::Extensions::GoogleAnalytics - helper AsciiDoc -end diff --git a/_ext/repository.rb b/_ext/repository.rb deleted file mode 100644 index a0755e1..0000000 --- a/_ext/repository.rb +++ /dev/null @@ -1,212 +0,0 @@ -require_relative 'restclient_extensions' -require 'rexml/document' -require 'uri' - -module Awestruct - module Extensions - module Repository - - # FIXME make collectors modular, so that we register an ohloh collector for instance - class Collector - def initialize(opts = {}) - @repositories = [] - @use_data_cache = opts[:use_data_cache] || true - @observers = opts[:observers] || [] - end - - def execute(site) - - @repositories << OpenStruct.new( - :path => 'javaee7-samples', - :desc => nil, - :relative_path => './', - :owner => 'javaee-samples', - :host => 'github.com', - :type => 'git', - :html_url => 'https://github.com/javaee-samples/javaee7-samples', - :clone_url => 'git://github.com/javaee-samples/javaee7-samples.git' - ) - - @repositories.sort! {|a,b| a.path <=> b.path } - - # get the description for each github repository - # TODO this may need review for efficiency - @repositories.map {|r| - r.owner if r.host == 'github.com' - }.uniq.each {|org_name| - more_pages = true - org_url = "https://api.github.com/orgs/#{org_name}/repos" - while more_pages - org_repos_data = RestClient.get org_url, :accept => 'application/json' - @repositories.each {|r| - #repo_data = org_repos_data.select {|c| r.owner == org_name and r.host == 'github.com' and c['name'] == r.path} - repo_data = org_repos_data.select {|c| r.clone_url.eql? c['git_url']} - if repo_data.size == 1 - r.desc = repo_data.first['description'] - r.commits_url = repo_data.first['commits_url'] - end - } - if org_repos_data.headers[:link] =~ /<(.*)>.+rel="next",/ - org_url = $1 - else - more_pages = false - end - end - - } - - all_components = {} - all_modules = {} - - site.git_author_index = {} - @repositories.each do |r| - - # Store and Rest site state - site.components = {} - site.modules = {} - - repo_cache_file = File.join(site.tmp_dir, 'datacache', "#{r.path}.yml") - if File.exist? repo_cache_file and @use_data_cache - (site.components, site.modules) = YAML.load_file(repo_cache_file) - else - ## REVIEW BEGIN - if r.host.eql? 'github.com' - @observers.each do |o| - o.add_repository(r) if o.respond_to? 'add_repository' - end - end - ## REVIEW END - Visitors.defined.each do |v| - if v.handles(r) - v.visit(r, site) - end - end - - if @use_data_cache - FileUtils.mkdir_p File.dirname repo_cache_file - File.open(repo_cache_file, 'w') do |out| - site.components.each_pair {|k, c| c.repository.delete_field('client') } - YAML.dump([site.components, site.modules], out) - end - end - end - all_components.merge!(site.components || {}) - site.modules.each_pair do |k, v| - all_modules[k] = [] unless all_modules[k] - all_modules[k].concat(v) - end - - end - - site.components = all_components - site.modules = all_modules - - puts "Loaded #{site.components.size} components and #{site.modules.size} modules" - - # use sample commits to get the github_id for each author - rekeyed_index = {} - site.git_author_index.each do |email, author| - commit_data = RestClient.get(author.sample_commit_url, :accept => 'application/json') - - github_id = commit_data['commit']['author']['login'] - unless commit_data['author'].nil? - github_id = commit_data['author']['login'] if github_id.nil? or github_id.empty? - end - - github_id = github_id.to_s.downcase unless github_id.nil? - github_id = "" if github_id.nil? - - if github_id.empty? - match = site.github_mapping.find{|candidate| candidate.email.eql? author.email} - if match - github_id = match.github_id - puts "Used github mapping to lookup github_id #{github_id} for #{author.name} <#{author.email}>" - end - end - if not github_id.empty? - author.github_id = github_id - # github_id may exist in index when a person has multiple e-mail address w/ one github account - if rekeyed_index.has_key? github_id - entry = rekeyed_index[github_id] - # this is rather crude, but put the e-mail w/ lots of commits first - if author.commits > entry.commits - entry.emails.unshift author.email - else - entry.emails << author.email - end - entry.commits += author.commits - entry.repositories |= author.repositories - else - author.emails = [author.email] - author.delete_field('email') - rekeyed_index[github_id] = author - end - else - author.github_id = nil - author.emails = [author.email] - author.delete_field('email') - rekeyed_index[email] = author - end - end - - # QUESTION should we do this in identities/github.rb? - # FALLBACK ONLY BLOCK - rekeyed_index.keys.each do |id| - author = rekeyed_index[id] - next unless author.github_id.nil? - # an unmatched account will have exactly one e-mail - unmatched_email = author.emails.first - unmatched_name = author.name - # attempt a name match (somewhat weak, but it will have to do) - match = rekeyed_index.values.find{|candidate| - !candidate.equal? author and candidate.name.downcase.eql? unmatched_name.downcase - } - if match - # this is rather crude, but put the e-mail w/ lots of commits first - if author.commits > match.commits - match.emails.unshift unmatched_email - else - match.emails << unmatched_email - end - match.commits += author.commits - match.repositories |= author.repositories - rekeyed_index.delete id - puts "Merged #{unmatched_name} <#{unmatched_email}> with matched github id #{match.github_id} based on name" - else - puts "Could not resolve github id for author #{unmatched_name} <#{unmatched_email}>" - end - end - - @observers.each do |o| - o.add_match_filter(rekeyed_index) if o.respond_to? 'add_match_filter' - end - end - - end - - module Visitors - # @return array of visitors - def self.defined - @defined ||= [] - end - - module Base - def self.included(base) - base.extend(base) - Visitors.defined << base - end - - def handles(repository) - true - end - - # TODO could allow return false to halt processing of visitors - def visit(repository, site) - raise Error.new("#{self.inspect}#visit not defined!") - end - end - end - - end - end -end diff --git a/_ext/restclient_extensions.rb b/_ext/restclient_extensions.rb deleted file mode 100644 index cc241ef..0000000 --- a/_ext/restclient_extensions.rb +++ /dev/null @@ -1,185 +0,0 @@ -require 'restclient' -require 'time' -require 'uri' -require 'fileutils' -require 'json' - -module RestClient - - class << self - attr_reader :extensions - end - - @extensions = [] - - def self.enable(component, *args) - @extensions.unshift [component, args] - end - - def self.disable(component) - @extensions.delete_if { |(existing_component, options)| component == existing_component } - end - - class Request - alias_method :_execute, :execute - - def execute(&block) - if not self.headers.has_key? :redirects - self.headers[:redirects] = 0 - else - self.headers[:redirects] += 1 - end - - instances = [] - RestClient.extensions.each do |(component, args)| - if (args || []).empty? - instances << component.new(self) - else - instances << component.new(self, *args) - end - end - - response = nil - instances.each do |instance| - response = instance.execute(response) if instance.respond_to? 'execute' - end - - if response.nil? - puts 'Fetching ' + self.url - response = _execute &block - instances.each do |instance| - instance.cache_miss(response) if instance.respond_to? 'cache_miss' - end - end - - instances.each do |instance| - response = instance.post_process(response) if instance.respond_to? 'post_process' - end - response - end - end - - class MockNetHTTPResponse - attr_reader :body, :code, :header - - def initialize(body, code, header) - @body = body - @code = code - @header = header - end - - def to_hash - @header.inject({}) {|out, (key, value)| - # In Net::HTTP, header values are arrays - out[key] = [value] - out - } - end - end - -end - -# TODO don't use cache dir if absolute cache file is provided -class RestGetCache - @cache - @cache_dir - @cache_file - @request - - # NOTE configuration headers are kept to be available on redirects - def initialize(request, cache_dir = 'restcache') - @request = request - @redirects = @request.headers[:redirects] - @cache_dir = cache_dir - if request.headers.has_key? :cache - @cache = request.headers[:cache] - else - @cache = true - end - if request.headers.has_key? :cache_expiry_age - @cache_expiry_age = request.headers[:cache_expiry_age].to_i - else - @cache_expiry_age = nil - end - if @cache - if request.headers.has_key? :cache_key - @cache_file = File.join(cache_dir, request.headers[:cache_key]) - else - uri = URI(request.url) - path = uri.path - path = path.gsub(/\//, '-')[1..path.length] - query = nil - query = uri.query.gsub(/(\?|&|=)/, '-') unless uri.query.nil? - file_name = path - file_name = "#{path}_#{query}" unless query.nil? - - host = uri.host - host_basename = host.split('.')[-2, 1].first - @cache_file = File.join(cache_dir, host_basename, file_name).downcase - #puts "Cache File #{@cache_file}" - if File.extname(path).empty? - if request.headers.has_key? :accept - @cache_file << '.' + request.headers[:accept].split('/').last - else - @cache_file << '.html' - end - end - end - end - end - - def execute(response) - if response.nil? and @cache and @request.method.eql? :get - # read cache file if it exists and either (no expiry age is specified or the cache file is newer than now - age) - if File.exist? @cache_file and (@cache_expiry_age.nil? or File.mtime(@cache_file) >= (Time.now - @cache_expiry_age)) - body = File.read(@cache_file) - headers = {} - headers = JSON.parse(File.read("#{@cache_file}.headers")) if File.exist? "#{@cache_file}.headers" - return RestClient::Response.create(body, RestClient::MockNetHTTPResponse.new(body, 200, headers), @request.args) - end - end - response - end - - def cache_miss(response) - if response.code == 200 and @cache and @request.method.eql? :get and - @redirects.eql? @request.headers[:redirects] and !response.body.empty? - puts "Cache miss because #{@cache_file} is missing or expired" - FileUtils.mkdir_p(File.dirname @cache_file) - File.open(@cache_file, 'w') do |out| - out.write response.body - end - #puts "Headers #{response.headers[:link].class}" - File.open("#{@cache_file}.headers", 'w') do |out| - out.write response.headers.inject({}) {|collector, (k,v)| collector[k] = v; collector}.to_json - end - end - end -end - -class RestJsonConverter - def initialize(request, cache_dir = 'restcache') - @parse = 'application/json'.eql? request.headers[:accept] - end - - def post_process(response) - if @parse - content = response.body - # a cached response body will already be parsed - if content.is_a? String - content = JSON.parse(content) - end - RestClient::Response.create(content, response.net_http_res, response.args) - else - response - end - end -end - -class RestAuth - def initialize(request, auth_modules = []) - auth_modules.each do |auth_module| - auth_module.invoke(request) if auth_module.supports? request.url - end - end -end diff --git a/_ext/restclient_extensions_enabler.rb b/_ext/restclient_extensions_enabler.rb deleted file mode 100644 index 0042dc7..0000000 --- a/_ext/restclient_extensions_enabler.rb +++ /dev/null @@ -1,28 +0,0 @@ -require_relative 'restclient_extensions' - -module Awestruct::Extensions::RestClientExtensions - class EnableGetCache - def initialize(dir_name = 'restcache') - @dir_name = dir_name - end - - def execute(site) - RestClient.enable RestGetCache, File.join(site.tmp_dir, @dir_name) - end - end - - class EnableJsonConverter - def execute(site) - RestClient.enable RestJsonConverter - end - end - - class EnableAuth - def initialize(auth_modules) - @auth_modules = auth_modules - end - def execute(site) - RestClient.enable RestAuth, @auth_modules - end - end -end diff --git a/_ext/samples.rb b/_ext/samples.rb deleted file mode 100644 index 240e9a9..0000000 --- a/_ext/samples.rb +++ /dev/null @@ -1,406 +0,0 @@ -require 'rubygems' -require 'git' -require 'ostruct' -require 'rexml/document' - -require_relative 'javadoc' -require_relative 'javaeesamples' - -require File.join File.dirname(__FILE__), 'tweakruby' - -# Monkey-Pacth the JavaDoc DocletAPI to Expose the underlying parsed Java Source -ProgramElementDocImpl = com.sun.tools.javadoc.ProgramElementDocImpl -class ProgramElementDocImpl - field_accessor :tree -end - -class SampleExtension - - def execute(site) - site.showcases = [] - site.showcases.extend(Locators) - - site.modules["sample"].each do |val| - next if val.name =~ /.*(parent|aggregator).*/i - - page = site.engine.load_site_page('sample/_sample.html.slim') - page.output_path = "/sample/#{val.module_name}.html" - page.title = val.name.nil? ? val.module_name : val.name - puts "Created Showcase #{val.module_path} #{val.name}" - page.showcase = val - - site.showcases << page - end - - site.pages.concat(site.showcases) - end - - module Locators - - def usage_by_category_id(id) - self.select{ |v| - !v.showcase.api_usage.nil? and !v.showcase.api_usage[id].nil? - }.sort { |v| - v.showcase.api_usage[id] - } - end - def by_category_id(id) - self.select{ |v| - !v.showcase.category.nil? and v.showcase.category.id.eql? id - } - end - end -end - - - -module SampleComponent - include Awestruct::Extensions::Repository::Visitors::Base - - JAVA_SRC_DIR = "src/main/java" - JAVA_SRC_RESOURCE_DIR = "src/main/resources" - JAVA_TEST_DIR = "src/test/java" - JAVA_TEST_RESOURCE_DIR = "src/test/resources" - - def handles(repository) - repository.path.eql? "javaee7-samples" - end - - def visit(repository, site) - - rc = repository.client - c = site.components[repository.path] - c.type = "sample" - c.type_name = c.type.humanize.titleize - if site.modules[c.type].nil? - site.modules[c.type] = [] - end - - showcase_mods = {} - - - rev = "HEAD:" - Awestruct::Extensions::Repository::Visitors::MavenHelpers.traverse_modules(rev, repository) { - |path, pom| - - next if path.eql? rev - next if is_module_pom(pom) - - module_path = path.gsub(/.*:/, '') - module_name = module_path.gsub("/", "-").chop # chop of last / converted to - - - showcase_mods[module_name] = OpenStruct.new if showcase_mods[module_name].nil? - mod = showcase_mods[module_name] - mod.repository = repository - #next unless module_name.eql? "websocket-whiteboard" - puts "#{module_name} => #{module_path}" - mod.module_name = module_name - mod.module_path = module_path if mod.module_path.nil? - mod.category = locate_category(site.categories, module_path) - - mod.changes = [] - rc.log(10).path(module_path).each do |c| - mod.changes << OpenStruct.new({ - "author" => c.author.name, - "date" => c.author.date, - "message" => c.message.split(/\n/)[0].chomp('.').capitalize - }) - end - - mod.contributors = [] - - # TMP Hack to resolve sub path - orig_path = repository.relative_path - repository.relative_path = "#{repository.relative_path}#{mod.module_path}" - # Keep in mind we don't want to recount these commits - Awestruct::Extensions::Repository::Visitors::RepositoryHelpers.resolve_contributors_between( - site, repository, nil, rc.revparse('HEAD'), false).each { - |contributor| - mod.contributors << contributor - } - - repository.relative_path = orig_path - - parse_pom(mod, pom) - mod.name = generate_name(module_path) if mod.name.nil? - - mod.tests ||= [] - mod.sources ||= [] - - src_dir = "#{repository.clone_dir}/#{module_path}/#{JAVA_SRC_DIR}" - src_resource_dir = "#{repository.clone_dir}/#{module_path}/#{JAVA_SRC_RESOURCE_DIR}" - test_dir = "#{repository.clone_dir}/#{module_path}/#{JAVA_TEST_DIR}" - test_resource_dir = "#{repository.clone_dir}/#{module_path}/#{JAVA_TEST_RESOURCE_DIR}" - - extract_source = Proc.new{ |file| - next if file =~ /$\.java/ - next unless File.file? file - - source = OpenStruct.new - source.name = File.basename(file) - source.content = File.read(file).gsub(//m, '').strip - source.path = file.gsub("#{repository.clone_dir}/#{module_path}/", '') - mod.sources << source - } - - Dir.glob("#{src_resource_dir}/**/*").each &extract_source - Dir.glob("#{test_resource_dir}/**/*").each &extract_source - - Java::Doc.parse src_dir do |root| - root.classes.each do |c| - - next if c.is_abstract? - source = OpenStruct.new - source.name = c.name - source.qualified_name = c.qualifiedTypeName - source.description = c.commentText.split("\n").collect{|x|x.lstrip}.join("\n") - - # TODO: this will reformat the code. - # Look for better option to strip down to pure code - source.content = c.tree.to_s - - source.children ||= [] - - if c.position.file.path =~ Regexp.new(".*" + Regexp.escape("#{repository.path}") + "/(.*)") - source.path = $1 - end - #file_content = rc.cat_file("#{rev}#{source.path}") - file_content = File.read("#{c.position.file.path}") - parse_imports(site.categories, mod, file_content) - - c.methods.each do |m| - source.children << extract_method(m, file_content, true) - end - - mod.sources << source - end - end - - Java::Doc.parse test_dir do |root| - root.classes.each do |c| - next unless c.name =~ /(TestCase|Test)$/ - - test = OpenStruct.new - test.name = c.name - test.qualified_name = c.qualifiedTypeName - test.description = c.commentText.split("\n").collect{|x|x.lstrip}.join("\n") - - test.children ||= [] - - if c.position.file.path =~ Regexp.new(".*" + Regexp.escape("#{repository.path}") + "/(.*)") - test.path = $1 - end - #file_content = rc.cat_file("#{rev}#{test.path}") - file_content = File.read("#{c.position.file.path}") - parse_imports(site.categories, mod, file_content) - - c.methods.each do |m| - - is_deployment = !m.annotations.find{ - |x| - x.annotationType.qualifiedTypeName.eql? 'Deployment' - }.nil? - - is_test = !m.annotations.find{ - |x| - x.annotationType.qualifiedTypeName.eql? 'Test' - }.nil? - - method = extract_method(m, file_content, true) - method.is_deployment = is_deployment - method.is_test = is_test - - test.children << method - end - - mod.tests << test - - end - end - - } - - c.modules << showcase_mods.values - site.modules[c.type].concat showcase_mods.values - end - - def extract_method(m, file_content, with_content = false) - method = OpenStruct.new - method.name = m.name - method.description = m.commentText.split("\n").collect{|x|x.lstrip}.join("\n") - if with_content - method.start_pos = m.tree.start_position - method.end_pos = calculate_block_end_pos(method.start_pos, method.name, file_content) - method.content = reposition_content(file_content[method.start_pos, method.end_pos - method.start_pos]) - end - return method - end - - def calculate_block_end_pos(start, method_name, file_content) - #puts "Start #{start} #{method_name} #{file_content.size}: #{file_content[start, 2]}" - if start >= file_content.size - return start # JavaDoc running wild, bad formatting.. abort - end - scanner = StringScanner.new file_content - scanner.pos = start - scanner.scan_until Regexp.new(Regexp.escape(method_name)) - - block_pos = scanner.pos - inside_comment = 0 - inside = false - level = 0 - curr = 0 - while true - curr += 1 - curr_char = file_content[block_pos + curr, 1] - inside_comment += 1 if curr_char.eql? "/" - if(curr_char.eql? "\n") - inside_comment = 0 - end - unless inside_comment >= 2 - inside = true if curr_char.eql? "{" - level += 1 if curr_char.eql? "{" - level -= 1 if curr_char.eql? "}" - end - #puts "#{level} #{curr} #{curr_char}" - break if level == 0 and inside - #raise "Out of level, level #{level} - curr #{curr} - char #{curr_char}\n #{file_content[start, block_pos+curr]}" if level < 0 - break if level < 0 - end - - block_pos+curr+1 - end - - # Remove white space in beginning of line to align all lines - # 1. line is already at 0 - def reposition_content(content) - return "" if content.nil? - lines = content.split("\n") - # Align method against the last line, probably } in source code - padding = lines.last.index(/\S/) - lines.collect.with_index{ - |line, i| - x = line - if i > 0 - # only remove the padding if it's empty. Code formatting issues - padd = x[0..padding-1].strip - x = x[padding..-1] if padd.empty? - end - #puts "#{i} #{padding} #{x}" - x - }.join("\n") - end - - def is_module_pom(pom) - modules = pom.elements["/project/modules/module"] - !modules.nil? and !modules.has_elements? - end - - def locate_category(categories, module_path) - cat_id = $1 if module_path =~ /([a-z]+)\/.*/ - categories.find{|v| v.id.downcase.eql? cat_id} - end - - def generate_name(module_path) - name = module_path - name = $2 if name =~ /([a-z]+)\/(.*)/ - - name.gsub(/\/|\-/, ' ').capitalize.strip - end - - def parse_pom(mod, pom) - mod.name = pom.root.text('name') - mod.name = nil if mod.name =~ /^\$/ - mod.name.gsub!(/Arquillian Showcase.\s?/, "") unless mod.name.nil? - mod.name.gsub!(":", " -") unless mod.name.nil? - mod.description = pom.root.text('description') - - pom.root.each_element("profiles/profile/id") { |id| - mod.profiles = [] if mod.profiles.nil? - mod.profiles << id.text - } - mod.profiles.sort if !mod.profiles.nil? - end - - def parse_imports(categories, mod, content) - mod.api_usage = Hash.new if mod.api_usage.nil? - - content.scan(/^import (static )?(.+?);/) do |match| - stmt = match[1] - categories.each do |category| - category.packages.each do |package| - if stmt =~ Regexp.new("^" + Regexp.quote(package)) - mod.api_usage[category.id] ||= 0 - mod.api_usage[category.id] += 1 - break - end - - end - end - #puts stmt unless known_apis.include? stmt - end - end - - def parse_testcase(mod, path, content) - mod.tests = [] if mod.tests.nil? - - test = OpenStruct.new - test.path = path - test.name = path.match(/.*\/([A-Z][A-Za-z]+)\.java/)[1] - test.content = content.match(/.*(package .*)/m)[1] - test.content = content.gsub(/\/\*(?!\*).*Licensed.+?\*\//m, '') #remove /* xxx */ license headers - if test.content =~/\/\*(.+?)\*\//m - test.description = $1 - test.description.gsub!(/.?\*.?/, '') - end - test.content.gsub!(/\/\*.+?\*\//m, '') #remove /* comments */ license headers - - mod.tests << test - end - - def initialize() - @apis = { - 'Arquillian JUnit' => /^org.jboss.arquillian.junit/, - 'Arquillian TestNG' => /^org.jboss.arquillian.testng/, - #'Arquillian Test' => /^org.jboss.arquillian.test/, - #'Arquillian Container Test' => /^org.jboss.arquillian.container.test/, - #'Arquillian Core' => /^org.jboss.arquillian.core/, - #'Arquillian Config' => /^org.jboss.arquillian.config/, - 'Arquillian Ajocado' => /^org.jboss.arquillian.ajocado/, - 'Arquillian Graphene' => /^org.jboss.arquillian.graphene/, - 'Arquillian Drone' => /^org.jboss.arquillian.drone/, - 'Arquillian Persistence' => /^org.jboss.arquillian.persistence/, - 'Arquillian Spring' => /^org.jboss.arquillian.spring/, - 'Arquillian Extension' => /^org.jboss.arquillian.*(spi)/, - 'ShrinkWrap' => /^org.jboss.shrinkwrap.api/, - 'ShrinkWrap Resovler' => /^org.jboss.shrinkwrap.resolver/, - 'ShrinkWrap Descriptor' => /^org.jboss.shrinkwrap.descriptor/, - 'JSFUnit' => /^org.jboss.jsfunit/, - 'Infinispan' => /^org.infinispan/, - 'RestEasy' => /^org.jboss.resteasy/, - 'JUnit' => /^org.junit/, - 'TestNG' => /^org.testng/, - 'Fest' => /^org.fest/, - 'Selenium' => /^org.openqa.selenium/, - 'Spring JDBC' => /^org.springframework.jdbc/, - 'Spring JMS' => /^org.springframework.jms/, - 'Spring' => /^org.springframework.beans/, - - # Specs - 'AtInject' => /^javax.inject/, - 'CDI' => /^javax.enterprise/, - 'Servlet' => /^javax.servlet/, - 'Persistence' => /^javax.persistence/, - 'JSF' => /^javax.faces/, - 'OSGi' => /^org.osgi/, - 'EJB' => /^javax.ejb/, - 'JMS' => /^javax.jms/, - 'WebService' => /^javax.jws/, - 'Jsr250' => /^javax.annotation/, - 'JaxRS' => /^javax.ws.rs/, - 'Transaction' => /^javax.transaction/, - 'Validation' => /^javax.validation/, - 'Security' => /^java.security/ - } - end -end \ No newline at end of file diff --git a/_ext/tweakruby.rb b/_ext/tweakruby.rb deleted file mode 100644 index 746ebc3..0000000 --- a/_ext/tweakruby.rb +++ /dev/null @@ -1,58 +0,0 @@ -module Kernel - def require_relative(path) - require File.join(File.dirname(caller.first), path.to_s) - end -end - -class Object - def not_nil? - not self.nil? - end -end - -class String - def pluralize_unless_one(count, plural = nil) - count == 1 ? self : (plural || self.pluralize) - end - - unless method_defined?(:force_encoding) - def force_encoding(encoding) - self - end - - # nokogiri tries to use Encoding.find if String responds to force_encoding - class ::Encoding - def self.find(encoding) - encoding - end - end - end -end - -require 'ostruct' -# monkeypatch OpenStruct to remove type property warning -# and allow use of array-syntax operator and merge! -class OpenStruct - def type - @table[:type] - end - - def [](key) - @table[key.to_sym] - end - - def []=(key, value) - @table[key.to_sym] = value - end - - def merge!(other, overwrite = true) - @table.merge!(other.instance_variable_get(:@table)) { |k, o, n| - overwrite ? n : o - } - end -end - -module Order - DESC = -1 - ASC = 1 -end diff --git a/_layouts/base.html.slim b/_layouts/base.html.slim deleted file mode 100644 index 0a3cd41..0000000 --- a/_layouts/base.html.slim +++ /dev/null @@ -1,74 +0,0 @@ -doctype 5 -/# To understand why the html tag is setup this way, -/# see http://paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither - -/[if IE 8] html class="no-js lt-ie9" lang="en" -/[if gt IE 8] html class="no-js" lang="en" -head - meta charset='utf-8' - meta name='viewport' content='width=device-width, initial-scale=1.0' - title =page.title.nil? ? site.title : page.title - link rel='stylesheet' href="#{site.base_url}/stylesheets/foundation-icons.css" - link rel='stylesheet' href="#{site.base_url}/stylesheets/app.css" - script src="#{site.base_url}/javascripts/vendor/custom.modernizr.js" - script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js" - link rel='author' type='text/plain' href="#{site.base_url}/humans.txt" - - /# Add author link if google.url found in profile - - unless page.nil? or page.showcase.nil? or page.showcase.contributors.nil? - -for c in site.identities.unique_by_emails(page.showcase.contributors) - - unless c.google.nil? - link rel="author" href="#{c.google.url}" - - - if page.twitter_card - meta name="twitter:card" content="#{page.twitter_card}" - - if page.twitter_title - meta name="twitter:title" content="#{page.twitter_title}" - - if page.twitter_description - meta name="twitter:description" content="#{page.twitter_description[0..200]}" - -body.antialiased - nav.top-bar - ul.title-area - li.name - h1 - a href="#{site.base_url}/" =site.name - li.toggle-topbar - a href='#' - i.fi-home - section.top-bar-section - ul.right - li.divider - li - a href="#{site.base_url}/contributors" - |Contributors - i.fi-torsos-male-female - =content - - - footer style='max-width: 100%' - .row - .large-6.columns style='margin-bottom: .75em; margin-top: .75em' - ul.unstyled - li © Copyright 2013-#{DateTime.now.year} JavaEE Samples. - li - i.fi-like - | Mixed with Foundation. Baked by Awestruct. - li - i.fi-share - | Website and docs licensed under CC BY 3.0. - - script src="#{site.base_url}/javascripts/foundation/foundation.js" - - -# select foundation components from this array and add them to the one on the line below it - -# [:orbit, :cookie, :clearing, :magellan, :section, :alerts, :topbar, :joyride, :forms, :tooltips, :dropdown, :placeholder, :reveal] - - [:topbar, :reveal].each do |component| - script src="#{site.base_url}/javascripts/foundation/foundation.#{component}.js" - script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/7.3/highlight.min.js" - link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/7.3/styles/pojoaque.css" - - javascript: - $(document).foundation() - - if site.google_analytics - =google_analytics - diff --git a/_layouts/default.html.slim b/_layouts/default.html.slim deleted file mode 100644 index 62e394e..0000000 --- a/_layouts/default.html.slim +++ /dev/null @@ -1,5 +0,0 @@ ---- -layout: base ---- -.container - =content \ No newline at end of file diff --git a/_layouts/sample.html.slim b/_layouts/sample.html.slim deleted file mode 100644 index 5084b6e..0000000 --- a/_layouts/sample.html.slim +++ /dev/null @@ -1,185 +0,0 @@ ---- -layout: default -priority: 0.9 -change_frequency: monthly ---- -- page.title = "JavaEE Sample::#{page.showcase.category.nil? ? "" : page.showcase.category.id}::#{page.showcase.name}" -- page.twitter_card = "summary" -- page.twitter_title = page.showcase.name -- page.twitter_description = page.showcase.description -header - .row - .large-10.columns - h2=page.showcase.name - - .large-2.columns - .action.right - a.button.radius.round.success data-reveal-id="run" - |Run - i.fi-play - #run.hide.reveal-modal data-reveal="" - a.close-reveal-modal href='./' - |How to run the sample - i.fi-x - hr.clear - |The source code for this sample can be found in the - a href=="#{page.showcase.repository.html_url}/tree/master/#{page.showcase.module_path}"=>page.showcase.repository.path - i.fi-social-github> - | GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder: - pre.highlight - code="git clone #{page.showcase.repository.clone_url}
cd #{page.showcase.repository.path}/#{page.showcase.module_path}" - - - if !page.showcase.tests.nil? - | Now we are ready to start testing. You can run all the tests in this sample by executing: - pre.highlight - code mvn test - |Or you can run individual tests by executing one of the following: - pre.highlight - code - - for test in page.showcase.tests - |mvn test -Dtest=#{test.name} - - - if !page.showcase.profiles.nil? and !page.showcase.tests.nil? - |This sample support multiple different containers. You choose which container to use by activating one of the Maven profiles defined. Adding -P "profile-name" to one of the command lines above will do the trick, e.g.: - pre.highlight - code "mvn test -Dtest=#{page.showcase.tests.first.name} -P #{page.showcase.profiles.first}" - |The available profiles are: #{page.showcase.profiles.join(', ')} - .row - .large-10.columns - h3=page.showcase.description - - .sub - .row - .large-10.columns.specifications - - unless page.showcase.api_usage.nil? - ul.inline-list - li Specifications in use: - li - ul.inline-list - - for tech in page.showcase.api_usage.each_key.sort - li - a href="#{site.base_url}/##{tech}" title="#{site.categories.find{|x|x.id.eql? tech}.name}" =tech - - .large-2.columns.contributors - - unless page.showcase.contributors.nil? - ul.inline-list - -for c in site.identities.unique_by_emails(page.showcase.contributors) - li itemscope="" itemtype="http://data-vocabulary.org/Person" - meta itemprop="role" content="author" - meta itemprop="name" content="#{c.name}" - meta itemprop="affiliation" content="#{c.company}" - img.photo title="#{c.name}" src="#{c.avatar_url(25)}" itemprop="photo" - - javascript: - //$(function() { activateGuideMenuControl() }) -.row - .large-12.columns - - if page.showcase.tests.empty? - .improve - |Missing a story. Add a test case. - a.right.button.round data-reveal-id="improve" - |Show me how! - i.fi-page-edit - - for test in page.showcase.tests - #test - - .row - .large-7.columns - h4=test.name - - .large-3.columns - - results = site.results.summary_by_testclass(test.qualified_name, test) - - unless results.empty? - ul.inline-list style="margin-left:0em;" - - for name, status in results.each - - icon = status ? 'fi-like' : 'fi-dislike' - - color = status ? 'green' : 'red' - - title = status ? "All tests pass on #{name}" : "Not all tests pass on #{name}" - li style="margin-left: 0.3em" - i class="#{icon}" title="#{title}" style="color: #{color}" - - .large-2.columns - a.right href="#{page.showcase.repository.html_url}/edit/master/#{page.showcase.module_path}src/test/java/#{test.qualified_name.gsub('.', '/')}.java" - i.fi-page-edit - - - if test.description.nil? or test.description.empty? - .improve - |Missing a description for the story. Add some javadoc to the TestClass. - a.right.button.tiny.round href="#{page.showcase.repository.html_url}/edit/master/#{page.showcase.module_path}src/test/java/#{test.qualified_name.gsub('.', '/')}.java" - |Show me how! - i.fi-page-edit - - =asciidocify(test.description, page.showcase) - - for deployment in test.children.select{|x| x.is_deployment} - - if deployment.description.nil? or deployment.description.empty? - .improve - |Missing a description for the deployment. Add some javadoc to the @Deployment method. - a.right.button.tiny.round href="#{page.showcase.repository.html_url}/edit/master/#{page.showcase.module_path}src/test/java/#{test.qualified_name.gsub('.', '/')}.java" - |Show me how! - i.fi-page-edit - - =asciidocify(deployment.description, page.showcase) - =sourcify(deployment.content) - - for scenario in test.children.select{|x| x.is_test} - - if scenario.description.nil? or scenario.description.empty? - .improve - |Missing a description for the test scenario. Add some javadoc to the @Test method. - a.right.button.tiny.round href="#{page.showcase.repository.html_url}/edit/master/#{page.showcase.module_path}src/test/java/#{test.qualified_name.gsub('.', '/')}.java" - |Show me how! - i.fi-page-edit - - =asciidocify(scenario.description, page.showcase) - =sourcify(scenario.content) - - javascript: - $(function() { - hljs.initHighlightingOnLoad(); - }) - -.row - .large-12.columns - .large-6.columns - h3 Share the Knowledge - - |Find this sample useful? - - a href="http://twitter.com/home/?status=#{URI.escape("Just read the #JavaEE-Sample \"#{page.showcase.category.nil? ? '' : page.showcase.category.id + '::'}#{page.showcase.name}\" and learned something new! #{site.base_url}#{page.url}")}" - |Share on - i.fi-social-twitter - - p There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples. - - .large-6.columns - h3 Help Improve - - - has_single_test = (!page.showcase.tests.nil? and page.showcase.tests.size == 1) - - puts page.showcase if page.showcase.tests[0].nil? and has_single_test - - href = "#{page.showcase.repository.html_url}/edit/master/#{page.showcase.module_path}src/test/java/#{page.showcase.tests[0].qualified_name.gsub('.', '/')}.java" if has_single_test - - href = "#{page.showcase.repository.html_url}/tree/master/#{page.showcase.module_path}/src/test/java" unless has_single_test - - |Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker - -- if page.showcase.changes - .row - .large-12.columns.changes - h4 Recent Changelog - ul - - for change in page.showcase.changes - li - |#{change.date.strftime('%b %d, %Y')}: #{change.message} by #{change.author} - - -#improve.hide.reveal-modal data-reveal="" - a.close-reveal-modal href='./' - |How to help improve this sample - i.fi-x - hr.clear - |The source code for this sample can be found in the - a href=="#{page.showcase.repository.html_url}/tree/master/#{page.showcase.module_path}"=>page.showcase.repository.path - i.fi-social-github - | GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder: - pre.highlight - code="git clone #{page.showcase.repository.clone_url}
cd #{page.showcase.repository.path}/#{page.showcase.module_path}" - - p Do the changes as you see fit and send a pull request! - p Good Luck! diff --git a/contribute.html.slim b/contribute.html.slim deleted file mode 100644 index 588686e..0000000 --- a/contribute.html.slim +++ /dev/null @@ -1,85 +0,0 @@ ---- -layout: default ---- -header - .row - .large-12.columns - h1 How to contribute - -- showcases = site.showcases.select {|x| !x.showcase.category.nil? } -- for showcase_page in showcases - - showcase = showcase_page.showcase - - stats = OpenStruct.new - - showcase.stats = stats - - stats.total_tests = 0.0 - - stats.total_test_methods = 0.0 - - stats.total_tests_m = 0.0 - - stats.total_test_methods_m = 0.0 - - - for test in showcase.tests - - stats.total_tests += 1 - - stats.total_tests_m += 1 if test.description.nil? or test.description.empty? - - - for method in test.children - - next unless method.is_test or method.is_deployment - - stats.total_test_methods += 1 - - stats.total_test_methods_m += 1 if method.description.nil? or method.description.empty? - - - stats.total = stats.total_tests + stats.total_test_methods - - stats.missing = stats.total_tests_m + stats.total_test_methods_m - - stats.procent = 0 - - stats.procent = ((stats.total-stats.missing)/stats.total)*100 if stats.total > 0 - - stats.procent = stats.procent.to_i - - #puts "#{stats.total}->#{stats.missing} = #{stats.procent}" - - stats.progress = "secondary" - - stats.progress = "alert" if stats.procent < 50 - - stats.progress = "" if stats.procent >= 50 - - stats.progress = "success" if stats.procent == 100 --showcases = showcases.sort_by{|c| c.showcase.stats.procent * Order::ASC} -.row - .large-12.columns - .row - .large-6.columns style="max-width:50%" - h3 Author? - - for showcase_page in showcases - - showcase = showcase_page.showcase - - stats = showcase.stats - - next if stats.total_tests == 0 - .sample - h5 - a href="#{showcase_page.output_path}"=>showcase.name - small =>showcase.category.id - .large-3.columns #{stats.procent}% - .large-9.columns - .progress.round class="#{stats.progress}" - .meter style="width: #{stats.procent}%" - - .missing - - for test in showcase.tests - - missing = test.children.select {|x| (x.is_test or x.is_deployment) and (x.description.nil? or x.description.empty?)} - - if missing.length > 0 - .test - | Describe the method(s) #{missing.map{|x|x.name}.join(", ")} in test - a href="#{showcase.repository.html_url}/edit/master/#{showcase.module_path}src/test/java/#{test.qualified_name.gsub('.', '/')}.java" =test.name - |. - - .large-6-columns style="max-width:50%" - h3 Coder? - - for showcase_page in showcases - - showcase = showcase_page.showcase - - stats = showcase.stats - - next if stats.total_tests > 0 - .sample - h5 - a href="#{showcase_page.output_path}"=>showcase.name - small =>showcase.category.id - .large-3.columns #{stats.procent}% - .large-9.columns - .progress.round class="#{stats.progress}" - .meter style="width: #{stats.procent}%" - - .missing - |Study the - a href="#{showcase.repository.html_url}/tree/master/#{showcase.module_path}src/main/java" sample code - |and create a test for it - diff --git a/contribute/index.html b/contribute/index.html new file mode 100644 index 0000000..6dd2779 --- /dev/null +++ b/contribute/index.html @@ -0,0 +1,11 @@ +Navigate your way through EE via Tests

How to contribute

Author?

Decorators CDI
0%
Describe the method(s) deploy, test in test DecoratorTest.
Bean discovery all CDI
0%
Describe the method(s) deploy, should_bean_be_injected in test GreetingTest.
Bean discovery annotated CDI
0%
Describe the method(s) deploy, should_bean_be_injected, should_bean_be_simple in test GreetingTest.
Bean discovery none CDI
0%
Describe the method(s) deploy, should_bean_be_injected in test GreetingTest.
Interceptors CDI
0%
Describe the method(s) deploy, test in test GreetingTest.
Nobeans xml CDI
0%
Describe the method(s) deploy, should_scope_bean_be_injected in test ScopedBeanTest.
Beansxml noversion CDI
0%
Describe the method(s) deploy, should_bean_be_injected in test GreetingTest.
Alternatives CDI
0%
Describe the method(s) deploy, should_bean_be_injected, should_bean_be_fancy in test GreetingTest.
Alternatives priority CDI
0%
Describe the method(s) deploy, should_be_ambiguous in test MixedGreetingTest.
Describe the method(s) deploy, should_bean_be_injected, should_bean_be_priority in test GreetingTest.
Describe the method(s) deploy, should_bean_be_injected, should_bean_be_simple in test ProducerMethodGreetingTest.
Nobeans el injection CDI
0%
Describe the method(s) deploy, checkRenderedPage in test ScopedBeanTest.
Nobeans el injection flowscoped CDI
0%
Describe the method(s) deploy, checkRenderedPage in test FlowScopedBeanTest.
Events CDI
0%
Describe the method(s) deploy, test in test GreetingTest.
Managedexecutor Concurrency
0%
Describe the method(s) createDeployment, testSubmitWithRunnableDefault, testSubmitWithCallableDefault, testInvokeAllWithCallableDefault, testInvokeAnyWithCallableDefault in test ExecutorJNDITest.
Describe the method(s) createDeployment, testSubmitWithRunnableDefault, testSubmitWithCallableDefault, testInvokeAllWithCallableDefault, testInvokeAnyWithCallableDefault, testSubmitWithRunnableNoName, testSubmitWithCallableNoName, testInvokeAllWithCallableNoName, testInvokeAnyWithCallableNoName, testSubmitWithRunnableFromWebXML, testSubmitWithCallableFromWebXML, testInvokeAllWithCallableFromWebXML, testInvokeAnyWithCallableFromWebXML, testSubmitWithListener, testSubmitWithTransaction, testSubmitWithEJB in test ExecutorInjectTest.
managedthreadfactory Concurrency
0%
Embeddable EJB
0%
Async ejb EJB
0%
Describe the method(s) createDeployment, should_return_async_sum in test AsyncClassBeanTest.
Describe the method(s) createDeployment, should_return_async_sum in test AsyncMethodBeanTest.
Standalone EL
0%
Describe the method(s) deploy, should_pick_in_the_array, should_add in test ELResolverTest.
Register session JASPIC
0%
Describe the method(s) createDeployment, testRemembersSession, testJoinSessionIsOptional in test RegisterSessionTest.
Beanvalidation JAXRS
0%
Describe the method(s) createDeployment, testInvalidRequest, testValidRequest, testValidPostRequest, testInvalidPostRequest, testInvalidPostRequestLesserAge, testInvalidPostRequestGreaterAge in test MyResourceTest.
Beanparam JAXRS
0%
Describe the method(s) createDeployment, testRequestWithAllParams in test MyResourceTest.
Client negotiation JAXRS
0%
Describe the method(s) createDeployment, testXML, testJSON in test MyResourceTest.
Dynamicfilter JAXRS
0%
Describe the method(s) createDeployment, testGet, testPost in test MyResourceTest.
Fileupload JAXRS
0%
Describe the method(s) createDeployment, shouldPostOctetStreamContentAsInputStream, shouldNotPostImagePngContentAsInputStream, shouldPostOctetStreamContentAsFile, shouldPostImagePngContentAsFile in test MyResourceTest.
Paramconverter JAXRS
0%
Describe the method(s) createDeployment, testRequestWithQueryParam, testRequestWithNoQueryParam, testRequestWithPathParam in test MyResourceTest.
Resource validation JAXRS
0%
Describe the method(s) createDeployment, shouldPassNameValidation, shouldFailAtFirstNameSizeValidation, shouldFailAtFirstNameNullValidation, shouldFailAtLastNameSizeValidation, shouldFailAtLastNameNullValidation, shouldFailAtEmailAtSymbolValidation, shouldFailAtEmailComDomainValidation in test NameAddResourceTest.
Server negotiation JAXRS
0%
Describe the method(s) createDeployment, testJson, testJson2, testXml in test MyResourceTest.
singleton JAXRS
0%
Describe the method(s) createDeployment, testPost, testGet, testDelete, testPut in test ApplicationSingletonResourceTest.
Describe the method(s) createDeployment, testPost, testGet, testDelete, testPut in test AnnotatedSingletonResourceTest.
Readerwriter injection JAXRS
0%
Describe the method(s) createDeployment, testPostWithCustomMimeTypeAndInjectedBeanInReader, testPostSimple in test MyResourceTest.
Jaxrs security declarative JAXRS
0%
Describe the method(s) createDeployment, testGetWithCorrectCredentials, testGetSubResourceWithCorrectCredentials, testGetWithIncorrectCredentials, testPost, testPut in test MyResourceTest.
Db access JAXRS
0%
Describe the method(s) createDeployment, testGet in test EmployeeResourceTest.
Jms xa JMS
0%
Describe the method(s) createDeployment, emailAlreadyRegisteredNonXA, happyPathNonXA in test UserManagerNonXATest.
Describe the method(s) createDeployment, emailAlreadyRegisteredXA, happyPathXA in test UserManagerXATest.
Send receive JMS
0%
Describe the method(s) testClassicApi, testContainerManagedJmsContext, testAppManagedJmsContext, testMultipleSendAndReceive, deploy in test SyncTest.
Describe the method(s) testAsync, deploy in test AsyncTest.
Describe the method(s) testWaiting in test ReceptionSynchronizerTest.
Datasourcedefinition JPA
0%
Describe the method(s) deploy, should_bean_be_injected in test DataSourceDefinitionTest.
Multiple pu JPA
0%
Describe the method(s) createDeployment, testMultiplePu in test MultiplePuTest.
Storedprocedure JPA
0%
Describe the method(s) createDeployment, testStoredProcedure in test StoredProcedureTest.
Jndi context JPA
0%
Describe the method(s) createDeployment, testEntityManagerLookup, testEntityManagerLookupBean in test EntityManagerJndiContextTest.
Locking optimistic JPA
0%
Describe the method(s) createDeployment, testLockingOptimisticUpdateAndRead, testLockingOptimisticReadAndUpdate, testLockingOptimisticDelete in test LockingOptimisticTest.
Pu typesafe JPA
0%
Describe the method(s) createDeployment, testPuTypesafe in test PuTypesafeTest.
Schema gen metadata JPA
0%
Describe the method(s) createDeployment, testGet in test EmployeeBeanTest.
Schema gen scripts JPA
0%
Describe the method(s) createDeployment, testGet in test EmployeeBeanTest.
Schema gen scripts external JPA
0%
Describe the method(s) createDeployment, testSchemaGenScriptExternal in test SchemaGenScriptsExternalTest.
Schema gen scripts generate JPA
0%
Describe the method(s) createDeployment, testSchemaGenIndex in test SchemaGenScriptsTest.
Schema gen index JPA
0%
Describe the method(s) createDeployment, testSchemaGenIndex in test SchemaGenIndexTest.
Jpa converter JPA
0%
Describe the method(s) createDeployment, should_return_all_employee_records in test EmployeeRepositoryTest.
Default datasource JPA
0%
Describe the method(s) createDeployment, testGet in test EmployeeBeanTest.
Transactional JTA
0%
Describe the method(s) deploy, should_required_work, should_requiresNew_work, should_mandatory_throw_exception, should_supports_work, should_notSupported_work, should_never_work in test MyTransactionalTxTypeBeanTest.
Describe the method(s) deploy, should_withTransaction_have_only_one_instance_injected, should_withTransaction_called_twice_have_same_instances_injected, should_withoutTransaction_NOT_fail in test MyTransactionalBeanWithUserTransactionTest.
Describe the method(s) deploy, should_withTransaction_have_only_one_instance_injected, should_withTransaction_called_twice_have_different_instances_injected, should_withoutTransaction_fail in test MyTransactionalBeanTest.
User transaction JTA
0%
Describe the method(s) deploy, should_work_with_cdi, should_work_with_jndi in test UserTransactionTest.
Bean validation JSF
0%
Describe the method(s) createDeployment, testNameLessCharacters, testNameBoundary, testAgeLessThan, testAgeLowBoundary, testAgeHighBoundary, testAgeGreaterThan, testZipAlphabets, testZipLessNumbers, testZipMoreNumbers, testZipBoundary in test MyBeanTest.
Http get JSF
0%
Describe the method(s) createDeployment, testLink, testLinkWithParam, testLinkWithPreProcessParams, testButton in test UserTest.
Simple facelet JSF
0%
Describe the method(s) createDeployment, testDataTableRendered in test SimpleFaceletTest.
Object builder JSON
0%
Describe the method(s) deploy, testEmptyObject, testSimpleObject, testArray, testNestedStructure in test DOMGeneratorTest.
Object reader JSON
0%
Describe the method(s) deploy, testEmptyObject, testSimpleObjectWithTwoElements, testArray, testNestedStructure in test JsonReaderFromReaderTest.
Describe the method(s) deploy, testEmptyObject, testSimpleObjectWithTwoElements, testArray, testNestedStructure in test JsonReaderFromStreamTest.
Streaming generate JSON
0%
Describe the method(s) deploy, testEmptyObject, testSimpleObject, testArray, testNestedStructure in test StreamingGeneratorTest.
Streaming parser JSON
0%
Describe the method(s) deploy, testEmptyObject, testSimpleObject, testArray, testNestedStructure in test JsonParserFromReaderTest.
Describe the method(s) deploy, testEmptyObject, testSimpleObject, testArray, testNestedStructure in test JsonParserFromStreamTest.
Metadata complete Servlet
0%
Describe the method(s) createDeployment, testGet, testPost in test TestServletTest.
Resource packaging Servlet
0%
Describe the method(s) deploy, getMyResourceJarStyles in test ResourcePackagingTest.
Servlet filters Servlet
0%
Describe the method(s) createDeployment, filtered_servlet_should_return_enhanced_foobar_text, standard_servlet_should_return_simple_text in test FilterServletTest.
File upload Servlet
0%
Describe the method(s) deploy, uploadFile in test FileUploadTest.
security-basicauth Servlet
0%
Describe the method(s) createDeployment, testGetWithCorrectCredentials, testGetWithIncorrectCredentials, testPostWithCorrectCredentials, testPostWithIncorrectCredentials in test SecureServletTest.
security-form-based Servlet
0%
Describe the method(s) createDeployment, testGetWithCorrectCredentials, testGetWithIncorrectCredentials in test FormTest.
security-programmatic Servlet
0%
Describe the method(s) createDeployment, testUnauthenticatedRequest, testAuthenticatedRequest in test LoginServletTest.
Security deny uncovered Servlet
0%
Describe the method(s) createDeployment, testGetMethod, testPostMethod, testPutMethod in test SecureServletTest.
Security basicauth omission Servlet
0%
Describe the method(s) createDeployment, testPostWithNoCredentials, testPostWithCorrectCredentials, testPostWithIncorrectCredentials in test SecureServletTest.
Programmatic registration Servlet
0%
Describe the method(s) createDeployment, testChildServlet in test ServletTest.
Simple servlet Servlet
0%
Describe the method(s) createDeployment, testGet, testPost in test SimpleServletTest.
Methods validation
0%
Describe the method(s) deployment, constructorViolationsWhenNullParameters, constructorViolationsWhenNotNullParameters in test ConstructorParametersConstraintsTest.
Describe the method(s) deployment, constructorViolationsWhenNullParameters in test ConstructorParametersInjectionTest.
Describe the method(s) deployment, methodSizeTooLong, methodSizeOk, showDateFromPast, showDateFromFuture, multipleParametersWithEmptyList, multipleParametersNullSecondParameter, multipleParametersWithCorrectValues in test MethodParametersConstraintsTest.
Custom constraint validation
0%
Describe the method(s) deployment, saveZipCodeforUs, saveZipCodeForIndia in test CustomConstraintTest.
Chat WebSocket
0%
Describe the method(s) createDeployment, testConnect in test ChatTest.
Encoder programmatic WebSocket
0%
Describe the method(s) createDeployment, testEndpoint in test MyClientTest.
Endpoint WebSocket
0%
Describe the method(s) createDeployment, testTextEndpoint, testEndpointByteBuffer, testEndpointByteArray, testEndpointInputStream in test MyEndpointTest.
Endpoint async WebSocket
0%
Describe the method(s) deploy, shouldReceiveAsyncTextMessage, shouldReceiveAsyncByteBufferMessage in test MyAsyncEndpointTest.
Endpoint programmatic WebSocket
0%
Describe the method(s) createDeployment, testTextEndpoint, testBinaryEndpoint in test MyEndpointTest.
Angularjs JAXRS
12%
Describe the method(s) createDeployment, setupDB_ARQ1077_Workaround_2, setupDB_ARQ1077_Workaround_3, addNewNote, onenterContainsNotesFromDB, removeNote in test NoteResourceImplTest.
Entitygraph JPA
12%
Describe the method(s) createDeployment, testEntityGraphMovieDefault, testEntityGraphMovieWithActors, testEntityGraphMovieWithActorsAndAwards, testEntityGraphProgrammatically, testEntityGraphWithNamedParameters, testEntityGraphWithNamedParametersList in test EntityGraphTest.
Jaxws endpoint jaxws
16%
Describe the method(s) test1WelcomeMessage, test2SaveAndTakeBook, test3FindEbooks, test4AddAppendix in test EBookStoreTest.
Tx exception JTA
20%
Describe the method(s) deploy, should_have_7_employees, should_have_1_more_employee_after_checked_exception, should_not_have_1_more_employee_after_runtime_exception in test EmployeeBeanTest.
Wrapping JASPIC
25%
Describe the method(s) createDeployment, testRequestWrapping, testResponseWrapping in test WrappingTest.
Jsonp JAXRS
25%
Describe the method(s) createDeployment, testEchoArray in test MyResourceTest.
Jaxws client jaxws
25%
Describe the method(s) test1WelcomeMessage, test2SaveAndTakeBook in test EBookStoreClientSampleTest.
Encoder WebSocket
25%
Describe the method(s) testEndpointEmptyJSONArray, testEndpointEmptyJSONObject in test EncoderEndpointTest.
Interceptors priority CDI
33%
Describe the method(s) deploy, test in test GreetingTest.
Timer EJB
33%
Describe the method(s) deploy, should_receive_two_pings in test TimerSessionBeanTest.
Async authentication JASPIC
33%
Describe the method(s) createDeployment in test AsyncAuthenticationPublicTest.
Async server JAXRS
33%
Describe the method(s) createDeployment in test MyResourceTest.
Datasourcedefinition webxml pu JPA
33%
Describe the method(s) deploy, insertAndQueryEntity in test DataSourceDefinitionWebxmlPuTest.
Datasourcedefinition annotation pu JPA
33%
Describe the method(s) deploy, insertAndQueryEntity in test DataSourceDefinitionAnnotationPuTest.
Datasourcedefinition applicationxml pu JPA
33%
Describe the method(s) deploy, insertAndQueryEntity in test DataSourceDefinitionApplicationXMLPuWebTest.
Describe the method(s) deploy, insertAndQueryEntity in test DataSourceDefinitionApplicationXMLPuEJBTest.
Dynamic named query JPA
33%
Describe the method(s) createDeployment, testDynamicNamedCriteriaQueries in test DynamicNamedQueryTest.
Encoder client WebSocket
33%
Describe the method(s) testEndpoint in test MyClientTest.
Basic authentication JASPIC
35%
Describe the method(s) createDeployment, testProtectedPageNotLoggedin, testProtectedPageLoggedin in test BasicAuthenticationProtectedTest.
Describe the method(s) createDeployment, testPublicPageNotLoggedin, testPublicPageLoggedin, testPublicPageNotRememberLogin in test BasicAuthenticationPublicTest.
Describe the method(s) createDeployment in test BasicAuthenticationStatelessTest.
Ejb propagation JASPIC
42%
Describe the method(s) createDeployment, testProtectedServletWithLoginCallingEJB in test ProtectedEJBPropagationTest.
Describe the method(s) createDeployment, testProtectedServletWithLoginCallingEJB in test PublicEJBPropagationTest.
Stateful EJB
50%
Describe the method(s) deployment in test CartBeanWithInterfaceTest.
Describe the method(s) deployment, should_add_items_to_first_cart, should_not_contain_any_items_in_second_cart in test CartBeanStatefulnessTest.
Describe the method(s) deployment, doReentrantCall in test ReentrantCallTest.
Describe the method(s) deployment in test CartBeanTest.
Filter JAXRS
50%
Describe the method(s) createDeployment in test MyResourceTest.
Jaxrs client JAXRS
50%
Describe the method(s) createDeployment, test5ClientSideNegotiation, test6DeleteAll in test MyResourceTest.
Mapping exceptions JAXRS
50%
Describe the method(s) createDeployment in test MyResourceTest.
Readerwriter JAXRS
50%
Describe the method(s) createDeployment in test MyResourceTest.
Ordercolumn JPA
53%
Describe the method(s) createDeployment, saveInOneGo, saveParentWithOneChildFirst, saveParentWithChildrenThenDeleteOned in test OrderColumnBiJoinTest.
Describe the method(s) createDeployment, saveInOneGo in test OrderColumnBiMappedByTest.
Describe the method(s) createDeployment in test OrderColumnUniTest.
Stateless EJB
63%
Describe the method(s) deployment in test AccountSessionStatelessnessTest.
Lifecycle JASPIC
75%
Describe the method(s) createDeployment in test AuthModuleMethodInvocationTest.
Jaxrs endpoint JAXRS
85%
Batchlet Simple Batch
100%
Batch Decision Batch
100%
Batch Flow Batch
100%
Batch Listeners Batch
100%
Batch Split Batch
100%
Batch Schedule Batch
100%
Async Client JAXRS
100%
connector JCA
100%
JPA Listeners JPA
100%

Coder?

Vetoed CDI
0%
Study the sample code and create a test for it
Pkg level CDI
0%
Study the sample code and create a test for it
Exclude filter CDI
0%
Study the sample code and create a test for it
Built in CDI
0%
Study the sample code and create a test for it
Beanmanager CDI
0%
Study the sample code and create a test for it
Extension CDI
0%
Study the sample code and create a test for it
scopes CDI
0%
Study the sample code and create a test for it
managedscheduledexecutor Concurrency
0%
Study the sample code and create a test for it
Dynamicproxy Concurrency
0%
Study the sample code and create a test for it
Lifecycle EJB
0%
Study the sample code and create a test for it
Singleton EJB
0%
Study the sample code and create a test for it
Definition JavaMail
0%
Study the sample code and create a test for it
Common JASPIC
0%
Study the sample code and create a test for it
Filter interceptor JAXRS
0%
Study the sample code and create a test for it
Interceptor JAXRS
0%
Study the sample code and create a test for it
Invocation JAXRS
0%
Study the sample code and create a test for it
Invocation async JAXRS
0%
Study the sample code and create a test for it
Link JAXRS
0%
Study the sample code and create a test for it
Readerwriter json JAXRS
0%
Study the sample code and create a test for it
Request binding JAXRS
0%
Study the sample code and create a test for it
JPA Listeners Injection JPA
0%
Study the sample code and create a test for it
Locking pessimistic JPA
0%
Study the sample code and create a test for it
Unsynchronized pc JPA
0%
Study the sample code and create a test for it
Extended pc JPA
0%
Study the sample code and create a test for it
Ajax JSF
0%
Study the sample code and create a test for it
Components JSF
0%
Study the sample code and create a test for it
Composite component JSF
0%
Study the sample code and create a test for it
Contracts JSF
0%
Study the sample code and create a test for it
Contracts library JSF
0%
Study the sample code and create a test for it
Contracts library impl JSF
0%
Study the sample code and create a test for it
File upload JSF
0%
Study the sample code and create a test for it
Flows simple JSF
0%
Study the sample code and create a test for it
Flows mixed JSF
0%
Study the sample code and create a test for it
Flows programmatic JSF
0%
Study the sample code and create a test for it
Flows declarative JSF
0%
Study the sample code and create a test for it
Passthrough JSF
0%
Study the sample code and create a test for it
Radio buttons JSF
0%
Study the sample code and create a test for it
Resource handling JSF
0%
Study the sample code and create a test for it
Server extension JSF
0%
Study the sample code and create a test for it
Viewscoped JSF
0%
Study the sample code and create a test for it
Cookies Servlet
0%
Study the sample code and create a test for it
Async servlet Servlet
0%
Study the sample code and create a test for it
Error mapping Servlet
0%
Study the sample code and create a test for it
Event listeners Servlet
0%
Study the sample code and create a test for it
Nonblocking Servlet
0%
Study the sample code and create a test for it
Protocol handler Servlet
0%
Study the sample code and create a test for it
Web fragment Servlet
0%
Study the sample code and create a test for it
Endpoint javatypes WebSocket
0%
Study the sample code and create a test for it
Endpoint config WebSocket
0%
Study the sample code and create a test for it
Endpoint programmatic async WebSocket
0%
Study the sample code and create a test for it
Endpoint programmatic config WebSocket
0%
Study the sample code and create a test for it
Endpoint programmatic injection WebSocket
0%
Study the sample code and create a test for it
Endpoint security WebSocket
0%
Study the sample code and create a test for it
Httpsession WebSocket
0%
Study the sample code and create a test for it
Injection WebSocket
0%
Study the sample code and create a test for it
Javase client WebSocket
0%
Study the sample code and create a test for it
Messagesize WebSocket
0%
Study the sample code and create a test for it
Parameters WebSocket
0%
Study the sample code and create a test for it
Properties WebSocket
0%
Study the sample code and create a test for it
Websocket vs rest WebSocket
0%
Study the sample code and create a test for it
Subprotocol WebSocket
0%
Study the sample code and create a test for it
Websocket client WebSocket
0%
Study the sample code and create a test for it
Websocket client config WebSocket
0%
Study the sample code and create a test for it
Websocket client programmatic WebSocket
0%
Study the sample code and create a test for it
Websocket client programmatic config WebSocket
0%
Study the sample code and create a test for it
Websocket client programmatic encoders WebSocket
0%
Study the sample code and create a test for it
Whiteboard WebSocket
0%
Study the sample code and create a test for it
Endpoint singleton WebSocket
0%
Study the sample code and create a test for it
Websocket vs rest payload WebSocket
0%
Study the sample code and create a test for it
+ \ No newline at end of file diff --git a/contributors.html.slim b/contributors.html.slim deleted file mode 100644 index 8231494..0000000 --- a/contributors.html.slim +++ /dev/null @@ -1,58 +0,0 @@ ---- -layout: default -title: Contributors ---- -header - .row - .large-9.columns - h1 ="#{page.title} #{site.identities.contributors().size}" - - .large-3.columns - .action.right - a.button.radius.round.success href="#{site.base_url}/contribute" - |Contribute? - i.fi-wrench - -.row - .large-12.columns - ul.contributors.row - - site.identities.contributors().sort_by{|c| c.commits * Order::DESC}.each do |contributor| - li.large-4.columns itemscope="" itemtype="http://data-vocabulary.org/Person" - div.reveal-modal.hide id="#{contributor.github_id}" data-reveal="" - .modal-header - a.close-reveal-modal - i.fi-remove - h3 - =>contributor.name - small =contributor.location - .modal-body.clearfix - img.thumbnail src="#{contributor.avatar_url(60)}" alt="#{contributor.name}" style='float: left; margin: 2px 10px 3px 0;' - - if !contributor.bio.nil? - markdown: - #{contributor.bio} - - else - | No bio available. - .photo - img src="#{contributor.avatar_url(140)}" alt="#{contributor.name}" data-reveal-id="#{contributor.github_id}" itemprop="photo" - ul - li - - if contributor.blog - a href="#{contributor.blog}" itemprop="url" Blog - - else - span Blog - li - - if !contributor.twitter.nil? - a href="#{contributor.twitter.url}" itemprop="url" Twitter - - else - span Twitter - li - a href="#{contributor.github.profile_url}" itemprop="url" GitHub - meta itemprop="role" content="contributor" - h5 itemprop="name"=contributor.name - strong itemprop="affiliation"=contributor.company - em itemscope="" itemprop="address" itemtype="http://www.data-vocabulary.org/Address" - span itemprop="locality" =contributor.location -.row - .large-12.columns - strong Is your information incomplete? Is your profile picture missing? - p.clearfix This page mirrors information from your public github and gravatar profiles. To update your information, fill in your name, location and bio in your github account. To get a photo or avatar to display, upload an image to the gravatar account that's linked to your github account. If you don't want your information on this page, please let us know and we'll honor your request. diff --git a/contributors/index.html b/contributors/index.html new file mode 100644 index 0000000..636a3c4 --- /dev/null +++ b/contributors/index.html @@ -0,0 +1,16 @@ +Contributors

Contributors 43

  • Arun-gupta
    Red Hat SoftwareSan Jose, CA
  • Roberto Cortez
    Roberto Cortez
    Portugal
  • Aslak Knutsen
    Red Hat, Inc.Oslo, Norway
  • Kuba Marchwicki
    Kuba Marchwicki
    Young Digital Planet SAGdańsk / Poland
  • Arjan Tijms
    Arjan Tijms
    Amsterdam
  • Alexis Hassler
    Alexis Hassler
    SewatechBeaujolais (France)
  • Patrik Duditš
    Patrik Duditš
    Košice, Slovakia
  • Radim Hanus
    Radim Hanus
    Prague
  • John Ament
    John Ament
  • Juraj Huska
    Juraj Huska
  • Nikolaos Ballas
    Nikolaos Ballas
    Somewhere
  • Petr Sakař
    Petr Sakař
  • Dagguh
    Dagguh
  • Fermin Gallego
    Fermin Gallego
    Madrid, Spain
  • Bartosz Majsak
    Zurich, Switzerland
  • Xavier Coulon
    Xavier Coulon
    JBoss/Red HatLille, France
  • Alexander Heusingfeld
    Alexander Heusingfeld
    First Point IT SolutionsHilden, Germany
  • Maxime Gréau
    Maxime Gréau
    DGFIP - SRENantes, France
  • Bernard Labno
    Bernard Labno
    IT CrowdWarsaw, Poland
  • Abhishek Gupta
    India
  • Heiko Scherrer
    Heiko Scherrer
    OpenWMS.orgEurope
  • Korneliusz Rabczak
    Korneliusz Rabczak
    Poland
  • Arend.von.reinersdorff
    Arend.von.reinersdorff
  • Cédric Levasseur
    Cédric Levasseur
    France
  • Guillaume Scheibel
    Strasbourg, France
  • Jacek Jackowiak
    Jacek Jackowiak
    Young Digital Planet SARumia, Poland
  • Jeff Zhang
    Jeff Zhang
    JBossBeijing
  • Michael Figuiere
    Michael Figuiere
    DataStaxSan Francisco
  • Ondrej Zizka
    Ondrej Zizka
    Red HatBrno
  • Philippe Marschall
    Philippe Marschall
  • Rafał Roppel
    Rafał Roppel
    Gdańsk
  • Scott Kurz
    Scott Kurz
    IBMPoughkeepsie, NY
  • Daniel Cunha (soro)
    Daniel Cunha (soro)
    BitMaker SoftwarePorto, Portugal
  • Nico Schlebusch
    Nico Schlebusch
    Slash IT Services (Pty) LtdSouth Africa
  • Andrew Guibert
    Andrew Guibert
    Rochester, MN
  • Lucas Ponce
    Lucas Ponce
    Madrid
  • Max Rydahl Andersen
    Max Rydahl Andersen
    Red HatSwitzerland
  • Suxxa
    Suxxa
  • Tomas Remes
    Tomas Remes
    Brno
  • Stefan Guilhen
    Stefan Guilhen
    Red HatSao Paulo
  • Andrey Cheptsov
    Andrey Cheptsov
    JetBrains
  • Jeanfrancois Arcand
    Jeanfrancois Arcand
    Author of the Atmosphere Framework and AsyncHttpClient (AHC)Prévost
  • Fotofinder
    Fotofinder
    FotofinderBerlin
Is your information incomplete? Is your profile picture missing?

This page mirrors information from your public github and gravatar profiles. To update your information, fill in your name, location and bio in your github account. To get a photo or avatar to display, upload an image to the gravatar account that's linked to your github account. If you don't want your information on this page, please let us know and we'll honor your request.

+ \ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 0000000..3127af9 --- /dev/null +++ b/index.html @@ -0,0 +1,13 @@ +Navigate your way through EE via Tests

Learn how to use Java EE

About

JavaEE Samples are small snippets showing how to use JavaEE.

Goal

The goal of the JavaEE Samples is to be a reference for how to use the different specifictions within the JavaEE umbrella specification.

Concept

Learn JavaEE via Tests.

Batch Processing for Java Platform 1.0 (15)

Batchlet Simple - Execute a task oriented step
Chunk Checkpoint - Custom Checkpoint Policy
Chunk Processing - Read, Process, Write to a Database
Chunk Exception Handling - Retrying and Skipping
Chunk Processing - Read, Process, Write in multiple Threads
Chunk Processing - Read and Write
Chunk Processing - Read, Process, Write in multiple Threads
Chunk Processing - Read, Process, Write
Batch DSL - Decision
Batch DSL - Flow
Batch Listeners - Applying Listeners to Job, Chunk, Step, Reader, Processor and Writer
Batch JSL - Executing Multiple Steps
Batch JSL - Splitting Steps
Chunk Processing - Read, Process, Write
Scheduling a Batch Job
Java Message Service API 2.0 (4)

Arquillian test for JMS XA
Request/Response over JMS
ItemReader reading from durable subscription
+ \ No newline at end of file diff --git a/index.html.slim b/index.html.slim deleted file mode 100644 index 512b3f1..0000000 --- a/index.html.slim +++ /dev/null @@ -1,57 +0,0 @@ ---- -layout: default ---- -header - .row - .large-9.columns - h1 Learn how to use Java EE - - .large-3.columns - .action.right - a.button.radius.round.success href="#{site.base_url}/contribute" - |Contribute? - i.fi-wrench - - .sub - .row - .large-4.columns - h3 About - p JavaEE Samples are small snippets showing how to use JavaEE. - - .large-4.columns - h3 Goal - p The goal of the JavaEE Samples is to be a reference for how to use the different specifictions within the JavaEE umbrella specification. - - .large-4.columns - h3 Concept - p Learn JavaEE via Tests. - -.row.categories - - for category in site.categories - - samples = site.showcases.by_category_id(category.id) - .large-6.columns.category - .panel - h5 - a id="#{category.id}" =>category.name - small ="(#{samples.length})" - hr - .samples - - for sample in samples - .sample - .row - .large-8.columns - h6 - a href="#{sample.output_path}" =sample.showcase.name - .status - - results = site.results.summary_by_sample(sample.showcase) - - unless results.nil? or results.empty? - ul.inline-list.right style="margin-left:0em;" - - for name, status in results.each - - icon = status ? 'fi-like' : 'fi-dislike' - - color = status ? 'green' : 'red' - - title = status ? "All tests pass on #{name}" : "Not all tests pass on #{name}" - li style="margin-left: 0.3em" - i class="#{icon}" title="#{title}" style="color: #{color}" - - .row - .columns.desc=sample.showcase.description diff --git a/javascripts/foundation/foundation.abide.js b/javascripts/foundation/foundation.abide.js index f624f83..671c8d9 100644 --- a/javascripts/foundation/foundation.abide.js +++ b/javascripts/foundation/foundation.abide.js @@ -1,194 +1 @@ -/*jslint unparam: true, browser: true, indent: 2 */ - -;(function ($, window, document, undefined) { - 'use strict'; - - Foundation.libs.abide = { - name : 'abide', - - version : '4.3.2', - - settings : { - live_validate : true, - focus_on_invalid : true, - timeout : 1000, - patterns : { - alpha: /[a-zA-Z]+/, - alpha_numeric : /[a-zA-Z0-9]+/, - integer: /-?\d+/, - number: /-?(?:\d+|\d{1,3}(?:,\d{3})+)?(?:\.\d+)?/, - - // generic password: upper-case, lower-case, number/special character, and min 8 characters - password : /(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/, - - // amex, visa, diners - card : /^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11})$/, - cvv : /^([0-9]){3,4}$/, - - // http://www.whatwg.org/specs/web-apps/current-work/multipage/states-of-the-type-attribute.html#valid-e-mail-address - email : /^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/, - - url: /(https?|ftp|file|ssh):\/\/(((([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?/, - // abc.de - domain: /^([a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,6}$/, - - datetime: /([0-2][0-9]{3})\-([0-1][0-9])\-([0-3][0-9])T([0-5][0-9])\:([0-5][0-9])\:([0-5][0-9])(Z|([\-\+]([0-1][0-9])\:00))/, - // YYYY-MM-DD - date: /(?:19|20)[0-9]{2}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1[0-9]|2[0-9])|(?:(?!02)(?:0[1-9]|1[0-2])-(?:30))|(?:(?:0[13578]|1[02])-31))/, - // HH:MM:SS - time : /(0[0-9]|1[0-9]|2[0-3])(:[0-5][0-9]){2}/, - dateISO: /\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}/, - // MM/DD/YYYY - month_day_year : /(0[1-9]|1[012])[- \/.](0[1-9]|[12][0-9]|3[01])[- \/.](19|20)\d\d/, - - // #FFF or #FFFFFF - color: /^#?([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/ - } - }, - - timer : null, - - init : function (scope, method, options) { - if (typeof method === 'object') { - $.extend(true, this.settings, method); - } - - if (typeof method !== 'string') { - if (!this.settings.init) { this.events(); } - - } else { - return this[method].call(this, options); - } - }, - - events : function () { - var self = this, - forms = $('form[data-abide]', this.scope).attr('novalidate', 'novalidate'); - - forms - .on('submit validate', function (e) { - return self.validate($(this).find('input, textarea, select').get(), e); - }); - - this.settings.init = true; - - if (!this.settings.live_validate) return; - - forms - .find('input, textarea, select') - .on('blur change', function (e) { - self.validate([this], e); - }) - .on('keydown', function (e) { - clearTimeout(self.timer); - self.timer = setTimeout(function () { - self.validate([this], e); - }.bind(this), self.settings.timeout); - }); - }, - - validate : function (els, e) { - var validations = this.parse_patterns(els), - validation_count = validations.length, - form = $(els[0]).closest('form'); - - for (var i=0; i < validation_count; i++) { - if (!validations[i] && /submit/.test(e.type)) { - if (this.settings.focus_on_invalid) els[i].focus(); - form.trigger('invalid'); - $(els[i]).closest('form').attr('data-invalid', ''); - return false; - } - } - - if (/submit/.test(e.type)) { - form.trigger('valid'); - } - - form.removeAttr('data-invalid'); - - return true; - }, - - parse_patterns : function (els) { - var count = els.length, - el_patterns = []; - - for (var i = count - 1; i >= 0; i--) { - el_patterns.push(this.pattern(els[i])); - } - - return this.check_validation_and_apply_styles(el_patterns); - }, - - pattern : function (el) { - var type = el.getAttribute('type'), - required = typeof el.getAttribute('required') === 'string'; - - if (this.settings.patterns.hasOwnProperty(type)) { - return [el, this.settings.patterns[type], required]; - } - - var pattern = el.getAttribute('pattern') || ''; - - if (this.settings.patterns.hasOwnProperty(pattern) && pattern.length > 0) { - return [el, this.settings.patterns[pattern], required]; - } else if (pattern.length > 0) { - return [el, new RegExp(pattern), required]; - } - - pattern = /.*/; - - return [el, pattern, required]; - }, - - check_validation_and_apply_styles : function (el_patterns) { - var count = el_patterns.length, - validations = []; - - for (var i = count - 1; i >= 0; i--) { - var el = el_patterns[i][0], - required = el_patterns[i][2], - value = el.value, - is_radio = el.type === "radio", - valid_length = (required) ? (el.value.length > 0) : true; - - if (is_radio && required) { - validations.push(this.valid_radio(el, required)); - } else { - if (el_patterns[i][1].test(value) && valid_length || - !required && el.value.length < 1) { - $(el).removeAttr('data-invalid').parent().removeClass('error'); - validations.push(true); - } else { - $(el).attr('data-invalid', '').parent().addClass('error'); - validations.push(false); - } - } - } - - return validations; - }, - - valid_radio : function (el, required) { - var name = el.getAttribute('name'), - group = document.getElementsByName(name), - count = group.length, - valid = false; - - for (var i=0; i < count; i++) { - if (group[i].checked) valid = true; - } - - for (var i=0; i < count; i++) { - if (valid) { - $(group[i]).removeAttr('data-invalid').parent().removeClass('error'); - } else { - $(group[i]).attr('data-invalid', '').parent().addClass('error'); - } - } - - return valid; - } - }; -}(Foundation.zj, this, this.document)); \ No newline at end of file +!function($,window,document){"use strict";Foundation.libs.abide={name:"abide",version:"4.3.2",settings:{live_validate:!0,focus_on_invalid:!0,timeout:1e3,patterns:{alpha:/[a-zA-Z]+/,alpha_numeric:/[a-zA-Z0-9]+/,integer:/-?\d+/,number:/-?(?:\d+|\d{1,3}(?:,\d{3})+)?(?:\.\d+)?/,password:/(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/,card:/^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11})$/,cvv:/^([0-9]){3,4}$/,email:/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,url:/(https?|ftp|file|ssh):\/\/(((([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?/,domain:/^([a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,6}$/,datetime:/([0-2][0-9]{3})\-([0-1][0-9])\-([0-3][0-9])T([0-5][0-9])\:([0-5][0-9])\:([0-5][0-9])(Z|([\-\+]([0-1][0-9])\:00))/,date:/(?:19|20)[0-9]{2}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1[0-9]|2[0-9])|(?:(?!02)(?:0[1-9]|1[0-2])-(?:30))|(?:(?:0[13578]|1[02])-31))/,time:/(0[0-9]|1[0-9]|2[0-3])(:[0-5][0-9]){2}/,dateISO:/\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}/,month_day_year:/(0[1-9]|1[012])[- \/.](0[1-9]|[12][0-9]|3[01])[- \/.](19|20)\d\d/,color:/^#?([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/}},timer:null,init:function(scope,method,options){return"object"==typeof method&&$.extend(!0,this.settings,method),"string"==typeof method?this[method].call(this,options):void(this.settings.init||this.events())},events:function(){var self=this,forms=$("form[data-abide]",this.scope).attr("novalidate","novalidate");forms.on("submit validate",function(e){return self.validate($(this).find("input, textarea, select").get(),e)}),this.settings.init=!0,this.settings.live_validate&&forms.find("input, textarea, select").on("blur change",function(e){self.validate([this],e)}).on("keydown",function(e){clearTimeout(self.timer),self.timer=setTimeout(function(){self.validate([this],e)}.bind(this),self.settings.timeout)})},validate:function(els,e){for(var validations=this.parse_patterns(els),validation_count=validations.length,form=$(els[0]).closest("form"),i=0;validation_count>i;i++)if(!validations[i]&&/submit/.test(e.type))return this.settings.focus_on_invalid&&els[i].focus(),form.trigger("invalid"),$(els[i]).closest("form").attr("data-invalid",""),!1;return/submit/.test(e.type)&&form.trigger("valid"),form.removeAttr("data-invalid"),!0},parse_patterns:function(els){for(var count=els.length,el_patterns=[],i=count-1;i>=0;i--)el_patterns.push(this.pattern(els[i]));return this.check_validation_and_apply_styles(el_patterns)},pattern:function(el){var type=el.getAttribute("type"),required="string"==typeof el.getAttribute("required");if(this.settings.patterns.hasOwnProperty(type))return[el,this.settings.patterns[type],required];var pattern=el.getAttribute("pattern")||"";return this.settings.patterns.hasOwnProperty(pattern)&&pattern.length>0?[el,this.settings.patterns[pattern],required]:pattern.length>0?[el,new RegExp(pattern),required]:(pattern=/.*/,[el,pattern,required])},check_validation_and_apply_styles:function(el_patterns){for(var count=el_patterns.length,validations=[],i=count-1;i>=0;i--){var el=el_patterns[i][0],required=el_patterns[i][2],value=el.value,is_radio="radio"===el.type,valid_length=required?el.value.length>0:!0;is_radio&&required?validations.push(this.valid_radio(el,required)):el_patterns[i][1].test(value)&&valid_length||!required&&el.value.length<1?($(el).removeAttr("data-invalid").parent().removeClass("error"),validations.push(!0)):($(el).attr("data-invalid","").parent().addClass("error"),validations.push(!1))}return validations},valid_radio:function(el){for(var name=el.getAttribute("name"),group=document.getElementsByName(name),count=group.length,valid=!1,i=0;count>i;i++)group[i].checked&&(valid=!0);for(var i=0;count>i;i++)valid?$(group[i]).removeAttr("data-invalid").parent().removeClass("error"):$(group[i]).attr("data-invalid","").parent().addClass("error");return valid}}}(Foundation.zj,this,this.document); \ No newline at end of file diff --git a/javascripts/foundation/foundation.alerts.js b/javascripts/foundation/foundation.alerts.js index 63dada0..842e080 100644 --- a/javascripts/foundation/foundation.alerts.js +++ b/javascripts/foundation/foundation.alerts.js @@ -1,57 +1 @@ -/*jslint unparam: true, browser: true, indent: 2 */ - -;(function ($, window, document, undefined) { - 'use strict'; - - Foundation.libs.alerts = { - name : 'alerts', - - version : '4.3.2', - - settings : { - animation: 'fadeOut', - speed: 300, // fade out speed - callback: function (){} - }, - - init : function (scope, method, options) { - this.scope = scope || this.scope; - Foundation.inherit(this, 'data_options'); - - if (typeof method === 'object') { - $.extend(true, this.settings, method); - } - - if (typeof method !== 'string') { - if (!this.settings.init) { this.events(); } - - return this.settings.init; - } else { - return this[method].call(this, options); - } - }, - - events : function () { - var self = this; - - $(this.scope).on('click.fndtn.alerts', '[data-alert] a.close', function (e) { - var alertBox = $(this).closest("[data-alert]"), - settings = $.extend({}, self.settings, self.data_options(alertBox)); - - e.preventDefault(); - alertBox[settings.animation](settings.speed, function () { - $(this).remove(); - settings.callback(); - }); - }); - - this.settings.init = true; - }, - - off : function () { - $(this.scope).off('.fndtn.alerts'); - }, - - reflow : function () {} - }; -}(Foundation.zj, this, this.document)); +!function($){"use strict";Foundation.libs.alerts={name:"alerts",version:"4.3.2",settings:{animation:"fadeOut",speed:300,callback:function(){}},init:function(scope,method,options){return this.scope=scope||this.scope,Foundation.inherit(this,"data_options"),"object"==typeof method&&$.extend(!0,this.settings,method),"string"!=typeof method?(this.settings.init||this.events(),this.settings.init):this[method].call(this,options)},events:function(){var self=this;$(this.scope).on("click.fndtn.alerts","[data-alert] a.close",function(e){var alertBox=$(this).closest("[data-alert]"),settings=$.extend({},self.settings,self.data_options(alertBox));e.preventDefault(),alertBox[settings.animation](settings.speed,function(){$(this).remove(),settings.callback()})}),this.settings.init=!0},off:function(){$(this.scope).off(".fndtn.alerts")},reflow:function(){}}}(Foundation.zj,this,this.document); \ No newline at end of file diff --git a/javascripts/foundation/foundation.clearing.js b/javascripts/foundation/foundation.clearing.js index a63b53e..99d0912 100644 --- a/javascripts/foundation/foundation.clearing.js +++ b/javascripts/foundation/foundation.clearing.js @@ -1,516 +1 @@ -/*jslint unparam: true, browser: true, indent: 2 */ - -;(function ($, window, document, undefined) { - 'use strict'; - - Foundation.libs.clearing = { - name : 'clearing', - - version: '4.3.2', - - settings : { - templates : { - viewing : '×' + - '' - }, - - // comma delimited list of selectors that, on click, will close clearing, - // add 'div.clearing-blackout, div.visible-img' to close on background click - close_selectors : '.clearing-close', - - // event initializers and locks - init : false, - locked : false - }, - - init : function (scope, method, options) { - var self = this; - Foundation.inherit(this, 'set_data get_data remove_data throttle data_options'); - - if (typeof method === 'object') { - options = $.extend(true, this.settings, method); - } - - if (typeof method !== 'string') { - $(this.scope).find('ul[data-clearing]').each(function () { - var $el = $(this), - options = options || {}, - lis = $el.find('li'), - settings = self.get_data($el); - - if (!settings && lis.length > 0) { - options.$parent = $el.parent(); - - self.set_data($el, $.extend({}, self.settings, options, self.data_options($el))); - - self.assemble($el.find('li')); - - if (!self.settings.init) { - self.events().swipe_events(); - } - } - }); - - return this.settings.init; - } else { - // fire method - return this[method].call(this, options); - } - }, - - // event binding and initial setup - - events : function () { - var self = this; - - $(this.scope) - .on('click.fndtn.clearing', 'ul[data-clearing] li', - function (e, current, target) { - var current = current || $(this), - target = target || current, - next = current.next('li'), - settings = self.get_data(current.parent()), - image = $(e.target); - - e.preventDefault(); - if (!settings) self.init(); - - // if clearing is open and the current image is - // clicked, go to the next image in sequence - if (target.hasClass('visible') && - current[0] === target[0] && - next.length > 0 && self.is_open(current)) { - target = next; - image = target.find('img'); - } - - // set current and target to the clicked li if not otherwise defined. - self.open(image, current, target); - self.update_paddles(target); - }) - - .on('click.fndtn.clearing', '.clearing-main-next', - function (e) { this.nav(e, 'next') }.bind(this)) - .on('click.fndtn.clearing', '.clearing-main-prev', - function (e) { this.nav(e, 'prev') }.bind(this)) - .on('click.fndtn.clearing', this.settings.close_selectors, - function (e) { Foundation.libs.clearing.close(e, this) }) - .on('keydown.fndtn.clearing', - function (e) { this.keydown(e) }.bind(this)); - - $(window).on('resize.fndtn.clearing', - function () { this.resize() }.bind(this)); - - this.settings.init = true; - return this; - }, - - swipe_events : function () { - var self = this; - - $(this.scope) - .on('touchstart.fndtn.clearing', '.visible-img', function(e) { - if (!e.touches) { e = e.originalEvent; } - var data = { - start_page_x: e.touches[0].pageX, - start_page_y: e.touches[0].pageY, - start_time: (new Date()).getTime(), - delta_x: 0, - is_scrolling: undefined - }; - - $(this).data('swipe-transition', data); - e.stopPropagation(); - }) - .on('touchmove.fndtn.clearing', '.visible-img', function(e) { - if (!e.touches) { e = e.originalEvent; } - // Ignore pinch/zoom events - if(e.touches.length > 1 || e.scale && e.scale !== 1) return; - - var data = $(this).data('swipe-transition'); - - if (typeof data === 'undefined') { - data = {}; - } - - data.delta_x = e.touches[0].pageX - data.start_page_x; - - if ( typeof data.is_scrolling === 'undefined') { - data.is_scrolling = !!( data.is_scrolling || Math.abs(data.delta_x) < Math.abs(e.touches[0].pageY - data.start_page_y) ); - } - - if (!data.is_scrolling && !data.active) { - e.preventDefault(); - var direction = (data.delta_x < 0) ? 'next' : 'prev'; - data.active = true; - self.nav(e, direction); - } - }) - .on('touchend.fndtn.clearing', '.visible-img', function(e) { - $(this).data('swipe-transition', {}); - e.stopPropagation(); - }); - }, - - assemble : function ($li) { - var $el = $li.parent(); - $el.after('
'); - - var holder = $('#foundationClearingHolder'), - settings = this.get_data($el), - grid = $el.detach(), - data = { - grid: '', - viewing: settings.templates.viewing - }, - wrapper = '
' + data.viewing + - data.grid + '
'; - - return holder.after(wrapper).remove(); - }, - - // event callbacks - - open : function ($image, current, target) { - var root = target.closest('.clearing-assembled'), - container = root.find('div').first(), - visible_image = container.find('.visible-img'), - image = visible_image.find('img').not($image); - - if (!this.locked()) { - // set the image to the selected thumbnail - image - .attr('src', this.load($image)) - .css('visibility', 'hidden'); - - this.loaded(image, function () { - image.css('visibility', 'visible'); - // toggle the gallery - root.addClass('clearing-blackout'); - container.addClass('clearing-container'); - visible_image.show(); - this.fix_height(target) - .caption(visible_image.find('.clearing-caption'), $image) - .center(image) - .shift(current, target, function () { - target.siblings().removeClass('visible'); - target.addClass('visible'); - }); - }.bind(this)); - } - }, - - close : function (e, el) { - e.preventDefault(); - - var root = (function (target) { - if (/blackout/.test(target.selector)) { - return target; - } else { - return target.closest('.clearing-blackout'); - } - }($(el))), container, visible_image; - - if (el === e.target && root) { - container = root.find('div').first(); - visible_image = container.find('.visible-img'); - this.settings.prev_index = 0; - root.find('ul[data-clearing]') - .attr('style', '').closest('.clearing-blackout') - .removeClass('clearing-blackout'); - container.removeClass('clearing-container'); - visible_image.hide(); - } - - return false; - }, - - is_open : function (current) { - return current.parent().prop('style').length > 0; - }, - - keydown : function (e) { - var clearing = $('.clearing-blackout').find('ul[data-clearing]'); - - if (e.which === 39) this.go(clearing, 'next'); - if (e.which === 37) this.go(clearing, 'prev'); - if (e.which === 27) $('a.clearing-close').trigger('click'); - }, - - nav : function (e, direction) { - var clearing = $('.clearing-blackout').find('ul[data-clearing]'); - - e.preventDefault(); - this.go(clearing, direction); - }, - - resize : function () { - var image = $('.clearing-blackout .visible-img').find('img'); - - if (image.length) { - this.center(image); - } - }, - - // visual adjustments - fix_height : function (target) { - var lis = target.parent().children(), - self = this; - - lis.each(function () { - var li = $(this), - image = li.find('img'); - - if (li.height() > self.outerHeight(image)) { - li.addClass('fix-height'); - } - }) - .closest('ul') - .width(lis.length * 100 + '%'); - - return this; - }, - - update_paddles : function (target) { - var visible_image = target - .closest('.carousel') - .siblings('.visible-img'); - - if (target.next().length > 0) { - visible_image - .find('.clearing-main-next') - .removeClass('disabled'); - } else { - visible_image - .find('.clearing-main-next') - .addClass('disabled'); - } - - if (target.prev().length > 0) { - visible_image - .find('.clearing-main-prev') - .removeClass('disabled'); - } else { - visible_image - .find('.clearing-main-prev') - .addClass('disabled'); - } - }, - - center : function (target) { - if (!this.rtl) { - target.css({ - marginLeft : -(this.outerWidth(target) / 2), - marginTop : -(this.outerHeight(target) / 2) - }); - } else { - target.css({ - marginRight : -(this.outerWidth(target) / 2), - marginTop : -(this.outerHeight(target) / 2) - }); - } - return this; - }, - - // image loading and preloading - - load : function ($image) { - if ($image[0].nodeName === "A") { - var href = $image.attr('href'); - } else { - var href = $image.parent().attr('href'); - } - - this.preload($image); - - if (href) return href; - return $image.attr('src'); - }, - - preload : function ($image) { - this - .img($image.closest('li').next()) - .img($image.closest('li').prev()); - }, - - loaded : function (image, callback) { - // based on jquery.imageready.js - // @weblinc, @jsantell, (c) 2012 - - function loaded () { - callback(); - } - - function bindLoad () { - this.one('load', loaded); - - if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)) { - var src = this.attr( 'src' ), - param = src.match( /\?/ ) ? '&' : '?'; - - param += 'random=' + (new Date()).getTime(); - this.attr('src', src + param); - } - } - - if (!image.attr('src')) { - loaded(); - return; - } - - if (image[0].complete || image[0].readyState === 4) { - loaded(); - } else { - bindLoad.call(image); - } - }, - - img : function (img) { - if (img.length) { - var new_img = new Image(), - new_a = img.find('a'); - - if (new_a.length) { - new_img.src = new_a.attr('href'); - } else { - new_img.src = img.find('img').attr('src'); - } - } - return this; - }, - - // image caption - - caption : function (container, $image) { - var caption = $image.data('caption'); - - if (caption) { - container - .html(caption) - .show(); - } else { - container - .text('') - .hide(); - } - return this; - }, - - // directional methods - - go : function ($ul, direction) { - var current = $ul.find('.visible'), - target = current[direction](); - - if (target.length) { - target - .find('img') - .trigger('click', [current, target]); - } - }, - - shift : function (current, target, callback) { - var clearing = target.parent(), - old_index = this.settings.prev_index || target.index(), - direction = this.direction(clearing, current, target), - left = parseInt(clearing.css('left'), 10), - width = this.outerWidth(target), - skip_shift; - - // we use jQuery animate instead of CSS transitions because we - // need a callback to unlock the next animation - if (target.index() !== old_index && !/skip/.test(direction)){ - if (/left/.test(direction)) { - this.lock(); - clearing.animate({left : left + width}, 300, this.unlock()); - } else if (/right/.test(direction)) { - this.lock(); - clearing.animate({left : left - width}, 300, this.unlock()); - } - } else if (/skip/.test(direction)) { - // the target image is not adjacent to the current image, so - // do we scroll right or not - skip_shift = target.index() - this.settings.up_count; - this.lock(); - - if (skip_shift > 0) { - clearing.animate({left : -(skip_shift * width)}, 300, this.unlock()); - } else { - clearing.animate({left : 0}, 300, this.unlock()); - } - } - - callback(); - }, - - direction : function ($el, current, target) { - var lis = $el.find('li'), - li_width = this.outerWidth(lis) + (this.outerWidth(lis) / 4), - up_count = Math.floor(this.outerWidth($('.clearing-container')) / li_width) - 1, - target_index = lis.index(target), - response; - - this.settings.up_count = up_count; - - if (this.adjacent(this.settings.prev_index, target_index)) { - if ((target_index > up_count) - && target_index > this.settings.prev_index) { - response = 'right'; - } else if ((target_index > up_count - 1) - && target_index <= this.settings.prev_index) { - response = 'left'; - } else { - response = false; - } - } else { - response = 'skip'; - } - - this.settings.prev_index = target_index; - - return response; - }, - - adjacent : function (current_index, target_index) { - for (var i = target_index + 1; i >= target_index - 1; i--) { - if (i === current_index) return true; - } - return false; - }, - - // lock management - - lock : function () { - this.settings.locked = true; - }, - - unlock : function () { - this.settings.locked = false; - }, - - locked : function () { - return this.settings.locked; - }, - - // plugin management/browser quirks - - outerHTML : function (el) { - // support FireFox < 11 - return el.outerHTML || new XMLSerializer().serializeToString(el); - }, - - off : function () { - $(this.scope).off('.fndtn.clearing'); - $(window).off('.fndtn.clearing'); - this.remove_data(); // empty settings cache - this.settings.init = false; - }, - - reflow : function () { - this.init(); - } - }; - -}(Foundation.zj, this, this.document)); +!function($,window,document,undefined){"use strict";Foundation.libs.clearing={name:"clearing",version:"4.3.2",settings:{templates:{viewing:'×'},close_selectors:".clearing-close",init:!1,locked:!1},init:function(scope,method,options){var self=this;return Foundation.inherit(this,"set_data get_data remove_data throttle data_options"),"object"==typeof method&&(options=$.extend(!0,this.settings,method)),"string"!=typeof method?($(this.scope).find("ul[data-clearing]").each(function(){var $el=$(this),options=options||{},lis=$el.find("li"),settings=self.get_data($el);!settings&&lis.length>0&&(options.$parent=$el.parent(),self.set_data($el,$.extend({},self.settings,options,self.data_options($el))),self.assemble($el.find("li")),self.settings.init||self.events().swipe_events())}),this.settings.init):this[method].call(this,options)},events:function(){var self=this;return $(this.scope).on("click.fndtn.clearing","ul[data-clearing] li",function(e,current,target){var current=current||$(this),target=target||current,next=current.next("li"),settings=self.get_data(current.parent()),image=$(e.target);e.preventDefault(),settings||self.init(),target.hasClass("visible")&¤t[0]===target[0]&&next.length>0&&self.is_open(current)&&(target=next,image=target.find("img")),self.open(image,current,target),self.update_paddles(target)}).on("click.fndtn.clearing",".clearing-main-next",function(e){this.nav(e,"next")}.bind(this)).on("click.fndtn.clearing",".clearing-main-prev",function(e){this.nav(e,"prev")}.bind(this)).on("click.fndtn.clearing",this.settings.close_selectors,function(e){Foundation.libs.clearing.close(e,this)}).on("keydown.fndtn.clearing",function(e){this.keydown(e)}.bind(this)),$(window).on("resize.fndtn.clearing",function(){this.resize()}.bind(this)),this.settings.init=!0,this},swipe_events:function(){var self=this;$(this.scope).on("touchstart.fndtn.clearing",".visible-img",function(e){e.touches||(e=e.originalEvent);var data={start_page_x:e.touches[0].pageX,start_page_y:e.touches[0].pageY,start_time:(new Date).getTime(),delta_x:0,is_scrolling:undefined};$(this).data("swipe-transition",data),e.stopPropagation()}).on("touchmove.fndtn.clearing",".visible-img",function(e){if(e.touches||(e=e.originalEvent),!(e.touches.length>1||e.scale&&1!==e.scale)){var data=$(this).data("swipe-transition");if("undefined"==typeof data&&(data={}),data.delta_x=e.touches[0].pageX-data.start_page_x,"undefined"==typeof data.is_scrolling&&(data.is_scrolling=!!(data.is_scrolling||Math.abs(data.delta_x)');var holder=$("#foundationClearingHolder"),settings=this.get_data($el),grid=$el.detach(),data={grid:'",viewing:settings.templates.viewing},wrapper='
'+data.viewing+data.grid+"
";return holder.after(wrapper).remove()},open:function($image,current,target){var root=target.closest(".clearing-assembled"),container=root.find("div").first(),visible_image=container.find(".visible-img"),image=visible_image.find("img").not($image);this.locked()||(image.attr("src",this.load($image)).css("visibility","hidden"),this.loaded(image,function(){image.css("visibility","visible"),root.addClass("clearing-blackout"),container.addClass("clearing-container"),visible_image.show(),this.fix_height(target).caption(visible_image.find(".clearing-caption"),$image).center(image).shift(current,target,function(){target.siblings().removeClass("visible"),target.addClass("visible")})}.bind(this)))},close:function(e,el){e.preventDefault();var container,visible_image,root=function(target){return/blackout/.test(target.selector)?target:target.closest(".clearing-blackout")}($(el));return el===e.target&&root&&(container=root.find("div").first(),visible_image=container.find(".visible-img"),this.settings.prev_index=0,root.find("ul[data-clearing]").attr("style","").closest(".clearing-blackout").removeClass("clearing-blackout"),container.removeClass("clearing-container"),visible_image.hide()),!1},is_open:function(current){return current.parent().prop("style").length>0},keydown:function(e){var clearing=$(".clearing-blackout").find("ul[data-clearing]");39===e.which&&this.go(clearing,"next"),37===e.which&&this.go(clearing,"prev"),27===e.which&&$("a.clearing-close").trigger("click")},nav:function(e,direction){var clearing=$(".clearing-blackout").find("ul[data-clearing]");e.preventDefault(),this.go(clearing,direction)},resize:function(){var image=$(".clearing-blackout .visible-img").find("img");image.length&&this.center(image)},fix_height:function(target){var lis=target.parent().children(),self=this;return lis.each(function(){var li=$(this),image=li.find("img");li.height()>self.outerHeight(image)&&li.addClass("fix-height")}).closest("ul").width(100*lis.length+"%"),this},update_paddles:function(target){var visible_image=target.closest(".carousel").siblings(".visible-img");target.next().length>0?visible_image.find(".clearing-main-next").removeClass("disabled"):visible_image.find(".clearing-main-next").addClass("disabled"),target.prev().length>0?visible_image.find(".clearing-main-prev").removeClass("disabled"):visible_image.find(".clearing-main-prev").addClass("disabled")},center:function(target){return target.css(this.rtl?{marginRight:-(this.outerWidth(target)/2),marginTop:-(this.outerHeight(target)/2)}:{marginLeft:-(this.outerWidth(target)/2),marginTop:-(this.outerHeight(target)/2)}),this},load:function($image){if("A"===$image[0].nodeName)var href=$image.attr("href");else var href=$image.parent().attr("href");return this.preload($image),href?href:$image.attr("src")},preload:function($image){this.img($image.closest("li").next()).img($image.closest("li").prev())},loaded:function(image,callback){function loaded(){callback()}function bindLoad(){if(this.one("load",loaded),/MSIE (\d+\.\d+);/.test(navigator.userAgent)){var src=this.attr("src"),param=src.match(/\?/)?"&":"?";param+="random="+(new Date).getTime(),this.attr("src",src+param)}}return image.attr("src")?void(image[0].complete||4===image[0].readyState?loaded():bindLoad.call(image)):void loaded()},img:function(img){if(img.length){var new_img=new Image,new_a=img.find("a");new_img.src=new_a.length?new_a.attr("href"):img.find("img").attr("src")}return this},caption:function(container,$image){var caption=$image.data("caption");return caption?container.html(caption).show():container.text("").hide(),this},go:function($ul,direction){var current=$ul.find(".visible"),target=current[direction]();target.length&&target.find("img").trigger("click",[current,target])},shift:function(current,target,callback){var skip_shift,clearing=target.parent(),old_index=this.settings.prev_index||target.index(),direction=this.direction(clearing,current,target),left=parseInt(clearing.css("left"),10),width=this.outerWidth(target);target.index()===old_index||/skip/.test(direction)?/skip/.test(direction)&&(skip_shift=target.index()-this.settings.up_count,this.lock(),skip_shift>0?clearing.animate({left:-(skip_shift*width)},300,this.unlock()):clearing.animate({left:0},300,this.unlock())):/left/.test(direction)?(this.lock(),clearing.animate({left:left+width},300,this.unlock())):/right/.test(direction)&&(this.lock(),clearing.animate({left:left-width},300,this.unlock())),callback()},direction:function($el,current,target){var response,lis=$el.find("li"),li_width=this.outerWidth(lis)+this.outerWidth(lis)/4,up_count=Math.floor(this.outerWidth($(".clearing-container"))/li_width)-1,target_index=lis.index(target);return this.settings.up_count=up_count,response=this.adjacent(this.settings.prev_index,target_index)?target_index>up_count&&target_index>this.settings.prev_index?"right":target_index>up_count-1&&target_index<=this.settings.prev_index?"left":!1:"skip",this.settings.prev_index=target_index,response},adjacent:function(current_index,target_index){for(var i=target_index+1;i>=target_index-1;i--)if(i===current_index)return!0;return!1},lock:function(){this.settings.locked=!0},unlock:function(){this.settings.locked=!1},locked:function(){return this.settings.locked},outerHTML:function(el){return el.outerHTML||(new XMLSerializer).serializeToString(el)},off:function(){$(this.scope).off(".fndtn.clearing"),$(window).off(".fndtn.clearing"),this.remove_data(),this.settings.init=!1},reflow:function(){this.init()}}}(Foundation.zj,this,this.document); \ No newline at end of file diff --git a/javascripts/foundation/foundation.cookie.js b/javascripts/foundation/foundation.cookie.js index b196e76..424cc2f 100644 --- a/javascripts/foundation/foundation.cookie.js +++ b/javascripts/foundation/foundation.cookie.js @@ -9,66 +9,4 @@ * * Modified to work with Zepto.js by ZURB */ -(function ($, document, undefined) { - - var pluses = /\+/g; - - function raw(s) { - return s; - } - - function decoded(s) { - return decodeURIComponent(s.replace(pluses, ' ')); - } - - var config = $.cookie = function (key, value, options) { - - // write - if (value !== undefined) { - options = $.extend({}, config.defaults, options); - - if (value === null) { - options.expires = -1; - } - - if (typeof options.expires === 'number') { - var days = options.expires, t = options.expires = new Date(); - t.setDate(t.getDate() + days); - } - - value = config.json ? JSON.stringify(value) : String(value); - - return (document.cookie = [ - encodeURIComponent(key), '=', config.raw ? value : encodeURIComponent(value), - options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE - options.path ? '; path=' + options.path : '', - options.domain ? '; domain=' + options.domain : '', - options.secure ? '; secure' : '' - ].join('')); - } - - // read - var decode = config.raw ? raw : decoded; - var cookies = document.cookie.split('; '); - for (var i = 0, l = cookies.length; i < l; i++) { - var parts = cookies[i].split('='); - if (decode(parts.shift()) === key) { - var cookie = decode(parts.join('=')); - return config.json ? JSON.parse(cookie) : cookie; - } - } - - return null; - }; - - config.defaults = {}; - - $.removeCookie = function (key, options) { - if ($.cookie(key) !== null) { - $.cookie(key, null, options); - return true; - } - return false; - }; - -})(Foundation.zj, document); \ No newline at end of file +!function($,document,undefined){function raw(s){return s}function decoded(s){return decodeURIComponent(s.replace(pluses," "))}var pluses=/\+/g,config=$.cookie=function(key,value,options){if(value!==undefined){if(options=$.extend({},config.defaults,options),null===value&&(options.expires=-1),"number"==typeof options.expires){var days=options.expires,t=options.expires=new Date;t.setDate(t.getDate()+days)}return value=config.json?JSON.stringify(value):String(value),document.cookie=[encodeURIComponent(key),"=",config.raw?value:encodeURIComponent(value),options.expires?"; expires="+options.expires.toUTCString():"",options.path?"; path="+options.path:"",options.domain?"; domain="+options.domain:"",options.secure?"; secure":""].join("")}for(var decode=config.raw?raw:decoded,cookies=document.cookie.split("; "),i=0,l=cookies.length;l>i;i++){var parts=cookies[i].split("=");if(decode(parts.shift())===key){var cookie=decode(parts.join("="));return config.json?JSON.parse(cookie):cookie}}return null};config.defaults={},$.removeCookie=function(key,options){return null!==$.cookie(key)?($.cookie(key,null,options),!0):!1}}(Foundation.zj,document); \ No newline at end of file diff --git a/javascripts/foundation/foundation.dropdown.js b/javascripts/foundation/foundation.dropdown.js index 62f1164..8ea9b88 100644 --- a/javascripts/foundation/foundation.dropdown.js +++ b/javascripts/foundation/foundation.dropdown.js @@ -1,183 +1 @@ -/*jslint unparam: true, browser: true, indent: 2 */ - -;(function ($, window, document, undefined) { - 'use strict'; - - Foundation.libs.dropdown = { - name : 'dropdown', - - version : '4.3.2', - - settings : { - activeClass: 'open', - is_hover: false, - opened: function(){}, - closed: function(){} - }, - - init : function (scope, method, options) { - this.scope = scope || this.scope; - Foundation.inherit(this, 'throttle scrollLeft data_options'); - - if (typeof method === 'object') { - $.extend(true, this.settings, method); - } - - if (typeof method !== 'string') { - - if (!this.settings.init) { - this.events(); - } - - return this.settings.init; - } else { - return this[method].call(this, options); - } - }, - - events : function () { - var self = this; - - $(this.scope) - .on('click.fndtn.dropdown', '[data-dropdown]', function (e) { - var settings = $.extend({}, self.settings, self.data_options($(this))); - e.preventDefault(); - - if (!settings.is_hover) self.toggle($(this)); - }) - .on('mouseenter', '[data-dropdown]', function (e) { - var settings = $.extend({}, self.settings, self.data_options($(this))); - if (settings.is_hover) self.toggle($(this)); - }) - .on('mouseleave', '[data-dropdown-content]', function (e) { - var target = $('[data-dropdown="' + $(this).attr('id') + '"]'), - settings = $.extend({}, self.settings, self.data_options(target)); - if (settings.is_hover) self.close.call(self, $(this)); - }) - .on('opened.fndtn.dropdown', '[data-dropdown-content]', this.settings.opened) - .on('closed.fndtn.dropdown', '[data-dropdown-content]', this.settings.closed); - - $(document).on('click.fndtn.dropdown', function (e) { - var parent = $(e.target).closest('[data-dropdown-content]'); - - if ($(e.target).data('dropdown') || $(e.target).parent().data('dropdown')) { - return; - } - if (!($(e.target).data('revealId')) && - (parent.length > 0 && ($(e.target).is('[data-dropdown-content]') || - $.contains(parent.first()[0], e.target)))) { - e.stopPropagation(); - return; - } - - self.close.call(self, $('[data-dropdown-content]')); - }); - - $(window).on('resize.fndtn.dropdown', self.throttle(function () { - self.resize.call(self); - }, 50)).trigger('resize'); - - this.settings.init = true; - }, - - close: function (dropdown) { - var self = this; - dropdown.each(function () { - if ($(this).hasClass(self.settings.activeClass)) { - $(this) - .css(Foundation.rtl ? 'right':'left', '-99999px') - .removeClass(self.settings.activeClass); - $(this).trigger('closed'); - } - }); - }, - - open: function (dropdown, target) { - this - .css(dropdown - .addClass(this.settings.activeClass), target); - dropdown.trigger('opened'); - }, - - toggle : function (target) { - var dropdown = $('#' + target.data('dropdown')); - if (dropdown.length === 0) { - // No dropdown found, not continuing - return; - } - - this.close.call(this, $('[data-dropdown-content]').not(dropdown)); - - if (dropdown.hasClass(this.settings.activeClass)) { - this.close.call(this, dropdown); - } else { - this.close.call(this, $('[data-dropdown-content]')) - this.open.call(this, dropdown, target); - } - }, - - resize : function () { - var dropdown = $('[data-dropdown-content].open'), - target = $("[data-dropdown='" + dropdown.attr('id') + "']"); - - if (dropdown.length && target.length) { - this.css(dropdown, target); - } - }, - - css : function (dropdown, target) { - var offset_parent = dropdown.offsetParent(); - // if (offset_parent.length > 0 && /body/i.test(dropdown.offsetParent()[0].nodeName)) { - var position = target.offset(); - position.top -= offset_parent.offset().top; - position.left -= offset_parent.offset().left; - // } else { - // var position = target.position(); - // } - - if (this.small()) { - dropdown.css({ - position : 'absolute', - width: '95%', - 'max-width': 'none', - top: position.top + this.outerHeight(target) - }); - dropdown.css(Foundation.rtl ? 'right':'left', '2.5%'); - } else { - if (!Foundation.rtl && $(window).width() > this.outerWidth(dropdown) + target.offset().left && !this.data_options(target).align_right) { - var left = position.left; - if (dropdown.hasClass('right')) { - dropdown.removeClass('right'); - } - } else { - if (!dropdown.hasClass('right')) { - dropdown.addClass('right'); - } - var left = position.left - (this.outerWidth(dropdown) - this.outerWidth(target)); - } - - dropdown.attr('style', '').css({ - position : 'absolute', - top: position.top + this.outerHeight(target), - left: left - }); - } - - return dropdown; - }, - - small : function () { - return $(window).width() < 768 || $('html').hasClass('lt-ie9'); - }, - - off: function () { - $(this.scope).off('.fndtn.dropdown'); - $('html, body').off('.fndtn.dropdown'); - $(window).off('.fndtn.dropdown'); - $('[data-dropdown-content]').off('.fndtn.dropdown'); - this.settings.init = false; - }, - - reflow : function () {} - }; -}(Foundation.zj, this, this.document)); +!function($,window,document){"use strict";Foundation.libs.dropdown={name:"dropdown",version:"4.3.2",settings:{activeClass:"open",is_hover:!1,opened:function(){},closed:function(){}},init:function(scope,method,options){return this.scope=scope||this.scope,Foundation.inherit(this,"throttle scrollLeft data_options"),"object"==typeof method&&$.extend(!0,this.settings,method),"string"!=typeof method?(this.settings.init||this.events(),this.settings.init):this[method].call(this,options)},events:function(){var self=this;$(this.scope).on("click.fndtn.dropdown","[data-dropdown]",function(e){var settings=$.extend({},self.settings,self.data_options($(this)));e.preventDefault(),settings.is_hover||self.toggle($(this))}).on("mouseenter","[data-dropdown]",function(){var settings=$.extend({},self.settings,self.data_options($(this)));settings.is_hover&&self.toggle($(this))}).on("mouseleave","[data-dropdown-content]",function(){var target=$('[data-dropdown="'+$(this).attr("id")+'"]'),settings=$.extend({},self.settings,self.data_options(target));settings.is_hover&&self.close.call(self,$(this))}).on("opened.fndtn.dropdown","[data-dropdown-content]",this.settings.opened).on("closed.fndtn.dropdown","[data-dropdown-content]",this.settings.closed),$(document).on("click.fndtn.dropdown",function(e){var parent=$(e.target).closest("[data-dropdown-content]");if(!$(e.target).data("dropdown")&&!$(e.target).parent().data("dropdown"))return!$(e.target).data("revealId")&&parent.length>0&&($(e.target).is("[data-dropdown-content]")||$.contains(parent.first()[0],e.target))?void e.stopPropagation():void self.close.call(self,$("[data-dropdown-content]"))}),$(window).on("resize.fndtn.dropdown",self.throttle(function(){self.resize.call(self)},50)).trigger("resize"),this.settings.init=!0},close:function(dropdown){var self=this;dropdown.each(function(){$(this).hasClass(self.settings.activeClass)&&($(this).css(Foundation.rtl?"right":"left","-99999px").removeClass(self.settings.activeClass),$(this).trigger("closed"))})},open:function(dropdown,target){this.css(dropdown.addClass(this.settings.activeClass),target),dropdown.trigger("opened")},toggle:function(target){var dropdown=$("#"+target.data("dropdown"));0!==dropdown.length&&(this.close.call(this,$("[data-dropdown-content]").not(dropdown)),dropdown.hasClass(this.settings.activeClass)?this.close.call(this,dropdown):(this.close.call(this,$("[data-dropdown-content]")),this.open.call(this,dropdown,target)))},resize:function(){var dropdown=$("[data-dropdown-content].open"),target=$("[data-dropdown='"+dropdown.attr("id")+"']");dropdown.length&&target.length&&this.css(dropdown,target)},css:function(dropdown,target){var offset_parent=dropdown.offsetParent(),position=target.offset();if(position.top-=offset_parent.offset().top,position.left-=offset_parent.offset().left,this.small())dropdown.css({position:"absolute",width:"95%","max-width":"none",top:position.top+this.outerHeight(target)}),dropdown.css(Foundation.rtl?"right":"left","2.5%");else{if(!Foundation.rtl&&$(window).width()>this.outerWidth(dropdown)+target.offset().left&&!this.data_options(target).align_right){var left=position.left;dropdown.hasClass("right")&&dropdown.removeClass("right")}else{dropdown.hasClass("right")||dropdown.addClass("right");var left=position.left-(this.outerWidth(dropdown)-this.outerWidth(target))}dropdown.attr("style","").css({position:"absolute",top:position.top+this.outerHeight(target),left:left})}return dropdown},small:function(){return $(window).width()<768||$("html").hasClass("lt-ie9")},off:function(){$(this.scope).off(".fndtn.dropdown"),$("html, body").off(".fndtn.dropdown"),$(window).off(".fndtn.dropdown"),$("[data-dropdown-content]").off(".fndtn.dropdown"),this.settings.init=!1},reflow:function(){}}}(Foundation.zj,this,this.document); \ No newline at end of file diff --git a/javascripts/foundation/foundation.forms.js b/javascripts/foundation/foundation.forms.js index b58e92c..3fdb9c0 100644 --- a/javascripts/foundation/foundation.forms.js +++ b/javascripts/foundation/foundation.forms.js @@ -1,556 +1 @@ -(function ($, window, document, undefined) { - 'use strict'; - - Foundation.libs.forms = { - name : 'forms', - - version: '4.3.2', - - cache: {}, - - settings: { - disable_class: 'no-custom', - last_combo : null - }, - - init: function (scope, method, options) { - - if (typeof method === 'object') { - $.extend(true, this.settings, method); - } - - if (typeof method !== 'string') { - if (!this.settings.init) { - this.events(); - } - - this.assemble(); - - return this.settings.init; - } else { - return this[method].call(this, options); - } - }, - - assemble: function () { - - var forms = this; - - $('form.custom input[type="radio"],[type="checkbox"]', $(this.scope)) - .not('[data-customforms="disabled"]') - .not('.' + this.settings.disable_class) - .each(function(idx, sel){ - forms.set_custom_markup(sel); - }) - .change(function(){ - forms.set_custom_markup(this); - }); - - $('form.custom select', $(this.scope)) - .not('[data-customforms="disabled"]') - .not('.' + this.settings.disable_class) - .not('[multiple=multiple]') - .each(this.append_custom_select); - }, - - events: function () { - var self = this; - - $(this.scope) - .on('click.fndtn.forms', 'form.custom span.custom.checkbox', function (e) { - e.preventDefault(); - e.stopPropagation(); - self.toggle_checkbox($(this)); - }) - .on('click.fndtn.forms', 'form.custom span.custom.radio', function (e) { - e.preventDefault(); - e.stopPropagation(); - self.toggle_radio($(this)); - }) - .on('change.fndtn.forms', 'form.custom select', function (e, force_refresh) { - if ($(this).is('[data-customforms="disabled"]')) return; - self.refresh_custom_select($(this), force_refresh); - }) - .on('click.fndtn.forms', 'form.custom label', function (e) { - if ($(e.target).is('label')) { - var $associatedElement = $('#' + self.escape($(this).attr('for'))).not('[data-customforms="disabled"]'), - $customCheckbox, - $customRadio; - - if ($associatedElement.length !== 0) { - if ($associatedElement.attr('type') === 'checkbox') { - e.preventDefault(); - $customCheckbox = $(this).find('span.custom.checkbox'); - //the checkbox might be outside after the label or inside of another element - if ($customCheckbox.length === 0) { - $customCheckbox = $associatedElement.add(this).siblings('span.custom.checkbox').first(); - } - self.toggle_checkbox($customCheckbox); - } else if ($associatedElement.attr('type') === 'radio') { - e.preventDefault(); - $customRadio = $(this).find('span.custom.radio'); - //the radio might be outside after the label or inside of another element - if ($customRadio.length === 0) { - $customRadio = $associatedElement.add(this).siblings('span.custom.radio').first(); - } - self.toggle_radio($customRadio); - } - } - } - }) - .on('mousedown.fndtn.forms', 'form.custom div.custom.dropdown', function () { - return false; - }) - .on('click.fndtn.forms', 'form.custom div.custom.dropdown a.current, form.custom div.custom.dropdown a.selector', function (e) { - var $this = $(this), - $dropdown = $this.closest('div.custom.dropdown'), - $select = getFirstPrevSibling($dropdown, 'select'); - - // make sure other dropdowns close - if (!$dropdown.hasClass('open')) $(self.scope).trigger('click'); - - e.preventDefault(); - if (false === $select.is(':disabled')) { - $dropdown.toggleClass('open'); - - if ($dropdown.hasClass('open')) { - $(self.scope).on('click.fndtn.forms.customdropdown', function () { - $dropdown.removeClass('open'); - $(self.scope).off('.fndtn.forms.customdropdown'); - }); - } else { - $(self.scope).on('.fndtn.forms.customdropdown'); - } - return false; - } - }) - .on('click.fndtn.forms touchend.fndtn.forms', 'form.custom div.custom.dropdown li', function (e) { - var $this = $(this), - $customDropdown = $this.closest('div.custom.dropdown'), - $select = getFirstPrevSibling($customDropdown, 'select'), - selectedIndex = 0; - - e.preventDefault(); - e.stopPropagation(); - - if (!$(this).hasClass('disabled')) { - $('div.dropdown').not($customDropdown).removeClass('open'); - - var $oldThis = $this.closest('ul') - .find('li.selected'); - $oldThis.removeClass('selected'); - - $this.addClass('selected'); - - $customDropdown.removeClass('open') - .find('a.current') - .text($this.text()); - - $this.closest('ul').find('li').each(function (index) { - if ($this[0] === this) { - selectedIndex = index; - } - }); - $select[0].selectedIndex = selectedIndex; - - //store the old value in data - $select.data('prevalue', $oldThis.html()); - - // Kick off full DOM change event - if (typeof (document.createEvent) != 'undefined') { - var event = document.createEvent('HTMLEvents'); - event.initEvent('change', true, true); - $select[0].dispatchEvent(event); - } else { - $select[0].fireEvent('onchange'); // for IE - } - } - }); - - $(window).on('keydown', function (e) { - var focus = document.activeElement, - self = Foundation.libs.forms, - dropdown = $('.custom.dropdown'), - select = getFirstPrevSibling(dropdown, 'select'), - inputs = $('input,select,textarea,button'); // Zepto-compatible jQuery(":input") - - if (dropdown.length > 0 && dropdown.hasClass('open')) { - e.preventDefault(); - - if (e.which === 9) { - $(inputs[$(inputs).index(select) + 1]).focus(); - dropdown.removeClass('open'); - } - - if (e.which === 13) { - dropdown.find('li.selected').trigger('click'); - } - - if (e.which === 27) { - dropdown.removeClass('open'); - } - - if (e.which >= 65 && e.which <= 90) { - var next = self.go_to(dropdown, e.which), - current = dropdown.find('li.selected'); - - if (next) { - current.removeClass('selected'); - self.scrollTo(next.addClass('selected'), 300); - } - } - - if (e.which === 38) { - var current = dropdown.find('li.selected'), - prev = current.prev(':not(.disabled)'); - - if (prev.length > 0) { - prev.parent()[0].scrollTop = prev.parent().scrollTop() - self.outerHeight(prev); - current.removeClass('selected'); - prev.addClass('selected'); - } - } else if (e.which === 40) { - var current = dropdown.find('li.selected'), - next = current.next(':not(.disabled)'); - - if (next.length > 0) { - next.parent()[0].scrollTop = next.parent().scrollTop() + self.outerHeight(next); - current.removeClass('selected'); - next.addClass('selected'); - } - } - } - }); - - $(window).on('keyup', function (e) { - var focus = document.activeElement, - dropdown = $('.custom.dropdown'); - - if (focus === dropdown.find('.current')[0]) { - dropdown.find('.selector').focus().click(); - } - }); - - this.settings.init = true; - }, - - go_to: function (dropdown, character) { - var lis = dropdown.find('li'), - count = lis.length; - - if (count > 0) { - for (var i = 0; i < count; i++) { - var first_letter = lis.eq(i).text().charAt(0).toLowerCase(); - if (first_letter === String.fromCharCode(character).toLowerCase()) return lis.eq(i); - } - } - }, - - scrollTo: function (el, duration) { - if (duration < 0) return; - var parent = el.parent(); - var li_height = this.outerHeight(el); - var difference = (li_height * (el.index())) - parent.scrollTop(); - var perTick = difference / duration * 10; - - this.scrollToTimerCache = setTimeout(function () { - if (!isNaN(parseInt(perTick, 10))) { - parent[0].scrollTop = parent.scrollTop() + perTick; - this.scrollTo(el, duration - 10); - } - }.bind(this), 10); - }, - - set_custom_markup: function (sel) { - var $this = $(sel), - type = $this.attr('type'), - $span = $this.next('span.custom.' + type); - - if (!$this.parent().hasClass('switch')) { - $this.addClass('hidden-field'); - } - - if ($span.length === 0) { - $span = $('').insertAfter($this); - } - - $span.toggleClass('checked', $this.is(':checked')); - $span.toggleClass('disabled', $this.is(':disabled')); - }, - - append_custom_select: function (idx, sel) { - var self = Foundation.libs.forms, - $this = $(sel), - $customSelect = $this.next('div.custom.dropdown'), - $customList = $customSelect.find('ul'), - $selectCurrent = $customSelect.find(".current"), - $selector = $customSelect.find(".selector"), - $options = $this.find('option'), - $selectedOption = $options.filter(':selected'), - copyClasses = $this.attr('class') ? $this.attr('class').split(' ') : [], - maxWidth = 0, - liHtml = '', - $listItems, - $currentSelect = false; - - if ($customSelect.length === 0) { - var customSelectSize = $this.hasClass('small') ? 'small' : $this.hasClass('medium') ? 'medium' : $this.hasClass('large') ? 'large' : $this.hasClass('expand') ? 'expand' : ''; - - $customSelect = $('
'); - - $selector = $customSelect.find(".selector"); - $customList = $customSelect.find("ul"); - - liHtml = $options.map(function () { - var copyClasses = $(this).attr('class') ? $(this).attr('class') : ''; - return "
  • " + $(this).html() + "
  • "; - }).get().join(''); - - $customList.append(liHtml); - - $currentSelect = $customSelect - .prepend('' + ($selectedOption.html() || '') + '') - .find(".current"); - - $this.after($customSelect) - .addClass('hidden-field'); - } else { - liHtml = $options.map(function () { - return "
  • " + $(this).html() + "
  • "; - }) - .get().join(''); - - $customList.html('') - .append(liHtml); - - } // endif $customSelect.length === 0 - - self.assign_id($this, $customSelect); - $customSelect.toggleClass('disabled', $this.is(':disabled')); - $listItems = $customList.find('li'); - - // cache list length - self.cache[$customSelect.data('id')] = $listItems.length; - - $options.each(function (index) { - if (this.selected) { - $listItems.eq(index).addClass('selected'); - - if ($currentSelect) { - $currentSelect.html($(this).html()); - } - } - if ($(this).is(':disabled')) { - $listItems.eq(index).addClass('disabled'); - } - }); - - // - // If we're not specifying a predetermined form size. - // - if (!$customSelect.is('.small, .medium, .large, .expand')) { - - // ------------------------------------------------------------------------------------ - // This is a work-around for when elements are contained within hidden parents. - // For example, when custom-form elements are inside of a hidden reveal modal. - // - // We need to display the current custom list element as well as hidden parent elements - // in order to properly calculate the list item element's width property. - // ------------------------------------------------------------------------------------- - - $customSelect.addClass('open'); - // - // Quickly, display all parent elements. - // This should help us calcualate the width of the list item's within the drop down. - // - var self = Foundation.libs.forms; - self.hidden_fix.adjust($customList); - - maxWidth = (self.outerWidth($listItems) > maxWidth) ? self.outerWidth($listItems) : maxWidth; - - Foundation.libs.forms.hidden_fix.reset(); - - $customSelect.removeClass('open'); - - } // endif - - }, - - assign_id: function ($select, $customSelect) { - var id = [+new Date(), Foundation.random_str(5)].join('-'); - $select.attr('data-id', id); - $customSelect.attr('data-id', id); - }, - - refresh_custom_select: function ($select, force_refresh) { - var self = this; - var maxWidth = 0, - $customSelect = $select.next(), - $options = $select.find('option'), - $customList = $customSelect.find('ul'), - $listItems = $customSelect.find('li'); - - if ($options.length !== this.cache[$customSelect.data('id')] || force_refresh) { - $customList.html(''); - - // rebuild and re-populate all at once - var customSelectHtml = ''; - $options.each(function () { - var $this = $(this), thisHtml = $this.html(), thisSelected = this.selected; - customSelectHtml += '
  • ' + thisHtml + '
  • '; - if (thisSelected) { - $customSelect.find('.current').html(thisHtml); - } - }); - - $customList.html(customSelectHtml); - - // fix width - $customSelect.removeAttr('style'); - $customList.removeAttr('style'); - $customSelect.find('li').each(function () { - $customSelect.addClass('open'); - if (self.outerWidth($(this)) > maxWidth) { - maxWidth = self.outerWidth($(this)); - } - $customSelect.removeClass('open'); - }); - - $listItems = $customSelect.find('li'); - // cache list length - this.cache[$customSelect.data('id')] = $listItems.length; - } - }, - - refresh_custom_selection: function ($select) { - var selectedValue = $('option:selected', $select).text(); - $('a.current', $select.next()).text(selectedValue); - }, - - toggle_checkbox: function ($element) { - var $input = $element.prev(), - input = $input[0]; - - if (false === $input.is(':disabled')) { - input.checked = ((input.checked) ? false : true); - $element.toggleClass('checked'); - - $input.trigger('change'); - } - }, - - toggle_radio: function ($element) { - var $input = $element.prev(), - $form = $input.closest('form.custom'), - input = $input[0]; - - if (false === $input.is(':disabled')) { - $form.find('input[type="radio"][name="' + this.escape($input.attr('name')) + '"]') - .next().not($element).removeClass('checked'); - - if (!$element.hasClass('checked')) { - $element.toggleClass('checked'); - } - - input.checked = $element.hasClass('checked'); - - $input.trigger('change'); - } - }, - - escape: function (text) { - if (!text) return ''; - return text.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); - }, - - hidden_fix: { - /** - * Sets all hidden parent elements and self to visibile. - * - * @method adjust - * @param {jQuery Object} $child - */ - - // We'll use this to temporarily store style properties. - tmp: [], - - // We'll use this to set hidden parent elements. - hidden: null, - - adjust: function ($child) { - // Internal reference. - var _self = this; - - // Set all hidden parent elements, including this element. - _self.hidden = $child.parents(); - _self.hidden = _self.hidden.add($child).filter(":hidden"); - - // Loop through all hidden elements. - _self.hidden.each(function () { - - // Cache the element. - var $elem = $(this); - - // Store the style attribute. - // Undefined if element doesn't have a style attribute. - _self.tmp.push($elem.attr('style')); - - // Set the element's display property to block, - // but ensure it's visibility is hidden. - $elem.css({ - 'visibility': 'hidden', - 'display': 'block' - }); - }); - - }, // end adjust - - /** - * Resets the elements previous state. - * - * @method reset - */ - reset: function () { - // Internal reference. - var _self = this; - // Loop through our hidden element collection. - _self.hidden.each(function (i) { - // Cache this element. - var $elem = $(this), - _tmp = _self.tmp[i]; // Get the stored 'style' value for this element. - - // If the stored value is undefined. - if (_tmp === undefined) - // Remove the style attribute. - $elem.removeAttr('style'); - else - // Otherwise, reset the element style attribute. - $elem.attr('style', _tmp); - }); - // Reset the tmp array. - _self.tmp = []; - // Reset the hidden elements variable. - _self.hidden = null; - - } // end reset - }, - - off: function () { - $(this.scope).off('.fndtn.forms'); - }, - - reflow : function () {} - }; - - var getFirstPrevSibling = function($el, selector) { - var $el = $el.prev(); - while ($el.length) { - if ($el.is(selector)) return $el; - $el = $el.prev(); - } - return $(); - }; -}(Foundation.zj, this, this.document)); +!function($,window,document,undefined){"use strict";Foundation.libs.forms={name:"forms",version:"4.3.2",cache:{},settings:{disable_class:"no-custom",last_combo:null},init:function(scope,method,options){return"object"==typeof method&&$.extend(!0,this.settings,method),"string"!=typeof method?(this.settings.init||this.events(),this.assemble(),this.settings.init):this[method].call(this,options)},assemble:function(){var forms=this;$('form.custom input[type="radio"],[type="checkbox"]',$(this.scope)).not('[data-customforms="disabled"]').not("."+this.settings.disable_class).each(function(idx,sel){forms.set_custom_markup(sel)}).change(function(){forms.set_custom_markup(this)}),$("form.custom select",$(this.scope)).not('[data-customforms="disabled"]').not("."+this.settings.disable_class).not("[multiple=multiple]").each(this.append_custom_select)},events:function(){var self=this;$(this.scope).on("click.fndtn.forms","form.custom span.custom.checkbox",function(e){e.preventDefault(),e.stopPropagation(),self.toggle_checkbox($(this))}).on("click.fndtn.forms","form.custom span.custom.radio",function(e){e.preventDefault(),e.stopPropagation(),self.toggle_radio($(this))}).on("change.fndtn.forms","form.custom select",function(e,force_refresh){$(this).is('[data-customforms="disabled"]')||self.refresh_custom_select($(this),force_refresh)}).on("click.fndtn.forms","form.custom label",function(e){if($(e.target).is("label")){var $customCheckbox,$customRadio,$associatedElement=$("#"+self.escape($(this).attr("for"))).not('[data-customforms="disabled"]');0!==$associatedElement.length&&("checkbox"===$associatedElement.attr("type")?(e.preventDefault(),$customCheckbox=$(this).find("span.custom.checkbox"),0===$customCheckbox.length&&($customCheckbox=$associatedElement.add(this).siblings("span.custom.checkbox").first()),self.toggle_checkbox($customCheckbox)):"radio"===$associatedElement.attr("type")&&(e.preventDefault(),$customRadio=$(this).find("span.custom.radio"),0===$customRadio.length&&($customRadio=$associatedElement.add(this).siblings("span.custom.radio").first()),self.toggle_radio($customRadio)))}}).on("mousedown.fndtn.forms","form.custom div.custom.dropdown",function(){return!1}).on("click.fndtn.forms","form.custom div.custom.dropdown a.current, form.custom div.custom.dropdown a.selector",function(e){var $this=$(this),$dropdown=$this.closest("div.custom.dropdown"),$select=getFirstPrevSibling($dropdown,"select");return $dropdown.hasClass("open")||$(self.scope).trigger("click"),e.preventDefault(),!1===$select.is(":disabled")?($dropdown.toggleClass("open"),$dropdown.hasClass("open")?$(self.scope).on("click.fndtn.forms.customdropdown",function(){$dropdown.removeClass("open"),$(self.scope).off(".fndtn.forms.customdropdown")}):$(self.scope).on(".fndtn.forms.customdropdown"),!1):void 0}).on("click.fndtn.forms touchend.fndtn.forms","form.custom div.custom.dropdown li",function(e){var $this=$(this),$customDropdown=$this.closest("div.custom.dropdown"),$select=getFirstPrevSibling($customDropdown,"select"),selectedIndex=0;if(e.preventDefault(),e.stopPropagation(),!$(this).hasClass("disabled")){$("div.dropdown").not($customDropdown).removeClass("open");var $oldThis=$this.closest("ul").find("li.selected");if($oldThis.removeClass("selected"),$this.addClass("selected"),$customDropdown.removeClass("open").find("a.current").text($this.text()),$this.closest("ul").find("li").each(function(index){$this[0]===this&&(selectedIndex=index)}),$select[0].selectedIndex=selectedIndex,$select.data("prevalue",$oldThis.html()),"undefined"!=typeof document.createEvent){var event=document.createEvent("HTMLEvents");event.initEvent("change",!0,!0),$select[0].dispatchEvent(event)}else $select[0].fireEvent("onchange")}}),$(window).on("keydown",function(e){var self=(document.activeElement,Foundation.libs.forms),dropdown=$(".custom.dropdown"),select=getFirstPrevSibling(dropdown,"select"),inputs=$("input,select,textarea,button");if(dropdown.length>0&&dropdown.hasClass("open")){if(e.preventDefault(),9===e.which&&($(inputs[$(inputs).index(select)+1]).focus(),dropdown.removeClass("open")),13===e.which&&dropdown.find("li.selected").trigger("click"),27===e.which&&dropdown.removeClass("open"),e.which>=65&&e.which<=90){var next=self.go_to(dropdown,e.which),current=dropdown.find("li.selected");next&&(current.removeClass("selected"),self.scrollTo(next.addClass("selected"),300))}if(38===e.which){var current=dropdown.find("li.selected"),prev=current.prev(":not(.disabled)");prev.length>0&&(prev.parent()[0].scrollTop=prev.parent().scrollTop()-self.outerHeight(prev),current.removeClass("selected"),prev.addClass("selected"))}else if(40===e.which){var current=dropdown.find("li.selected"),next=current.next(":not(.disabled)");next.length>0&&(next.parent()[0].scrollTop=next.parent().scrollTop()+self.outerHeight(next),current.removeClass("selected"),next.addClass("selected"))}}}),$(window).on("keyup",function(){var focus=document.activeElement,dropdown=$(".custom.dropdown");focus===dropdown.find(".current")[0]&&dropdown.find(".selector").focus().click()}),this.settings.init=!0},go_to:function(dropdown,character){var lis=dropdown.find("li"),count=lis.length;if(count>0)for(var i=0;count>i;i++){var first_letter=lis.eq(i).text().charAt(0).toLowerCase();if(first_letter===String.fromCharCode(character).toLowerCase())return lis.eq(i)}},scrollTo:function(el,duration){if(!(0>duration)){var parent=el.parent(),li_height=this.outerHeight(el),difference=li_height*el.index()-parent.scrollTop(),perTick=difference/duration*10;this.scrollToTimerCache=setTimeout(function(){isNaN(parseInt(perTick,10))||(parent[0].scrollTop=parent.scrollTop()+perTick,this.scrollTo(el,duration-10))}.bind(this),10)}},set_custom_markup:function(sel){var $this=$(sel),type=$this.attr("type"),$span=$this.next("span.custom."+type);$this.parent().hasClass("switch")||$this.addClass("hidden-field"),0===$span.length&&($span=$('').insertAfter($this)),$span.toggleClass("checked",$this.is(":checked")),$span.toggleClass("disabled",$this.is(":disabled"))},append_custom_select:function(idx,sel){var $listItems,self=Foundation.libs.forms,$this=$(sel),$customSelect=$this.next("div.custom.dropdown"),$customList=$customSelect.find("ul"),$selector=($customSelect.find(".current"),$customSelect.find(".selector")),$options=$this.find("option"),$selectedOption=$options.filter(":selected"),copyClasses=$this.attr("class")?$this.attr("class").split(" "):[],maxWidth=0,liHtml="",$currentSelect=!1;if(0===$customSelect.length){var customSelectSize=$this.hasClass("small")?"small":$this.hasClass("medium")?"medium":$this.hasClass("large")?"large":$this.hasClass("expand")?"expand":"";$customSelect=$('
    '),$selector=$customSelect.find(".selector"),$customList=$customSelect.find("ul"),liHtml=$options.map(function(){var copyClasses=$(this).attr("class")?$(this).attr("class"):"";return"
  • "+$(this).html()+"
  • "}).get().join(""),$customList.append(liHtml),$currentSelect=$customSelect.prepend(''+($selectedOption.html()||"")+"").find(".current"),$this.after($customSelect).addClass("hidden-field")}else liHtml=$options.map(function(){return"
  • "+$(this).html()+"
  • "}).get().join(""),$customList.html("").append(liHtml);if(self.assign_id($this,$customSelect),$customSelect.toggleClass("disabled",$this.is(":disabled")),$listItems=$customList.find("li"),self.cache[$customSelect.data("id")]=$listItems.length,$options.each(function(index){this.selected&&($listItems.eq(index).addClass("selected"),$currentSelect&&$currentSelect.html($(this).html())),$(this).is(":disabled")&&$listItems.eq(index).addClass("disabled")}),!$customSelect.is(".small, .medium, .large, .expand")){$customSelect.addClass("open");var self=Foundation.libs.forms;self.hidden_fix.adjust($customList),maxWidth=self.outerWidth($listItems)>maxWidth?self.outerWidth($listItems):maxWidth,Foundation.libs.forms.hidden_fix.reset(),$customSelect.removeClass("open")}},assign_id:function($select,$customSelect){var id=[+new Date,Foundation.random_str(5)].join("-");$select.attr("data-id",id),$customSelect.attr("data-id",id)},refresh_custom_select:function($select,force_refresh){var self=this,maxWidth=0,$customSelect=$select.next(),$options=$select.find("option"),$customList=$customSelect.find("ul"),$listItems=$customSelect.find("li");if($options.length!==this.cache[$customSelect.data("id")]||force_refresh){$customList.html("");var customSelectHtml="";$options.each(function(){var $this=$(this),thisHtml=$this.html(),thisSelected=this.selected;customSelectHtml+='
  • '+thisHtml+"
  • ",thisSelected&&$customSelect.find(".current").html(thisHtml)}),$customList.html(customSelectHtml),$customSelect.removeAttr("style"),$customList.removeAttr("style"),$customSelect.find("li").each(function(){$customSelect.addClass("open"),self.outerWidth($(this))>maxWidth&&(maxWidth=self.outerWidth($(this))),$customSelect.removeClass("open")}),$listItems=$customSelect.find("li"),this.cache[$customSelect.data("id")]=$listItems.length}},refresh_custom_selection:function($select){var selectedValue=$("option:selected",$select).text();$("a.current",$select.next()).text(selectedValue)},toggle_checkbox:function($element){var $input=$element.prev(),input=$input[0];!1===$input.is(":disabled")&&(input.checked=input.checked?!1:!0,$element.toggleClass("checked"),$input.trigger("change"))},toggle_radio:function($element){var $input=$element.prev(),$form=$input.closest("form.custom"),input=$input[0];!1===$input.is(":disabled")&&($form.find('input[type="radio"][name="'+this.escape($input.attr("name"))+'"]').next().not($element).removeClass("checked"),$element.hasClass("checked")||$element.toggleClass("checked"),input.checked=$element.hasClass("checked"),$input.trigger("change"))},escape:function(text){return text?text.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):""},hidden_fix:{tmp:[],hidden:null,adjust:function($child){var _self=this;_self.hidden=$child.parents(),_self.hidden=_self.hidden.add($child).filter(":hidden"),_self.hidden.each(function(){var $elem=$(this);_self.tmp.push($elem.attr("style")),$elem.css({visibility:"hidden",display:"block"})})},reset:function(){var _self=this;_self.hidden.each(function(i){var $elem=$(this),_tmp=_self.tmp[i];_tmp===undefined?$elem.removeAttr("style"):$elem.attr("style",_tmp)}),_self.tmp=[],_self.hidden=null}},off:function(){$(this.scope).off(".fndtn.forms")},reflow:function(){}};var getFirstPrevSibling=function($el,selector){for(var $el=$el.prev();$el.length;){if($el.is(selector))return $el;$el=$el.prev()}return $()}}(Foundation.zj,this,this.document); \ No newline at end of file diff --git a/javascripts/foundation/foundation.interchange.js b/javascripts/foundation/foundation.interchange.js index 4c9067c..cf93a0b 100644 --- a/javascripts/foundation/foundation.interchange.js +++ b/javascripts/foundation/foundation.interchange.js @@ -1,280 +1 @@ -/*jslint unparam: true, browser: true, indent: 2 */ - -;(function ($, window, document, undefined) { - 'use strict'; - - Foundation.libs.interchange = { - name : 'interchange', - - version : '4.2.4', - - cache : {}, - - images_loaded : false, - - settings : { - load_attr : 'interchange', - - named_queries : { - 'default' : 'only screen and (min-width: 1px)', - small : 'only screen and (min-width: 768px)', - medium : 'only screen and (min-width: 1280px)', - large : 'only screen and (min-width: 1440px)', - landscape : 'only screen and (orientation: landscape)', - portrait : 'only screen and (orientation: portrait)', - retina : 'only screen and (-webkit-min-device-pixel-ratio: 2),' + - 'only screen and (min--moz-device-pixel-ratio: 2),' + - 'only screen and (-o-min-device-pixel-ratio: 2/1),' + - 'only screen and (min-device-pixel-ratio: 2),' + - 'only screen and (min-resolution: 192dpi),' + - 'only screen and (min-resolution: 2dppx)' - }, - - directives : { - replace: function (el, path) { - if (/IMG/.test(el[0].nodeName)) { - var orig_path = el[0].src; - - if (new RegExp(path, 'i').test(orig_path)) return; - - el[0].src = path; - - return el.trigger('replace', [el[0].src, orig_path]); - } - } - } - }, - - init : function (scope, method, options) { - Foundation.inherit(this, 'throttle'); - - if (typeof method === 'object') { - $.extend(true, this.settings, method); - } - - this.events(); - this.images(); - - if (typeof method !== 'string') { - return this.settings.init; - } else { - return this[method].call(this, options); - } - }, - - events : function () { - var self = this; - - $(window).on('resize.fndtn.interchange', self.throttle(function () { - self.resize.call(self); - }, 50)); - }, - - resize : function () { - var cache = this.cache; - - if(!this.images_loaded) { - setTimeout($.proxy(this.resize, this), 50); - return; - } - - for (var uuid in cache) { - if (cache.hasOwnProperty(uuid)) { - var passed = this.results(uuid, cache[uuid]); - - if (passed) { - this.settings.directives[passed - .scenario[1]](passed.el, passed.scenario[0]); - } - } - } - - }, - - results : function (uuid, scenarios) { - var count = scenarios.length; - - if (count > 0) { - var el = $('[data-uuid="' + uuid + '"]'); - - for (var i = count - 1; i >= 0; i--) { - var mq, rule = scenarios[i][2]; - if (this.settings.named_queries.hasOwnProperty(rule)) { - mq = matchMedia(this.settings.named_queries[rule]); - } else { - mq = matchMedia(rule); - } - if (mq.matches) { - return {el: el, scenario: scenarios[i]}; - } - } - } - - return false; - }, - - images : function (force_update) { - if (typeof this.cached_images === 'undefined' || force_update) { - return this.update_images(); - } - - return this.cached_images; - }, - - update_images : function () { - var images = document.getElementsByTagName('img'), - count = images.length, - loaded_count = 0, - data_attr = 'data-' + this.settings.load_attr; - - this.cached_images = []; - this.images_loaded = false; - - for (var i = count - 1; i >= 0; i--) { - this.loaded($(images[i]), function (image) { - loaded_count++; - if (image) { - var str = image.getAttribute(data_attr) || ''; - - if (str.length > 0) { - this.cached_images.push(image); - } - } - - if(loaded_count === count) { - this.images_loaded = true; - this.enhance(); - } - }.bind(this)); - } - - return 'deferred'; - }, - - // based on jquery.imageready.js - // @weblinc, @jsantell, (c) 2012 - - loaded : function (image, callback) { - function loaded () { - callback(image[0]); - } - - function bindLoad () { - this.one('load', loaded); - - if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)) { - var src = this.attr( 'src' ), - param = src.match( /\?/ ) ? '&' : '?'; - - param += 'random=' + (new Date()).getTime(); - this.attr('src', src + param); - } - } - - if (!image.attr('src')) { - loaded(); - return; - } - - if (image[0].complete || image[0].readyState === 4) { - loaded(); - } else { - bindLoad.call(image); - } - }, - - enhance : function () { - var count = this.images().length; - - for (var i = count - 1; i >= 0; i--) { - this._object($(this.images()[i])); - } - - return $(window).trigger('resize'); - }, - - parse_params : function (path, directive, mq) { - return [this.trim(path), this.convert_directive(directive), this.trim(mq)]; - }, - - convert_directive : function (directive) { - var trimmed = this.trim(directive); - - if (trimmed.length > 0) { - return trimmed; - } - - return 'replace'; - }, - - _object : function(el) { - var raw_arr = this.parse_data_attr(el), - scenarios = [], count = raw_arr.length; - - if (count > 0) { - for (var i = count - 1; i >= 0; i--) { - var split = raw_arr[i].split(/\((.*?)(\))$/); - - if (split.length > 1) { - var cached_split = split[0].split(','), - params = this.parse_params(cached_split[0], - cached_split[1], split[1]); - - scenarios.push(params); - } - } - } - - return this.store(el, scenarios); - }, - - uuid : function (separator) { - var delim = separator || "-"; - - function S4() { - return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1); - } - - return (S4() + S4() + delim + S4() + delim + S4() - + delim + S4() + delim + S4() + S4() + S4()); - }, - - store : function (el, scenarios) { - var uuid = this.uuid(), - current_uuid = el.data('uuid'); - - if (current_uuid) return this.cache[current_uuid]; - - el.attr('data-uuid', uuid); - - return this.cache[uuid] = scenarios; - }, - - trim : function(str) { - if (typeof str === 'string') { - return $.trim(str); - } - - return str; - }, - - parse_data_attr : function (el) { - var raw = el.data(this.settings.load_attr).split(/\[(.*?)\]/), - count = raw.length, output = []; - - for (var i = count - 1; i >= 0; i--) { - if (raw[i].replace(/[\W\d]+/, '').length > 4) { - output.push(raw[i]); - } - } - - return output; - }, - - reflow : function () { - this.images(true); - } - - }; - -}(Foundation.zj, this, this.document)); \ No newline at end of file +!function($,window,document){"use strict";Foundation.libs.interchange={name:"interchange",version:"4.2.4",cache:{},images_loaded:!1,settings:{load_attr:"interchange",named_queries:{"default":"only screen and (min-width: 1px)",small:"only screen and (min-width: 768px)",medium:"only screen and (min-width: 1280px)",large:"only screen and (min-width: 1440px)",landscape:"only screen and (orientation: landscape)",portrait:"only screen and (orientation: portrait)",retina:"only screen and (-webkit-min-device-pixel-ratio: 2),only screen and (min--moz-device-pixel-ratio: 2),only screen and (-o-min-device-pixel-ratio: 2/1),only screen and (min-device-pixel-ratio: 2),only screen and (min-resolution: 192dpi),only screen and (min-resolution: 2dppx)"},directives:{replace:function(el,path){if(/IMG/.test(el[0].nodeName)){var orig_path=el[0].src;if(new RegExp(path,"i").test(orig_path))return;return el[0].src=path,el.trigger("replace",[el[0].src,orig_path])}}}},init:function(scope,method,options){return Foundation.inherit(this,"throttle"),"object"==typeof method&&$.extend(!0,this.settings,method),this.events(),this.images(),"string"!=typeof method?this.settings.init:this[method].call(this,options)},events:function(){var self=this;$(window).on("resize.fndtn.interchange",self.throttle(function(){self.resize.call(self)},50))},resize:function(){var cache=this.cache;if(!this.images_loaded)return void setTimeout($.proxy(this.resize,this),50);for(var uuid in cache)if(cache.hasOwnProperty(uuid)){var passed=this.results(uuid,cache[uuid]);passed&&this.settings.directives[passed.scenario[1]](passed.el,passed.scenario[0])}},results:function(uuid,scenarios){var count=scenarios.length;if(count>0)for(var el=$('[data-uuid="'+uuid+'"]'),i=count-1;i>=0;i--){var mq,rule=scenarios[i][2];if(mq=matchMedia(this.settings.named_queries.hasOwnProperty(rule)?this.settings.named_queries[rule]:rule),mq.matches)return{el:el,scenario:scenarios[i]}}return!1},images:function(force_update){return"undefined"==typeof this.cached_images||force_update?this.update_images():this.cached_images},update_images:function(){var images=document.getElementsByTagName("img"),count=images.length,loaded_count=0,data_attr="data-"+this.settings.load_attr;this.cached_images=[],this.images_loaded=!1;for(var i=count-1;i>=0;i--)this.loaded($(images[i]),function(image){if(loaded_count++,image){var str=image.getAttribute(data_attr)||"";str.length>0&&this.cached_images.push(image)}loaded_count===count&&(this.images_loaded=!0,this.enhance())}.bind(this));return"deferred"},loaded:function(image,callback){function loaded(){callback(image[0])}function bindLoad(){if(this.one("load",loaded),/MSIE (\d+\.\d+);/.test(navigator.userAgent)){var src=this.attr("src"),param=src.match(/\?/)?"&":"?";param+="random="+(new Date).getTime(),this.attr("src",src+param)}}return image.attr("src")?void(image[0].complete||4===image[0].readyState?loaded():bindLoad.call(image)):void loaded()},enhance:function(){for(var count=this.images().length,i=count-1;i>=0;i--)this._object($(this.images()[i]));return $(window).trigger("resize")},parse_params:function(path,directive,mq){return[this.trim(path),this.convert_directive(directive),this.trim(mq)]},convert_directive:function(directive){var trimmed=this.trim(directive);return trimmed.length>0?trimmed:"replace"},_object:function(el){var raw_arr=this.parse_data_attr(el),scenarios=[],count=raw_arr.length;if(count>0)for(var i=count-1;i>=0;i--){var split=raw_arr[i].split(/\((.*?)(\))$/);if(split.length>1){var cached_split=split[0].split(","),params=this.parse_params(cached_split[0],cached_split[1],split[1]);scenarios.push(params)}}return this.store(el,scenarios)},uuid:function(separator){function S4(){return(65536*(1+Math.random())|0).toString(16).substring(1)}var delim=separator||"-";return S4()+S4()+delim+S4()+delim+S4()+delim+S4()+delim+S4()+S4()+S4()},store:function(el,scenarios){var uuid=this.uuid(),current_uuid=el.data("uuid");return current_uuid?this.cache[current_uuid]:(el.attr("data-uuid",uuid),this.cache[uuid]=scenarios)},trim:function(str){return"string"==typeof str?$.trim(str):str},parse_data_attr:function(el){for(var raw=el.data(this.settings.load_attr).split(/\[(.*?)\]/),count=raw.length,output=[],i=count-1;i>=0;i--)raw[i].replace(/[\W\d]+/,"").length>4&&output.push(raw[i]);return output},reflow:function(){this.images(!0)}}}(Foundation.zj,this,this.document); \ No newline at end of file diff --git a/javascripts/foundation/foundation.joyride.js b/javascripts/foundation/foundation.joyride.js index 627561c..a7e5950 100644 --- a/javascripts/foundation/foundation.joyride.js +++ b/javascripts/foundation/foundation.joyride.js @@ -1,852 +1 @@ -/*jslint unparam: true, browser: true, indent: 2 */ - -(function ($, window, document, undefined) { - 'use strict'; - - var Modernizr = Modernizr || false; - - Foundation.libs.joyride = { - name : 'joyride', - - version : '4.3.2', - - defaults : { - expose : false, // turn on or off the expose feature - modal : false, // Whether to cover page with modal during the tour - tipLocation : 'bottom', // 'top' or 'bottom' in relation to parent - nubPosition : 'auto', // override on a per tooltip bases - scrollSpeed : 300, // Page scrolling speed in milliseconds, 0 = no scroll animation - timer : 0, // 0 = no timer , all other numbers = timer in milliseconds - startTimerOnClick : true, // true or false - true requires clicking the first button start the timer - startOffset : 0, // the index of the tooltip you want to start on (index of the li) - nextButton : true, // true or false to control whether a next button is used - tipAnimation : 'fade', // 'pop' or 'fade' in each tip - pauseAfter : [], // array of indexes where to pause the tour after - exposed : [], // array of expose elements - tipAnimationFadeSpeed: 300, // when tipAnimation = 'fade' this is speed in milliseconds for the transition - cookieMonster : false, // true or false to control whether cookies are used - cookieName : 'joyride', // Name the cookie you'll use - cookieDomain : false, // Will this cookie be attached to a domain, ie. '.notableapp.com' - cookieExpires : 365, // set when you would like the cookie to expire. - tipContainer : 'body', // Where will the tip be attached - postRideCallback : function (){}, // A method to call once the tour closes (canceled or complete) - postStepCallback : function (){}, // A method to call after each step - preStepCallback : function (){}, // A method to call before each step - preRideCallback : function (){}, // A method to call before the tour starts (passed index, tip, and cloned exposed element) - postExposeCallback : function (){}, // A method to call after an element has been exposed - template : { // HTML segments for tip layout - link : '×', - timer : '
    ', - tip : '
    ', - wrapper : '
    ', - button : '', - modal : '
    ', - expose : '
    ', - exposeCover: '
    ' - }, - exposeAddClass : '' // One or more space-separated class names to be added to exposed element - }, - - settings : {}, - - init : function (scope, method, options) { - this.scope = scope || this.scope; - Foundation.inherit(this, 'throttle data_options scrollTo scrollLeft delay'); - - if (typeof method === 'object') { - $.extend(true, this.settings, this.defaults, method); - } else { - $.extend(true, this.settings, this.defaults, options); - } - - if (typeof method !== 'string') { - if (!this.settings.init) this.events(); - - return this.settings.init; - } else { - return this[method].call(this, options); - } - }, - - events : function () { - var self = this; - - $(this.scope) - .on('click.joyride', '.joyride-next-tip, .joyride-modal-bg', function (e) { - e.preventDefault(); - - if (this.settings.$li.next().length < 1) { - this.end(); - } else if (this.settings.timer > 0) { - clearTimeout(this.settings.automate); - this.hide(); - this.show(); - this.startTimer(); - } else { - this.hide(); - this.show(); - } - - }.bind(this)) - - .on('click.joyride', '.joyride-close-tip', function (e) { - e.preventDefault(); - this.end(); - }.bind(this)); - - $(window).on('resize.fndtn.joyride', self.throttle(function () { - if ($('[data-joyride]').length > 0 && self.settings.$next_tip) { - if (self.settings.exposed.length > 0) { - var $els = $(self.settings.exposed); - - $els.each(function () { - var $this = $(this); - self.un_expose($this); - self.expose($this); - }); - } - - if (self.is_phone()) { - self.pos_phone(); - } else { - self.pos_default(false, true); - } - } - }, 100)); - - this.settings.init = true; - }, - - start : function () { - var self = this, - $this = $(this.scope).find('[data-joyride]'), - integer_settings = ['timer', 'scrollSpeed', 'startOffset', 'tipAnimationFadeSpeed', 'cookieExpires'], - int_settings_count = integer_settings.length; - - if (!this.settings.init) this.events(); - - // non configureable settings - this.settings.$content_el = $this; - this.settings.$body = $(this.settings.tipContainer); - this.settings.body_offset = $(this.settings.tipContainer).position(); - this.settings.$tip_content = this.settings.$content_el.find('> li'); - this.settings.paused = false; - this.settings.attempts = 0; - - this.settings.tipLocationPatterns = { - top: ['bottom'], - bottom: [], // bottom should not need to be repositioned - left: ['right', 'top', 'bottom'], - right: ['left', 'top', 'bottom'] - }; - - // can we create cookies? - if (typeof $.cookie !== 'function') { - this.settings.cookieMonster = false; - } - - // generate the tips and insert into dom. - if (!this.settings.cookieMonster || this.settings.cookieMonster && $.cookie(this.settings.cookieName) === null) { - this.settings.$tip_content.each(function (index) { - var $this = $(this); - $.extend(true, self.settings, self.data_options($this)); - // Make sure that settings parsed from data_options are integers where necessary - for (var i = int_settings_count - 1; i >= 0; i--) { - self.settings[integer_settings[i]] = parseInt(self.settings[integer_settings[i]], 10); - } - self.create({$li : $this, index : index}); - }); - - // show first tip - if (!this.settings.startTimerOnClick && this.settings.timer > 0) { - this.show('init'); - this.startTimer(); - } else { - this.show('init'); - } - - } - }, - - resume : function () { - this.set_li(); - this.show(); - }, - - tip_template : function (opts) { - var $blank, content; - - opts.tip_class = opts.tip_class || ''; - - $blank = $(this.settings.template.tip).addClass(opts.tip_class); - content = $.trim($(opts.li).html()) + - this.button_text(opts.button_text) + - this.settings.template.link + - this.timer_instance(opts.index); - - $blank.append($(this.settings.template.wrapper)); - $blank.first().attr('data-index', opts.index); - $('.joyride-content-wrapper', $blank).append(content); - - return $blank[0]; - }, - - timer_instance : function (index) { - var txt; - - if ((index === 0 && this.settings.startTimerOnClick && this.settings.timer > 0) || this.settings.timer === 0) { - txt = ''; - } else { - txt = this.outerHTML($(this.settings.template.timer)[0]); - } - return txt; - }, - - button_text : function (txt) { - if (this.settings.nextButton) { - txt = $.trim(txt) || 'Next'; - txt = this.outerHTML($(this.settings.template.button).append(txt)[0]); - } else { - txt = ''; - } - return txt; - }, - - create : function (opts) { - var buttonText = opts.$li.attr('data-button') || opts.$li.attr('data-text'), - tipClass = opts.$li.attr('class'), - $tip_content = $(this.tip_template({ - tip_class : tipClass, - index : opts.index, - button_text : buttonText, - li : opts.$li - })); - - $(this.settings.tipContainer).append($tip_content); - }, - - show : function (init) { - var $timer = null; - - // are we paused? - if (this.settings.$li === undefined - || ($.inArray(this.settings.$li.index(), this.settings.pauseAfter) === -1)) { - - // don't go to the next li if the tour was paused - if (this.settings.paused) { - this.settings.paused = false; - } else { - this.set_li(init); - } - - this.settings.attempts = 0; - - if (this.settings.$li.length && this.settings.$target.length > 0) { - if (init) { //run when we first start - this.settings.preRideCallback(this.settings.$li.index(), this.settings.$next_tip); - if (this.settings.modal) { - this.show_modal(); - } - } - - this.settings.preStepCallback(this.settings.$li.index(), this.settings.$next_tip); - - if (this.settings.modal && this.settings.expose) { - this.expose(); - } - - this.settings.tipSettings = $.extend(this.settings, this.data_options(this.settings.$li)); - - this.settings.timer = parseInt(this.settings.timer, 10); - - this.settings.tipSettings.tipLocationPattern = this.settings.tipLocationPatterns[this.settings.tipSettings.tipLocation]; - - // scroll if not modal - if (!/body/i.test(this.settings.$target.selector)) { - this.scroll_to(); - } - - if (this.is_phone()) { - this.pos_phone(true); - } else { - this.pos_default(true); - } - - $timer = this.settings.$next_tip.find('.joyride-timer-indicator'); - - if (/pop/i.test(this.settings.tipAnimation)) { - - $timer.width(0); - - if (this.settings.timer > 0) { - - this.settings.$next_tip.show(); - - this.delay(function () { - $timer.animate({ - width: $timer.parent().width() - }, this.settings.timer, 'linear'); - }.bind(this), this.settings.tipAnimationFadeSpeed); - - } else { - this.settings.$next_tip.show(); - - } - - - } else if (/fade/i.test(this.settings.tipAnimation)) { - - $timer.width(0); - - if (this.settings.timer > 0) { - - this.settings.$next_tip - .fadeIn(this.settings.tipAnimationFadeSpeed) - .show(); - - this.delay(function () { - $timer.animate({ - width: $timer.parent().width() - }, this.settings.timer, 'linear'); - }.bind(this), this.settings.tipAnimationFadeSpeed); - - } else { - this.settings.$next_tip.fadeIn(this.settings.tipAnimationFadeSpeed); - - } - } - - this.settings.$current_tip = this.settings.$next_tip; - - // skip non-existant targets - } else if (this.settings.$li && this.settings.$target.length < 1) { - - this.show(); - - } else { - - this.end(); - - } - } else { - - this.settings.paused = true; - - } - - }, - - is_phone : function () { - if (Modernizr) { - return Modernizr.mq('only screen and (max-width: 767px)') || $('.lt-ie9').length > 0; - } - - return ($(window).width() < 767); - }, - - hide : function () { - if (this.settings.modal && this.settings.expose) { - this.un_expose(); - } - - if (!this.settings.modal) { - $('.joyride-modal-bg').hide(); - } - - // Prevent scroll bouncing...wait to remove from layout - this.settings.$current_tip.css('visibility', 'hidden'); - setTimeout($.proxy(function() { - this.hide(); - this.css('visibility', 'visible'); - }, this.settings.$current_tip), 0); - this.settings.postStepCallback(this.settings.$li.index(), - this.settings.$current_tip); - }, - - set_li : function (init) { - if (init) { - this.settings.$li = this.settings.$tip_content.eq(this.settings.startOffset); - this.set_next_tip(); - this.settings.$current_tip = this.settings.$next_tip; - } else { - this.settings.$li = this.settings.$li.next(); - this.set_next_tip(); - } - - this.set_target(); - }, - - set_next_tip : function () { - this.settings.$next_tip = $(".joyride-tip-guide[data-index='" + this.settings.$li.index() + "']"); - this.settings.$next_tip.data('closed', ''); - }, - - set_target : function () { - var cl = this.settings.$li.attr('data-class'), - id = this.settings.$li.attr('data-id'), - $sel = function () { - if (id) { - return $(document.getElementById(id)); - } else if (cl) { - return $('.' + cl).first(); - } else { - return $('body'); - } - }; - - this.settings.$target = $sel(); - }, - - scroll_to : function () { - var window_half, tipOffset; - - window_half = $(window).height() / 2; - tipOffset = Math.ceil(this.settings.$target.offset().top - window_half + this.outerHeight(this.settings.$next_tip)); - if (tipOffset > 0) { - this.scrollTo($('html, body'), tipOffset, this.settings.scrollSpeed); - } - }, - - paused : function () { - return ($.inArray((this.settings.$li.index() + 1), this.settings.pauseAfter) === -1); - }, - - restart : function () { - this.hide(); - this.settings.$li = undefined; - this.show('init'); - }, - - pos_default : function (init, resizing) { - var half_fold = Math.ceil($(window).height() / 2), - tip_position = this.settings.$next_tip.offset(), - $nub = this.settings.$next_tip.find('.joyride-nub'), - nub_width = Math.ceil(this.outerWidth($nub) / 2), - nub_height = Math.ceil(this.outerHeight($nub) / 2), - toggle = init || false; - - // tip must not be "display: none" to calculate position - if (toggle) { - this.settings.$next_tip.css('visibility', 'hidden'); - this.settings.$next_tip.show(); - } - - if (typeof resizing === 'undefined') { - resizing = false; - } - - if (!/body/i.test(this.settings.$target.selector)) { - - if (this.bottom()) { - var leftOffset = this.settings.$target.offset().left; - if (Foundation.rtl) { - leftOffset = this.settings.$target.offset().width - this.settings.$next_tip.width() + leftOffset; - } - this.settings.$next_tip.css({ - top: (this.settings.$target.offset().top + nub_height + this.outerHeight(this.settings.$target)), - left: leftOffset}); - - this.nub_position($nub, this.settings.tipSettings.nubPosition, 'top'); - - } else if (this.top()) { - var leftOffset = this.settings.$target.offset().left; - if (Foundation.rtl) { - leftOffset = this.settings.$target.offset().width - this.settings.$next_tip.width() + leftOffset; - } - this.settings.$next_tip.css({ - top: (this.settings.$target.offset().top - this.outerHeight(this.settings.$next_tip) - nub_height), - left: leftOffset}); - - this.nub_position($nub, this.settings.tipSettings.nubPosition, 'bottom'); - - } else if (this.right()) { - - this.settings.$next_tip.css({ - top: this.settings.$target.offset().top, - left: (this.outerWidth(this.settings.$target) + this.settings.$target.offset().left + nub_width)}); - - this.nub_position($nub, this.settings.tipSettings.nubPosition, 'left'); - - } else if (this.left()) { - - this.settings.$next_tip.css({ - top: this.settings.$target.offset().top, - left: (this.settings.$target.offset().left - this.outerWidth(this.settings.$next_tip) - nub_width)}); - - this.nub_position($nub, this.settings.tipSettings.nubPosition, 'right'); - - } - - if (!this.visible(this.corners(this.settings.$next_tip)) && this.settings.attempts < this.settings.tipSettings.tipLocationPattern.length) { - - $nub.removeClass('bottom') - .removeClass('top') - .removeClass('right') - .removeClass('left'); - - this.settings.tipSettings.tipLocation = this.settings.tipSettings.tipLocationPattern[this.settings.attempts]; - - this.settings.attempts++; - - this.pos_default(); - - } - - } else if (this.settings.$li.length) { - - this.pos_modal($nub); - - } - - if (toggle) { - this.settings.$next_tip.hide(); - this.settings.$next_tip.css('visibility', 'visible'); - } - - }, - - pos_phone : function (init) { - var tip_height = this.outerHeight(this.settings.$next_tip), - tip_offset = this.settings.$next_tip.offset(), - target_height = this.outerHeight(this.settings.$target), - $nub = $('.joyride-nub', this.settings.$next_tip), - nub_height = Math.ceil(this.outerHeight($nub) / 2), - toggle = init || false; - - $nub.removeClass('bottom') - .removeClass('top') - .removeClass('right') - .removeClass('left'); - - if (toggle) { - this.settings.$next_tip.css('visibility', 'hidden'); - this.settings.$next_tip.show(); - } - - if (!/body/i.test(this.settings.$target.selector)) { - - if (this.top()) { - - this.settings.$next_tip.offset({top: this.settings.$target.offset().top - tip_height - nub_height}); - $nub.addClass('bottom'); - - } else { - - this.settings.$next_tip.offset({top: this.settings.$target.offset().top + target_height + nub_height}); - $nub.addClass('top'); - - } - - } else if (this.settings.$li.length) { - this.pos_modal($nub); - } - - if (toggle) { - this.settings.$next_tip.hide(); - this.settings.$next_tip.css('visibility', 'visible'); - } - }, - - pos_modal : function ($nub) { - this.center(); - $nub.hide(); - - this.show_modal(); - }, - - show_modal : function () { - if (!this.settings.$next_tip.data('closed')) { - var joyridemodalbg = $('.joyride-modal-bg'); - if (joyridemodalbg.length < 1) { - $('body').append(this.settings.template.modal).show(); - } - - if (/pop/i.test(this.settings.tipAnimation)) { - joyridemodalbg.show(); - } else { - joyridemodalbg.fadeIn(this.settings.tipAnimationFadeSpeed); - } - } - }, - - expose : function () { - var expose, - exposeCover, - el, - origCSS, - origClasses, - randId = 'expose-'+Math.floor(Math.random()*10000); - - if (arguments.length > 0 && arguments[0] instanceof $) { - el = arguments[0]; - } else if(this.settings.$target && !/body/i.test(this.settings.$target.selector)){ - el = this.settings.$target; - } else { - return false; - } - - if(el.length < 1){ - if(window.console){ - console.error('element not valid', el); - } - return false; - } - - expose = $(this.settings.template.expose); - this.settings.$body.append(expose); - expose.css({ - top: el.offset().top, - left: el.offset().left, - width: this.outerWidth(el, true), - height: this.outerHeight(el, true) - }); - - exposeCover = $(this.settings.template.exposeCover); - - origCSS = { - zIndex: el.css('z-index'), - position: el.css('position') - }; - - origClasses = el.attr('class') == null ? '' : el.attr('class'); - - el.css('z-index',parseInt(expose.css('z-index'))+1); - - if (origCSS.position == 'static') { - el.css('position','relative'); - } - - el.data('expose-css',origCSS); - el.data('orig-class', origClasses); - el.attr('class', origClasses + ' ' + this.settings.exposeAddClass); - - exposeCover.css({ - top: el.offset().top, - left: el.offset().left, - width: this.outerWidth(el, true), - height: this.outerHeight(el, true) - }); - - this.settings.$body.append(exposeCover); - expose.addClass(randId); - exposeCover.addClass(randId); - el.data('expose', randId); - this.settings.postExposeCallback(this.settings.$li.index(), this.settings.$next_tip, el); - this.add_exposed(el); - }, - - un_expose : function () { - var exposeId, - el, - expose , - origCSS, - origClasses, - clearAll = false; - - if (arguments.length > 0 && arguments[0] instanceof $) { - el = arguments[0]; - } else if(this.settings.$target && !/body/i.test(this.settings.$target.selector)){ - el = this.settings.$target; - } else { - return false; - } - - if(el.length < 1){ - if (window.console) { - console.error('element not valid', el); - } - return false; - } - - exposeId = el.data('expose'); - expose = $('.' + exposeId); - - if (arguments.length > 1) { - clearAll = arguments[1]; - } - - if (clearAll === true) { - $('.joyride-expose-wrapper,.joyride-expose-cover').remove(); - } else { - expose.remove(); - } - - origCSS = el.data('expose-css'); - - if (origCSS.zIndex == 'auto') { - el.css('z-index', ''); - } else { - el.css('z-index', origCSS.zIndex); - } - - if (origCSS.position != el.css('position')) { - if(origCSS.position == 'static') {// this is default, no need to set it. - el.css('position', ''); - } else { - el.css('position', origCSS.position); - } - } - - origClasses = el.data('orig-class'); - el.attr('class', origClasses); - el.removeData('orig-classes'); - - el.removeData('expose'); - el.removeData('expose-z-index'); - this.remove_exposed(el); - }, - - add_exposed: function(el){ - this.settings.exposed = this.settings.exposed || []; - if (el instanceof $ || typeof el === 'object') { - this.settings.exposed.push(el[0]); - } else if (typeof el == 'string') { - this.settings.exposed.push(el); - } - }, - - remove_exposed: function(el){ - var search, count; - if (el instanceof $) { - search = el[0] - } else if (typeof el == 'string'){ - search = el; - } - - this.settings.exposed = this.settings.exposed || []; - count = this.settings.exposed.length; - - for (var i=0; i < count; i++) { - if (this.settings.exposed[i] == search) { - this.settings.exposed.splice(i, 1); - return; - } - } - }, - - center : function () { - var $w = $(window); - - this.settings.$next_tip.css({ - top : ((($w.height() - this.outerHeight(this.settings.$next_tip)) / 2) + $w.scrollTop()), - left : ((($w.width() - this.outerWidth(this.settings.$next_tip)) / 2) + this.scrollLeft($w)) - }); - - return true; - }, - - bottom : function () { - return /bottom/i.test(this.settings.tipSettings.tipLocation); - }, - - top : function () { - return /top/i.test(this.settings.tipSettings.tipLocation); - }, - - right : function () { - return /right/i.test(this.settings.tipSettings.tipLocation); - }, - - left : function () { - return /left/i.test(this.settings.tipSettings.tipLocation); - }, - - corners : function (el) { - var w = $(window), - window_half = w.height() / 2, - //using this to calculate since scroll may not have finished yet. - tipOffset = Math.ceil(this.settings.$target.offset().top - window_half + this.settings.$next_tip.outerHeight()), - right = w.width() + this.scrollLeft(w), - offsetBottom = w.height() + tipOffset, - bottom = w.height() + w.scrollTop(), - top = w.scrollTop(); - - if (tipOffset < top) { - if (tipOffset < 0) { - top = 0; - } else { - top = tipOffset; - } - } - - if (offsetBottom > bottom) { - bottom = offsetBottom; - } - - return [ - el.offset().top < top, - right < el.offset().left + el.outerWidth(), - bottom < el.offset().top + el.outerHeight(), - this.scrollLeft(w) > el.offset().left - ]; - }, - - visible : function (hidden_corners) { - var i = hidden_corners.length; - - while (i--) { - if (hidden_corners[i]) return false; - } - - return true; - }, - - nub_position : function (nub, pos, def) { - if (pos === 'auto') { - nub.addClass(def); - } else { - nub.addClass(pos); - } - }, - - startTimer : function () { - if (this.settings.$li.length) { - this.settings.automate = setTimeout(function () { - this.hide(); - this.show(); - this.startTimer(); - }.bind(this), this.settings.timer); - } else { - clearTimeout(this.settings.automate); - } - }, - - end : function () { - if (this.settings.cookieMonster) { - $.cookie(this.settings.cookieName, 'ridden', { expires: this.settings.cookieExpires, domain: this.settings.cookieDomain }); - } - - if (this.settings.timer > 0) { - clearTimeout(this.settings.automate); - } - - if (this.settings.modal && this.settings.expose) { - this.un_expose(); - } - - this.settings.$next_tip.data('closed', true); - - $('.joyride-modal-bg').hide(); - this.settings.$current_tip.hide(); - this.settings.postStepCallback(this.settings.$li.index(), this.settings.$current_tip); - this.settings.postRideCallback(this.settings.$li.index(), this.settings.$current_tip); - $('.joyride-tip-guide').remove(); - }, - - outerHTML : function (el) { - // support FireFox < 11 - return el.outerHTML || new XMLSerializer().serializeToString(el); - }, - - off : function () { - $(this.scope).off('.joyride'); - $(window).off('.joyride'); - $('.joyride-close-tip, .joyride-next-tip, .joyride-modal-bg').off('.joyride'); - $('.joyride-tip-guide, .joyride-modal-bg').remove(); - clearTimeout(this.settings.automate); - this.settings = {}; - }, - - reflow : function () {} - }; -}(Foundation.zj, this, this.document)); +!function($,window,document,undefined){"use strict";var Modernizr=Modernizr||!1;Foundation.libs.joyride={name:"joyride",version:"4.3.2",defaults:{expose:!1,modal:!1,tipLocation:"bottom",nubPosition:"auto",scrollSpeed:300,timer:0,startTimerOnClick:!0,startOffset:0,nextButton:!0,tipAnimation:"fade",pauseAfter:[],exposed:[],tipAnimationFadeSpeed:300,cookieMonster:!1,cookieName:"joyride",cookieDomain:!1,cookieExpires:365,tipContainer:"body",postRideCallback:function(){},postStepCallback:function(){},preStepCallback:function(){},preRideCallback:function(){},postExposeCallback:function(){},template:{link:'×',timer:'
    ',tip:'
    ',wrapper:'
    ',button:'',modal:'
    ',expose:'
    ',exposeCover:'
    '},exposeAddClass:""},settings:{},init:function(scope,method,options){return this.scope=scope||this.scope,Foundation.inherit(this,"throttle data_options scrollTo scrollLeft delay"),"object"==typeof method?$.extend(!0,this.settings,this.defaults,method):$.extend(!0,this.settings,this.defaults,options),"string"!=typeof method?(this.settings.init||this.events(),this.settings.init):this[method].call(this,options)},events:function(){var self=this;$(this.scope).on("click.joyride",".joyride-next-tip, .joyride-modal-bg",function(e){e.preventDefault(),this.settings.$li.next().length<1?this.end():this.settings.timer>0?(clearTimeout(this.settings.automate),this.hide(),this.show(),this.startTimer()):(this.hide(),this.show())}.bind(this)).on("click.joyride",".joyride-close-tip",function(e){e.preventDefault(),this.end()}.bind(this)),$(window).on("resize.fndtn.joyride",self.throttle(function(){if($("[data-joyride]").length>0&&self.settings.$next_tip){if(self.settings.exposed.length>0){var $els=$(self.settings.exposed);$els.each(function(){var $this=$(this);self.un_expose($this),self.expose($this)})}self.is_phone()?self.pos_phone():self.pos_default(!1,!0)}},100)),this.settings.init=!0},start:function(){var self=this,$this=$(this.scope).find("[data-joyride]"),integer_settings=["timer","scrollSpeed","startOffset","tipAnimationFadeSpeed","cookieExpires"],int_settings_count=integer_settings.length;this.settings.init||this.events(),this.settings.$content_el=$this,this.settings.$body=$(this.settings.tipContainer),this.settings.body_offset=$(this.settings.tipContainer).position(),this.settings.$tip_content=this.settings.$content_el.find("> li"),this.settings.paused=!1,this.settings.attempts=0,this.settings.tipLocationPatterns={top:["bottom"],bottom:[],left:["right","top","bottom"],right:["left","top","bottom"]},"function"!=typeof $.cookie&&(this.settings.cookieMonster=!1),(!this.settings.cookieMonster||this.settings.cookieMonster&&null===$.cookie(this.settings.cookieName))&&(this.settings.$tip_content.each(function(index){var $this=$(this);$.extend(!0,self.settings,self.data_options($this));for(var i=int_settings_count-1;i>=0;i--)self.settings[integer_settings[i]]=parseInt(self.settings[integer_settings[i]],10);self.create({$li:$this,index:index})}),!this.settings.startTimerOnClick&&this.settings.timer>0?(this.show("init"),this.startTimer()):this.show("init"))},resume:function(){this.set_li(),this.show()},tip_template:function(opts){var $blank,content;return opts.tip_class=opts.tip_class||"",$blank=$(this.settings.template.tip).addClass(opts.tip_class),content=$.trim($(opts.li).html())+this.button_text(opts.button_text)+this.settings.template.link+this.timer_instance(opts.index),$blank.append($(this.settings.template.wrapper)),$blank.first().attr("data-index",opts.index),$(".joyride-content-wrapper",$blank).append(content),$blank[0]},timer_instance:function(index){var txt;return txt=0===index&&this.settings.startTimerOnClick&&this.settings.timer>0||0===this.settings.timer?"":this.outerHTML($(this.settings.template.timer)[0])},button_text:function(txt){return this.settings.nextButton?(txt=$.trim(txt)||"Next",txt=this.outerHTML($(this.settings.template.button).append(txt)[0])):txt="",txt},create:function(opts){var buttonText=opts.$li.attr("data-button")||opts.$li.attr("data-text"),tipClass=opts.$li.attr("class"),$tip_content=$(this.tip_template({tip_class:tipClass,index:opts.index,button_text:buttonText,li:opts.$li}));$(this.settings.tipContainer).append($tip_content)},show:function(init){var $timer=null;this.settings.$li===undefined||-1===$.inArray(this.settings.$li.index(),this.settings.pauseAfter)?(this.settings.paused?this.settings.paused=!1:this.set_li(init),this.settings.attempts=0,this.settings.$li.length&&this.settings.$target.length>0?(init&&(this.settings.preRideCallback(this.settings.$li.index(),this.settings.$next_tip),this.settings.modal&&this.show_modal()),this.settings.preStepCallback(this.settings.$li.index(),this.settings.$next_tip),this.settings.modal&&this.settings.expose&&this.expose(),this.settings.tipSettings=$.extend(this.settings,this.data_options(this.settings.$li)),this.settings.timer=parseInt(this.settings.timer,10),this.settings.tipSettings.tipLocationPattern=this.settings.tipLocationPatterns[this.settings.tipSettings.tipLocation],/body/i.test(this.settings.$target.selector)||this.scroll_to(),this.is_phone()?this.pos_phone(!0):this.pos_default(!0),$timer=this.settings.$next_tip.find(".joyride-timer-indicator"),/pop/i.test(this.settings.tipAnimation)?($timer.width(0),this.settings.timer>0?(this.settings.$next_tip.show(),this.delay(function(){$timer.animate({width:$timer.parent().width()},this.settings.timer,"linear")}.bind(this),this.settings.tipAnimationFadeSpeed)):this.settings.$next_tip.show()):/fade/i.test(this.settings.tipAnimation)&&($timer.width(0),this.settings.timer>0?(this.settings.$next_tip.fadeIn(this.settings.tipAnimationFadeSpeed).show(),this.delay(function(){$timer.animate({width:$timer.parent().width()},this.settings.timer,"linear")}.bind(this),this.settings.tipAnimationFadeSpeed)):this.settings.$next_tip.fadeIn(this.settings.tipAnimationFadeSpeed)),this.settings.$current_tip=this.settings.$next_tip):this.settings.$li&&this.settings.$target.length<1?this.show():this.end()):this.settings.paused=!0},is_phone:function(){return Modernizr?Modernizr.mq("only screen and (max-width: 767px)")||$(".lt-ie9").length>0:$(window).width()<767},hide:function(){this.settings.modal&&this.settings.expose&&this.un_expose(),this.settings.modal||$(".joyride-modal-bg").hide(),this.settings.$current_tip.css("visibility","hidden"),setTimeout($.proxy(function(){this.hide(),this.css("visibility","visible")},this.settings.$current_tip),0),this.settings.postStepCallback(this.settings.$li.index(),this.settings.$current_tip)},set_li:function(init){init?(this.settings.$li=this.settings.$tip_content.eq(this.settings.startOffset),this.set_next_tip(),this.settings.$current_tip=this.settings.$next_tip):(this.settings.$li=this.settings.$li.next(),this.set_next_tip()),this.set_target()},set_next_tip:function(){this.settings.$next_tip=$(".joyride-tip-guide[data-index='"+this.settings.$li.index()+"']"),this.settings.$next_tip.data("closed","")},set_target:function(){var cl=this.settings.$li.attr("data-class"),id=this.settings.$li.attr("data-id"),$sel=function(){return id?$(document.getElementById(id)):cl?$("."+cl).first():$("body")};this.settings.$target=$sel()},scroll_to:function(){var window_half,tipOffset;window_half=$(window).height()/2,tipOffset=Math.ceil(this.settings.$target.offset().top-window_half+this.outerHeight(this.settings.$next_tip)),tipOffset>0&&this.scrollTo($("html, body"),tipOffset,this.settings.scrollSpeed)},paused:function(){return-1===$.inArray(this.settings.$li.index()+1,this.settings.pauseAfter)},restart:function(){this.hide(),this.settings.$li=undefined,this.show("init")},pos_default:function(init,resizing){var $nub=(Math.ceil($(window).height()/2),this.settings.$next_tip.offset(),this.settings.$next_tip.find(".joyride-nub")),nub_width=Math.ceil(this.outerWidth($nub)/2),nub_height=Math.ceil(this.outerHeight($nub)/2),toggle=init||!1;if(toggle&&(this.settings.$next_tip.css("visibility","hidden"),this.settings.$next_tip.show()),"undefined"==typeof resizing&&(resizing=!1),/body/i.test(this.settings.$target.selector))this.settings.$li.length&&this.pos_modal($nub);else{if(this.bottom()){var leftOffset=this.settings.$target.offset().left;Foundation.rtl&&(leftOffset=this.settings.$target.offset().width-this.settings.$next_tip.width()+leftOffset),this.settings.$next_tip.css({top:this.settings.$target.offset().top+nub_height+this.outerHeight(this.settings.$target),left:leftOffset}),this.nub_position($nub,this.settings.tipSettings.nubPosition,"top")}else if(this.top()){var leftOffset=this.settings.$target.offset().left;Foundation.rtl&&(leftOffset=this.settings.$target.offset().width-this.settings.$next_tip.width()+leftOffset),this.settings.$next_tip.css({top:this.settings.$target.offset().top-this.outerHeight(this.settings.$next_tip)-nub_height,left:leftOffset}),this.nub_position($nub,this.settings.tipSettings.nubPosition,"bottom")}else this.right()?(this.settings.$next_tip.css({top:this.settings.$target.offset().top,left:this.outerWidth(this.settings.$target)+this.settings.$target.offset().left+nub_width}),this.nub_position($nub,this.settings.tipSettings.nubPosition,"left")):this.left()&&(this.settings.$next_tip.css({top:this.settings.$target.offset().top,left:this.settings.$target.offset().left-this.outerWidth(this.settings.$next_tip)-nub_width}),this.nub_position($nub,this.settings.tipSettings.nubPosition,"right"));!this.visible(this.corners(this.settings.$next_tip))&&this.settings.attempts0&&arguments[0]instanceof $)el=arguments[0];else{if(!this.settings.$target||/body/i.test(this.settings.$target.selector))return!1;el=this.settings.$target}return el.length<1?(window.console&&console.error("element not valid",el),!1):(expose=$(this.settings.template.expose),this.settings.$body.append(expose),expose.css({top:el.offset().top,left:el.offset().left,width:this.outerWidth(el,!0),height:this.outerHeight(el,!0)}),exposeCover=$(this.settings.template.exposeCover),origCSS={zIndex:el.css("z-index"),position:el.css("position")},origClasses=null==el.attr("class")?"":el.attr("class"),el.css("z-index",parseInt(expose.css("z-index"))+1),"static"==origCSS.position&&el.css("position","relative"),el.data("expose-css",origCSS),el.data("orig-class",origClasses),el.attr("class",origClasses+" "+this.settings.exposeAddClass),exposeCover.css({top:el.offset().top,left:el.offset().left,width:this.outerWidth(el,!0),height:this.outerHeight(el,!0)}),this.settings.$body.append(exposeCover),expose.addClass(randId),exposeCover.addClass(randId),el.data("expose",randId),this.settings.postExposeCallback(this.settings.$li.index(),this.settings.$next_tip,el),void this.add_exposed(el))},un_expose:function(){var exposeId,el,expose,origCSS,origClasses,clearAll=!1;if(arguments.length>0&&arguments[0]instanceof $)el=arguments[0];else{if(!this.settings.$target||/body/i.test(this.settings.$target.selector))return!1;el=this.settings.$target}return el.length<1?(window.console&&console.error("element not valid",el),!1):(exposeId=el.data("expose"),expose=$("."+exposeId),arguments.length>1&&(clearAll=arguments[1]),clearAll===!0?$(".joyride-expose-wrapper,.joyride-expose-cover").remove():expose.remove(),origCSS=el.data("expose-css"),"auto"==origCSS.zIndex?el.css("z-index",""):el.css("z-index",origCSS.zIndex),origCSS.position!=el.css("position")&&("static"==origCSS.position?el.css("position",""):el.css("position",origCSS.position)),origClasses=el.data("orig-class"),el.attr("class",origClasses),el.removeData("orig-classes"),el.removeData("expose"),el.removeData("expose-z-index"),void this.remove_exposed(el))},add_exposed:function(el){this.settings.exposed=this.settings.exposed||[],el instanceof $||"object"==typeof el?this.settings.exposed.push(el[0]):"string"==typeof el&&this.settings.exposed.push(el)},remove_exposed:function(el){var search,count;el instanceof $?search=el[0]:"string"==typeof el&&(search=el),this.settings.exposed=this.settings.exposed||[],count=this.settings.exposed.length;for(var i=0;count>i;i++)if(this.settings.exposed[i]==search)return void this.settings.exposed.splice(i,1)},center:function(){var $w=$(window);return this.settings.$next_tip.css({top:($w.height()-this.outerHeight(this.settings.$next_tip))/2+$w.scrollTop(),left:($w.width()-this.outerWidth(this.settings.$next_tip))/2+this.scrollLeft($w)}),!0},bottom:function(){return/bottom/i.test(this.settings.tipSettings.tipLocation)},top:function(){return/top/i.test(this.settings.tipSettings.tipLocation)},right:function(){return/right/i.test(this.settings.tipSettings.tipLocation)},left:function(){return/left/i.test(this.settings.tipSettings.tipLocation)},corners:function(el){var w=$(window),window_half=w.height()/2,tipOffset=Math.ceil(this.settings.$target.offset().top-window_half+this.settings.$next_tip.outerHeight()),right=w.width()+this.scrollLeft(w),offsetBottom=w.height()+tipOffset,bottom=w.height()+w.scrollTop(),top=w.scrollTop();return top>tipOffset&&(top=0>tipOffset?0:tipOffset),offsetBottom>bottom&&(bottom=offsetBottom),[el.offset().topel.offset().left]},visible:function(hidden_corners){for(var i=hidden_corners.length;i--;)if(hidden_corners[i])return!1;return!0},nub_position:function(nub,pos,def){nub.addClass("auto"===pos?def:pos)},startTimer:function(){this.settings.$li.length?this.settings.automate=setTimeout(function(){this.hide(),this.show(),this.startTimer()}.bind(this),this.settings.timer):clearTimeout(this.settings.automate)},end:function(){this.settings.cookieMonster&&$.cookie(this.settings.cookieName,"ridden",{expires:this.settings.cookieExpires,domain:this.settings.cookieDomain}),this.settings.timer>0&&clearTimeout(this.settings.automate),this.settings.modal&&this.settings.expose&&this.un_expose(),this.settings.$next_tip.data("closed",!0),$(".joyride-modal-bg").hide(),this.settings.$current_tip.hide(),this.settings.postStepCallback(this.settings.$li.index(),this.settings.$current_tip),this.settings.postRideCallback(this.settings.$li.index(),this.settings.$current_tip),$(".joyride-tip-guide").remove()},outerHTML:function(el){return el.outerHTML||(new XMLSerializer).serializeToString(el)},off:function(){$(this.scope).off(".joyride"),$(window).off(".joyride"),$(".joyride-close-tip, .joyride-next-tip, .joyride-modal-bg").off(".joyride"),$(".joyride-tip-guide, .joyride-modal-bg").remove(),clearTimeout(this.settings.automate),this.settings={}},reflow:function(){}}}(Foundation.zj,this,this.document); \ No newline at end of file diff --git a/javascripts/foundation/foundation.js b/javascripts/foundation/foundation.js index e9050c5..73f8cf0 100644 --- a/javascripts/foundation/foundation.js +++ b/javascripts/foundation/foundation.js @@ -5,31 +5,7 @@ * Free to use under the MIT license. * http://www.opensource.org/licenses/mit-license.php */ - -/*jslint unparam: true, browser: true, indent: 2 */ - -// Accommodate running jQuery or Zepto in noConflict() mode by -// using an anonymous function to redefine the $ shorthand name. -// See http://docs.jquery.com/Using_jQuery_with_Other_Libraries -// and http://zeptojs.com/ -var libFuncName = null; - -if (typeof jQuery === "undefined" && - typeof Zepto === "undefined" && - typeof $ === "function") { - libFuncName = $; -} else if (typeof jQuery === "function") { - libFuncName = jQuery; -} else if (typeof Zepto === "function") { - libFuncName = Zepto; -} else { - throw new TypeError(); -} - -(function ($, window, document, undefined) { - 'use strict'; - - /* +var libFuncName=null;if("undefined"==typeof jQuery&&"undefined"==typeof Zepto&&"function"==typeof $)libFuncName=$;else if("function"==typeof jQuery)libFuncName=jQuery;else{if("function"!=typeof Zepto)throw new TypeError;libFuncName=Zepto}!function($,window,document,undefined){"use strict";/* matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas. @@ -37,428 +13,4 @@ if (typeof jQuery === "undefined" && https://github.com/paulirish/matchMedia.js */ - - $('head').append(''); - $('head').append(''); - $('head').append(''); - - window.matchMedia = window.matchMedia || (function( doc, undefined ) { - - "use strict"; - - var bool, - docElem = doc.documentElement, - refNode = docElem.firstElementChild || docElem.firstChild, - // fakeBody required for - fakeBody = doc.createElement( "body" ), - div = doc.createElement( "div" ); - - div.id = "mq-test-1"; - div.style.cssText = "position:absolute;top:-100em"; - fakeBody.style.background = "none"; - fakeBody.appendChild(div); - - return function(q){ - - div.innerHTML = "­"; - - docElem.insertBefore( fakeBody, refNode ); - bool = div.offsetWidth === 42; - docElem.removeChild( fakeBody ); - - return { - matches: bool, - media: q - }; - - }; - - }( document )); - - // add dusty browser stuff - if (!Array.prototype.filter) { - Array.prototype.filter = function(fun /*, thisp */) { - "use strict"; - - if (this == null) { - throw new TypeError(); - } - - var t = Object(this), - len = t.length >>> 0; - if (typeof fun !== "function") { - return; - } - - var res = [], - thisp = arguments[1]; - for (var i = 0; i < len; i++) { - if (i in t) { - var val = t[i]; // in case fun mutates this - if (fun && fun.call(thisp, val, i, t)) { - res.push(val); - } - } - } - - return res; - } - } - - if (!Function.prototype.bind) { - Function.prototype.bind = function (oThis) { - if (typeof this !== "function") { - // closest thing possible to the ECMAScript 5 internal IsCallable function - throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable"); - } - - var aArgs = Array.prototype.slice.call(arguments, 1), - fToBind = this, - fNOP = function () {}, - fBound = function () { - return fToBind.apply(this instanceof fNOP && oThis - ? this - : oThis, - aArgs.concat(Array.prototype.slice.call(arguments))); - }; - - fNOP.prototype = this.prototype; - fBound.prototype = new fNOP(); - - return fBound; - }; - } - - if (!Array.prototype.indexOf) { - Array.prototype.indexOf = function (searchElement /*, fromIndex */ ) { - "use strict"; - if (this == null) { - throw new TypeError(); - } - var t = Object(this); - var len = t.length >>> 0; - if (len === 0) { - return -1; - } - var n = 0; - if (arguments.length > 1) { - n = Number(arguments[1]); - if (n != n) { // shortcut for verifying if it's NaN - n = 0; - } else if (n != 0 && n != Infinity && n != -Infinity) { - n = (n > 0 || -1) * Math.floor(Math.abs(n)); - } - } - if (n >= len) { - return -1; - } - var k = n >= 0 ? n : Math.max(len - Math.abs(n), 0); - for (; k < len; k++) { - if (k in t && t[k] === searchElement) { - return k; - } - } - return -1; - } - } - - // fake stop() for zepto. - $.fn.stop = $.fn.stop || function() { - return this; - }; - - window.Foundation = { - name : 'Foundation', - - version : '4.3.2', - - cache : {}, - - media_queries : { - small : $('.foundation-mq-small').css('font-family').replace(/\'/g, ''), - medium : $('.foundation-mq-medium').css('font-family').replace(/\'/g, ''), - large : $('.foundation-mq-large').css('font-family').replace(/\'/g, '') - }, - - stylesheet : $('').appendTo('head')[0].sheet, - - init : function (scope, libraries, method, options, response, /* internal */ nc) { - var library_arr, - args = [scope, method, options, response], - responses = [], - nc = nc || false; - - // disable library error catching, - // used for development only - if (nc) this.nc = nc; - - // check RTL - this.rtl = /rtl/i.test($('html').attr('dir')); - - // set foundation global scope - this.scope = scope || this.scope; - - if (libraries && typeof libraries === 'string' && !/reflow/i.test(libraries)) { - if (/off/i.test(libraries)) return this.off(); - - library_arr = libraries.split(' '); - - if (library_arr.length > 0) { - for (var i = library_arr.length - 1; i >= 0; i--) { - responses.push(this.init_lib(library_arr[i], args)); - } - } - } else { - if (/reflow/i.test(libraries)) args[1] = 'reflow'; - - for (var lib in this.libs) { - responses.push(this.init_lib(lib, args)); - } - } - - // if first argument is callback, add to args - if (typeof libraries === 'function') { - args.unshift(libraries); - } - - return this.response_obj(responses, args); - }, - - response_obj : function (response_arr, args) { - for (var i = 0, len = args.length; i < len; i++) { - if (typeof args[i] === 'function') { - return args[i]({ - errors: response_arr.filter(function (s) { - if (typeof s === 'string') return s; - }) - }); - } - } - - return response_arr; - }, - - init_lib : function (lib, args) { - return this.trap(function () { - if (this.libs.hasOwnProperty(lib)) { - this.patch(this.libs[lib]); - return this.libs[lib].init.apply(this.libs[lib], args); - } else { - return function () {}; - } - }.bind(this), lib); - }, - - trap : function (fun, lib) { - if (!this.nc) { - try { - return fun(); - } catch (e) { - return this.error({name: lib, message: 'could not be initialized', more: e.name + ' ' + e.message}); - } - } - - return fun(); - }, - - patch : function (lib) { - this.fix_outer(lib); - lib.scope = this.scope; - lib.rtl = this.rtl; - }, - - inherit : function (scope, methods) { - var methods_arr = methods.split(' '); - - for (var i = methods_arr.length - 1; i >= 0; i--) { - if (this.lib_methods.hasOwnProperty(methods_arr[i])) { - this.libs[scope.name][methods_arr[i]] = this.lib_methods[methods_arr[i]]; - } - } - }, - - random_str : function (length) { - var chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'.split(''); - - if (!length) { - length = Math.floor(Math.random() * chars.length); - } - - var str = ''; - for (var i = 0; i < length; i++) { - str += chars[Math.floor(Math.random() * chars.length)]; - } - return str; - }, - - libs : {}, - - // methods that can be inherited in libraries - lib_methods : { - set_data : function (node, data) { - // this.name references the name of the library calling this method - var id = [this.name,+new Date(),Foundation.random_str(5)].join('-'); - - Foundation.cache[id] = data; - node.attr('data-' + this.name + '-id', id); - return data; - }, - - get_data : function (node) { - return Foundation.cache[node.attr('data-' + this.name + '-id')]; - }, - - remove_data : function (node) { - if (node) { - delete Foundation.cache[node.attr('data-' + this.name + '-id')]; - node.attr('data-' + this.name + '-id', ''); - } else { - $('[data-' + this.name + '-id]').each(function () { - delete Foundation.cache[$(this).attr('data-' + this.name + '-id')]; - $(this).attr('data-' + this.name + '-id', ''); - }); - } - }, - - throttle : function(fun, delay) { - var timer = null; - return function () { - var context = this, args = arguments; - clearTimeout(timer); - timer = setTimeout(function () { - fun.apply(context, args); - }, delay); - }; - }, - - // parses data-options attribute on nodes and turns - // them into an object - data_options : function (el) { - var opts = {}, ii, p, - opts_arr = (el.attr('data-options') || ':').split(';'), - opts_len = opts_arr.length; - - function isNumber (o) { - return ! isNaN (o-0) && o !== null && o !== "" && o !== false && o !== true; - } - - function trim(str) { - if (typeof str === 'string') return $.trim(str); - return str; - } - - // parse options - for (ii = opts_len - 1; ii >= 0; ii--) { - p = opts_arr[ii].split(':'); - - if (/true/i.test(p[1])) p[1] = true; - if (/false/i.test(p[1])) p[1] = false; - if (isNumber(p[1])) p[1] = parseInt(p[1], 10); - - if (p.length === 2 && p[0].length > 0) { - opts[trim(p[0])] = trim(p[1]); - } - } - - return opts; - }, - - delay : function (fun, delay) { - return setTimeout(fun, delay); - }, - - // animated scrolling - scrollTo : function (el, to, duration) { - if (duration < 0) return; - var difference = to - $(window).scrollTop(); - var perTick = difference / duration * 10; - - this.scrollToTimerCache = setTimeout(function() { - if (!isNaN(parseInt(perTick, 10))) { - window.scrollTo(0, $(window).scrollTop() + perTick); - this.scrollTo(el, to, duration - 10); - } - }.bind(this), 10); - }, - - // not supported in core Zepto - scrollLeft : function (el) { - if (!el.length) return; - return ('scrollLeft' in el[0]) ? el[0].scrollLeft : el[0].pageXOffset; - }, - - // test for empty object or array - empty : function (obj) { - if (obj.length && obj.length > 0) return false; - if (obj.length && obj.length === 0) return true; - - for (var key in obj) { - if (hasOwnProperty.call(obj, key)) return false; - } - - return true; - }, - - addCustomRule : function(rule, media) { - if(media === undefined) { - Foundation.stylesheet.insertRule(rule, Foundation.stylesheet.cssRules.length); - } else { - var query = Foundation.media_queries[media]; - if(query !== undefined) { - Foundation.stylesheet.insertRule('@media ' + - Foundation.media_queries[media] + '{ ' + rule + ' }'); - } - } - } - }, - - fix_outer : function (lib) { - lib.outerHeight = function (el, bool) { - if (typeof Zepto === 'function') { - return el.height(); - } - - if (typeof bool !== 'undefined') { - return el.outerHeight(bool); - } - - return el.outerHeight(); - }; - - lib.outerWidth = function (el, bool) { - if (typeof Zepto === 'function') { - return el.width(); - } - - if (typeof bool !== 'undefined') { - return el.outerWidth(bool); - } - - return el.outerWidth(); - }; - }, - - error : function (error) { - return error.name + ' ' + error.message + '; ' + error.more; - }, - - // remove all foundation events. - off: function () { - $(this.scope).off('.fndtn'); - $(window).off('.fndtn'); - return true; - }, - - zj : $ - }; - - $.fn.foundation = function () { - var args = Array.prototype.slice.call(arguments, 0); - - return this.each(function () { - Foundation.init.apply(Foundation, [this].concat(args)); - return this; - }); - }; - -}(libFuncName, this, this.document)); +$("head").append(''),$("head").append(''),$("head").append(''),window.matchMedia=window.matchMedia||function(doc){var bool,docElem=doc.documentElement,refNode=docElem.firstElementChild||docElem.firstChild,fakeBody=doc.createElement("body"),div=doc.createElement("div");return div.id="mq-test-1",div.style.cssText="position:absolute;top:-100em",fakeBody.style.background="none",fakeBody.appendChild(div),function(q){return div.innerHTML='­',docElem.insertBefore(fakeBody,refNode),bool=42===div.offsetWidth,docElem.removeChild(fakeBody),{matches:bool,media:q}}}(document),Array.prototype.filter||(Array.prototype.filter=function(fun){if(null==this)throw new TypeError;var t=Object(this),len=t.length>>>0;if("function"==typeof fun){for(var res=[],thisp=arguments[1],i=0;len>i;i++)if(i in t){var val=t[i];fun&&fun.call(thisp,val,i,t)&&res.push(val)}return res}}),Function.prototype.bind||(Function.prototype.bind=function(oThis){if("function"!=typeof this)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");var aArgs=Array.prototype.slice.call(arguments,1),fToBind=this,fNOP=function(){},fBound=function(){return fToBind.apply(this instanceof fNOP&&oThis?this:oThis,aArgs.concat(Array.prototype.slice.call(arguments)))};return fNOP.prototype=this.prototype,fBound.prototype=new fNOP,fBound}),Array.prototype.indexOf||(Array.prototype.indexOf=function(searchElement){if(null==this)throw new TypeError;var t=Object(this),len=t.length>>>0;if(0===len)return-1;var n=0;if(arguments.length>1&&(n=Number(arguments[1]),n!=n?n=0:0!=n&&1/0!=n&&n!=-1/0&&(n=(n>0||-1)*Math.floor(Math.abs(n)))),n>=len)return-1;for(var k=n>=0?n:Math.max(len-Math.abs(n),0);len>k;k++)if(k in t&&t[k]===searchElement)return k;return-1}),$.fn.stop=$.fn.stop||function(){return this},window.Foundation={name:"Foundation",version:"4.3.2",cache:{},media_queries:{small:$(".foundation-mq-small").css("font-family").replace(/\'/g,""),medium:$(".foundation-mq-medium").css("font-family").replace(/\'/g,""),large:$(".foundation-mq-large").css("font-family").replace(/\'/g,"")},stylesheet:$("").appendTo("head")[0].sheet,init:function(scope,libraries,method,options,response,nc){var library_arr,args=[scope,method,options,response],responses=[],nc=nc||!1;if(nc&&(this.nc=nc),this.rtl=/rtl/i.test($("html").attr("dir")),this.scope=scope||this.scope,libraries&&"string"==typeof libraries&&!/reflow/i.test(libraries)){if(/off/i.test(libraries))return this.off();if(library_arr=libraries.split(" "),library_arr.length>0)for(var i=library_arr.length-1;i>=0;i--)responses.push(this.init_lib(library_arr[i],args))}else{/reflow/i.test(libraries)&&(args[1]="reflow");for(var lib in this.libs)responses.push(this.init_lib(lib,args))}return"function"==typeof libraries&&args.unshift(libraries),this.response_obj(responses,args)},response_obj:function(response_arr,args){for(var i=0,len=args.length;len>i;i++)if("function"==typeof args[i])return args[i]({errors:response_arr.filter(function(s){return"string"==typeof s?s:void 0})});return response_arr},init_lib:function(lib,args){return this.trap(function(){return this.libs.hasOwnProperty(lib)?(this.patch(this.libs[lib]),this.libs[lib].init.apply(this.libs[lib],args)):function(){}}.bind(this),lib)},trap:function(fun,lib){if(!this.nc)try{return fun()}catch(e){return this.error({name:lib,message:"could not be initialized",more:e.name+" "+e.message})}return fun()},patch:function(lib){this.fix_outer(lib),lib.scope=this.scope,lib.rtl=this.rtl},inherit:function(scope,methods){for(var methods_arr=methods.split(" "),i=methods_arr.length-1;i>=0;i--)this.lib_methods.hasOwnProperty(methods_arr[i])&&(this.libs[scope.name][methods_arr[i]]=this.lib_methods[methods_arr[i]])},random_str:function(length){var chars="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");length||(length=Math.floor(Math.random()*chars.length));for(var str="",i=0;length>i;i++)str+=chars[Math.floor(Math.random()*chars.length)];return str},libs:{},lib_methods:{set_data:function(node,data){var id=[this.name,+new Date,Foundation.random_str(5)].join("-");return Foundation.cache[id]=data,node.attr("data-"+this.name+"-id",id),data},get_data:function(node){return Foundation.cache[node.attr("data-"+this.name+"-id")]},remove_data:function(node){node?(delete Foundation.cache[node.attr("data-"+this.name+"-id")],node.attr("data-"+this.name+"-id","")):$("[data-"+this.name+"-id]").each(function(){delete Foundation.cache[$(this).attr("data-"+this.name+"-id")],$(this).attr("data-"+this.name+"-id","")})},throttle:function(fun,delay){var timer=null;return function(){var context=this,args=arguments;clearTimeout(timer),timer=setTimeout(function(){fun.apply(context,args)},delay)}},data_options:function(el){function isNumber(o){return!isNaN(o-0)&&null!==o&&""!==o&&o!==!1&&o!==!0}function trim(str){return"string"==typeof str?$.trim(str):str}var ii,p,opts={},opts_arr=(el.attr("data-options")||":").split(";"),opts_len=opts_arr.length;for(ii=opts_len-1;ii>=0;ii--)p=opts_arr[ii].split(":"),/true/i.test(p[1])&&(p[1]=!0),/false/i.test(p[1])&&(p[1]=!1),isNumber(p[1])&&(p[1]=parseInt(p[1],10)),2===p.length&&p[0].length>0&&(opts[trim(p[0])]=trim(p[1]));return opts},delay:function(fun,delay){return setTimeout(fun,delay)},scrollTo:function(el,to,duration){if(!(0>duration)){var difference=to-$(window).scrollTop(),perTick=difference/duration*10;this.scrollToTimerCache=setTimeout(function(){isNaN(parseInt(perTick,10))||(window.scrollTo(0,$(window).scrollTop()+perTick),this.scrollTo(el,to,duration-10))}.bind(this),10)}},scrollLeft:function(el){return el.length?"scrollLeft"in el[0]?el[0].scrollLeft:el[0].pageXOffset:void 0},empty:function(obj){if(obj.length&&obj.length>0)return!1;if(obj.length&&0===obj.length)return!0;for(var key in obj)if(hasOwnProperty.call(obj,key))return!1;return!0},addCustomRule:function(rule,media){if(media===undefined)Foundation.stylesheet.insertRule(rule,Foundation.stylesheet.cssRules.length);else{var query=Foundation.media_queries[media];query!==undefined&&Foundation.stylesheet.insertRule("@media "+Foundation.media_queries[media]+"{ "+rule+" }")}}},fix_outer:function(lib){lib.outerHeight=function(el,bool){return"function"==typeof Zepto?el.height():"undefined"!=typeof bool?el.outerHeight(bool):el.outerHeight()},lib.outerWidth=function(el,bool){return"function"==typeof Zepto?el.width():"undefined"!=typeof bool?el.outerWidth(bool):el.outerWidth()}},error:function(error){return error.name+" "+error.message+"; "+error.more},off:function(){return $(this.scope).off(".fndtn"),$(window).off(".fndtn"),!0},zj:$},$.fn.foundation=function(){var args=Array.prototype.slice.call(arguments,0);return this.each(function(){return Foundation.init.apply(Foundation,[this].concat(args)),this})}}(libFuncName,this,this.document); \ No newline at end of file diff --git a/javascripts/foundation/foundation.magellan.js b/javascripts/foundation/foundation.magellan.js index 179478a..b85fdc0 100644 --- a/javascripts/foundation/foundation.magellan.js +++ b/javascripts/foundation/foundation.magellan.js @@ -1,136 +1 @@ -/*jslint unparam: true, browser: true, indent: 2 */ - -;(function ($, window, document, undefined) { - 'use strict'; - - Foundation.libs.magellan = { - name : 'magellan', - - version : '4.3.2', - - settings : { - activeClass: 'active', - threshold: 0 - }, - - init : function (scope, method, options) { - this.scope = scope || this.scope; - Foundation.inherit(this, 'data_options'); - - if (typeof method === 'object') { - $.extend(true, this.settings, method); - } - - if (typeof method !== 'string') { - if (!this.settings.init) { - this.fixed_magellan = $("[data-magellan-expedition]"); - this.set_threshold(); - this.last_destination = $('[data-magellan-destination]').last(); - this.events(); - } - - return this.settings.init; - } else { - return this[method].call(this, options); - } - }, - - events : function () { - var self = this; - $(this.scope).on('arrival.fndtn.magellan', '[data-magellan-arrival]', function (e) { - var $destination = $(this), - $expedition = $destination.closest('[data-magellan-expedition]'), - activeClass = $expedition.attr('data-magellan-active-class') - || self.settings.activeClass; - - $destination - .closest('[data-magellan-expedition]') - .find('[data-magellan-arrival]') - .not($destination) - .removeClass(activeClass); - $destination.addClass(activeClass); - }); - - this.fixed_magellan - .on('update-position.fndtn.magellan', function(){ - var $el = $(this); - // $el.data("magellan-fixed-position",""); - // $el.data("magellan-top-offset", ""); - }) - .trigger('update-position'); - - $(window) - .on('resize.fndtn.magellan', function() { - this.fixed_magellan.trigger('update-position'); - }.bind(this)) - - .on('scroll.fndtn.magellan', function() { - var windowScrollTop = $(window).scrollTop(); - self.fixed_magellan.each(function() { - var $expedition = $(this); - if (typeof $expedition.data('magellan-top-offset') === 'undefined') { - $expedition.data('magellan-top-offset', $expedition.offset().top); - } - if (typeof $expedition.data('magellan-fixed-position') === 'undefined') { - $expedition.data('magellan-fixed-position', false) - } - var fixed_position = (windowScrollTop + self.settings.threshold) > $expedition.data("magellan-top-offset"); - var attr = $expedition.attr('data-magellan-top-offset'); - - if ($expedition.data("magellan-fixed-position") != fixed_position) { - $expedition.data("magellan-fixed-position", fixed_position); - if (fixed_position) { - $expedition.addClass('fixed'); - $expedition.css({position:"fixed", top:0}); - } else { - $expedition.removeClass('fixed'); - $expedition.css({position:"", top:""}); - } - if (fixed_position && typeof attr != 'undefined' && attr != false) { - $expedition.css({position:"fixed", top:attr + "px"}); - } - } - }); - }); - - - if (this.last_destination.length > 0) { - $(window).on('scroll.fndtn.magellan', function (e) { - var windowScrollTop = $(window).scrollTop(), - scrolltopPlusHeight = windowScrollTop + $(window).height(), - lastDestinationTop = Math.ceil(self.last_destination.offset().top); - - $('[data-magellan-destination]').each(function () { - var $destination = $(this), - destination_name = $destination.attr('data-magellan-destination'), - topOffset = $destination.offset().top - windowScrollTop; - - if (topOffset <= self.settings.threshold) { - $("[data-magellan-arrival='" + destination_name + "']").trigger('arrival'); - } - // In large screens we may hit the bottom of the page and dont reach the top of the last magellan-destination, so lets force it - if (scrolltopPlusHeight >= $(self.scope).height() && lastDestinationTop > windowScrollTop && lastDestinationTop < scrolltopPlusHeight) { - $('[data-magellan-arrival]').last().trigger('arrival'); - } - }); - }); - } - - this.settings.init = true; - }, - - set_threshold : function () { - if (typeof this.settings.threshold !== 'number') { - this.settings.threshold = (this.fixed_magellan.length > 0) ? - this.outerHeight(this.fixed_magellan, true) : 0; - } - }, - - off : function () { - $(this.scope).off('.fndtn.magellan'); - $(window).off('.fndtn.magellan'); - }, - - reflow : function () {} - }; -}(Foundation.zj, this, this.document)); +!function($,window){"use strict";Foundation.libs.magellan={name:"magellan",version:"4.3.2",settings:{activeClass:"active",threshold:0},init:function(scope,method,options){return this.scope=scope||this.scope,Foundation.inherit(this,"data_options"),"object"==typeof method&&$.extend(!0,this.settings,method),"string"!=typeof method?(this.settings.init||(this.fixed_magellan=$("[data-magellan-expedition]"),this.set_threshold(),this.last_destination=$("[data-magellan-destination]").last(),this.events()),this.settings.init):this[method].call(this,options)},events:function(){var self=this;$(this.scope).on("arrival.fndtn.magellan","[data-magellan-arrival]",function(){var $destination=$(this),$expedition=$destination.closest("[data-magellan-expedition]"),activeClass=$expedition.attr("data-magellan-active-class")||self.settings.activeClass;$destination.closest("[data-magellan-expedition]").find("[data-magellan-arrival]").not($destination).removeClass(activeClass),$destination.addClass(activeClass)}),this.fixed_magellan.on("update-position.fndtn.magellan",function(){$(this)}).trigger("update-position"),$(window).on("resize.fndtn.magellan",function(){this.fixed_magellan.trigger("update-position")}.bind(this)).on("scroll.fndtn.magellan",function(){var windowScrollTop=$(window).scrollTop();self.fixed_magellan.each(function(){var $expedition=$(this);"undefined"==typeof $expedition.data("magellan-top-offset")&&$expedition.data("magellan-top-offset",$expedition.offset().top),"undefined"==typeof $expedition.data("magellan-fixed-position")&&$expedition.data("magellan-fixed-position",!1);var fixed_position=windowScrollTop+self.settings.threshold>$expedition.data("magellan-top-offset"),attr=$expedition.attr("data-magellan-top-offset");$expedition.data("magellan-fixed-position")!=fixed_position&&($expedition.data("magellan-fixed-position",fixed_position),fixed_position?($expedition.addClass("fixed"),$expedition.css({position:"fixed",top:0})):($expedition.removeClass("fixed"),$expedition.css({position:"",top:""})),fixed_position&&"undefined"!=typeof attr&&0!=attr&&$expedition.css({position:"fixed",top:attr+"px"}))})}),this.last_destination.length>0&&$(window).on("scroll.fndtn.magellan",function(){var windowScrollTop=$(window).scrollTop(),scrolltopPlusHeight=windowScrollTop+$(window).height(),lastDestinationTop=Math.ceil(self.last_destination.offset().top);$("[data-magellan-destination]").each(function(){var $destination=$(this),destination_name=$destination.attr("data-magellan-destination"),topOffset=$destination.offset().top-windowScrollTop;topOffset<=self.settings.threshold&&$("[data-magellan-arrival='"+destination_name+"']").trigger("arrival"),scrolltopPlusHeight>=$(self.scope).height()&&lastDestinationTop>windowScrollTop&&scrolltopPlusHeight>lastDestinationTop&&$("[data-magellan-arrival]").last().trigger("arrival")})}),this.settings.init=!0},set_threshold:function(){"number"!=typeof this.settings.threshold&&(this.settings.threshold=this.fixed_magellan.length>0?this.outerHeight(this.fixed_magellan,!0):0)},off:function(){$(this.scope).off(".fndtn.magellan"),$(window).off(".fndtn.magellan")},reflow:function(){}}}(Foundation.zj,this,this.document); \ No newline at end of file diff --git a/javascripts/foundation/foundation.orbit.js b/javascripts/foundation/foundation.orbit.js index 1f8b92a..e3aa250 100644 --- a/javascripts/foundation/foundation.orbit.js +++ b/javascripts/foundation/foundation.orbit.js @@ -1,432 +1 @@ -;(function ($, window, document, undefined) { - 'use strict'; - - var noop = function() {}; - - var Orbit = function(el, settings) { - // Don't reinitialize plugin - if (el.hasClass(settings.slides_container_class)) { - return this; - } - - var self = this, - container, - slides_container = el, - number_container, - bullets_container, - timer_container, - idx = 0, - animate, - timer, - locked = false, - adjust_height_after = false; - - slides_container.children().first().addClass(settings.active_slide_class); - - self.update_slide_number = function(index) { - if (settings.slide_number) { - number_container.find('span:first').text(parseInt(index)+1); - number_container.find('span:last').text(slides_container.children().length); - } - if (settings.bullets) { - bullets_container.children().removeClass(settings.bullets_active_class); - $(bullets_container.children().get(index)).addClass(settings.bullets_active_class); - } - }; - - self.update_active_link = function(index) { - var link = $('a[data-orbit-link="'+slides_container.children().eq(index).attr('data-orbit-slide')+'"]'); - link.parents('ul').find('[data-orbit-link]').removeClass(settings.bullets_active_class); - link.addClass(settings.bullets_active_class); - }; - - self.build_markup = function() { - slides_container.wrap('
    '); - container = slides_container.parent(); - slides_container.addClass(settings.slides_container_class); - - if (settings.navigation_arrows) { - container.append($('').addClass(settings.prev_class)); - container.append($('').addClass(settings.next_class)); - } - - if (settings.timer) { - timer_container = $('
    ').addClass(settings.timer_container_class); - timer_container.append(''); - timer_container.append($('
    ').addClass(settings.timer_progress_class)); - timer_container.addClass(settings.timer_paused_class); - container.append(timer_container); - } - - if (settings.slide_number) { - number_container = $('
    ').addClass(settings.slide_number_class); - number_container.append(' ' + settings.slide_number_text + ' '); - container.append(number_container); - } - - if (settings.bullets) { - bullets_container = $('
      ').addClass(settings.bullets_container_class); - container.append(bullets_container); - slides_container.children().each(function(idx, el) { - var bullet = $('
    1. ').attr('data-orbit-slide', idx); - bullets_container.append(bullet); - }); - } - - if (settings.stack_on_small) { - container.addClass(settings.stack_on_small_class); - } - - self.update_slide_number(0); - self.update_active_link(0); - }; - - self._goto = function(next_idx, start_timer) { - // if (locked) {return false;} - if (next_idx === idx) {return false;} - if (typeof timer === 'object') {timer.restart();} - var slides = slides_container.children(); - - var dir = 'next'; - locked = true; - if (next_idx < idx) {dir = 'prev';} - if (next_idx >= slides.length) {next_idx = 0;} - else if (next_idx < 0) {next_idx = slides.length - 1;} - - var current = $(slides.get(idx)); - var next = $(slides.get(next_idx)); - - current.css('zIndex', 2); - current.removeClass(settings.active_slide_class); - next.css('zIndex', 4).addClass(settings.active_slide_class); - - slides_container.trigger('orbit:before-slide-change'); - settings.before_slide_change(); - self.update_active_link(next_idx); - - var callback = function() { - var unlock = function() { - idx = next_idx; - locked = false; - if (start_timer === true) {timer = self.create_timer(); timer.start();} - self.update_slide_number(idx); - slides_container.trigger('orbit:after-slide-change',[{slide_number: idx, total_slides: slides.length}]); - settings.after_slide_change(idx, slides.length); - }; - if (slides_container.height() != next.height() && settings.variable_height) { - slides_container.animate({'height': next.height()}, 250, 'linear', unlock); - } else { - unlock(); - } - }; - - if (slides.length === 1) {callback(); return false;} - - var start_animation = function() { - if (dir === 'next') {animate.next(current, next, callback);} - if (dir === 'prev') {animate.prev(current, next, callback);} - }; - - if (next.height() > slides_container.height() && settings.variable_height) { - slides_container.animate({'height': next.height()}, 250, 'linear', start_animation); - } else { - start_animation(); - } - }; - - self.next = function(e) { - e.stopImmediatePropagation(); - e.preventDefault(); - self._goto(idx + 1); - }; - - self.prev = function(e) { - e.stopImmediatePropagation(); - e.preventDefault(); - self._goto(idx - 1); - }; - - self.link_custom = function(e) { - e.preventDefault(); - var link = $(this).attr('data-orbit-link'); - if ((typeof link === 'string') && (link = $.trim(link)) != "") { - var slide = container.find('[data-orbit-slide='+link+']'); - if (slide.index() != -1) {self._goto(slide.index());} - } - }; - - self.link_bullet = function(e) { - var index = $(this).attr('data-orbit-slide'); - if ((typeof index === 'string') && (index = $.trim(index)) != "") { - self._goto(parseInt(index)); - } - } - - self.timer_callback = function() { - self._goto(idx + 1, true); - } - - self.compute_dimensions = function() { - var current = $(slides_container.children().get(idx)); - var h = current.height(); - if (!settings.variable_height) { - slides_container.children().each(function(){ - if ($(this).height() > h) { h = $(this).height(); } - }); - } - slides_container.height(h); - }; - - self.create_timer = function() { - var t = new Timer( - container.find('.'+settings.timer_container_class), - settings, - self.timer_callback - ); - return t; - }; - - self.stop_timer = function() { - if (typeof timer === 'object') timer.stop(); - }; - - self.toggle_timer = function() { - var t = container.find('.'+settings.timer_container_class); - if (t.hasClass(settings.timer_paused_class)) { - if (typeof timer === 'undefined') {timer = self.create_timer();} - timer.start(); - } - else { - if (typeof timer === 'object') {timer.stop();} - } - }; - - self.init = function() { - self.build_markup(); - if (settings.timer) {timer = self.create_timer(); timer.start();} - animate = new FadeAnimation(settings, slides_container); - if (settings.animation === 'slide') - animate = new SlideAnimation(settings, slides_container); - container.on('click', '.'+settings.next_class, self.next); - container.on('click', '.'+settings.prev_class, self.prev); - container.on('click', '[data-orbit-slide]', self.link_bullet); - container.on('click', self.toggle_timer); - if (settings.swipe) { - container.on('touchstart.fndtn.orbit', function(e) { - if (!e.touches) {e = e.originalEvent;} - var data = { - start_page_x: e.touches[0].pageX, - start_page_y: e.touches[0].pageY, - start_time: (new Date()).getTime(), - delta_x: 0, - is_scrolling: undefined - }; - container.data('swipe-transition', data); - e.stopPropagation(); - }) - .on('touchmove.fndtn.orbit', function(e) { - if (!e.touches) { e = e.originalEvent; } - // Ignore pinch/zoom events - if(e.touches.length > 1 || e.scale && e.scale !== 1) return; - - var data = container.data('swipe-transition'); - if (typeof data === 'undefined') {data = {};} - - data.delta_x = e.touches[0].pageX - data.start_page_x; - - if ( typeof data.is_scrolling === 'undefined') { - data.is_scrolling = !!( data.is_scrolling || Math.abs(data.delta_x) < Math.abs(e.touches[0].pageY - data.start_page_y) ); - } - - if (!data.is_scrolling && !data.active) { - e.preventDefault(); - var direction = (data.delta_x < 0) ? (idx+1) : (idx-1); - data.active = true; - self._goto(direction); - } - }) - .on('touchend.fndtn.orbit', function(e) { - container.data('swipe-transition', {}); - e.stopPropagation(); - }) - } - container.on('mouseenter.fndtn.orbit', function(e) { - if (settings.timer && settings.pause_on_hover) { - self.stop_timer(); - } - }) - .on('mouseleave.fndtn.orbit', function(e) { - if (settings.timer && settings.resume_on_mouseout) { - timer.start(); - } - }); - - $(document).on('click', '[data-orbit-link]', self.link_custom); - $(window).on('resize', self.compute_dimensions); - $(window).on('load', self.compute_dimensions); - $(window).on('load', function(){ - container.prev('.preloader').css('display', 'none'); - }); - slides_container.trigger('orbit:ready'); - }; - - self.init(); - }; - - var Timer = function(el, settings, callback) { - var self = this, - duration = settings.timer_speed, - progress = el.find('.'+settings.timer_progress_class), - start, - timeout, - left = -1; - - this.update_progress = function(w) { - var new_progress = progress.clone(); - new_progress.attr('style', ''); - new_progress.css('width', w+'%'); - progress.replaceWith(new_progress); - progress = new_progress; - }; - - this.restart = function() { - clearTimeout(timeout); - el.addClass(settings.timer_paused_class); - left = -1; - self.update_progress(0); - }; - - this.start = function() { - if (!el.hasClass(settings.timer_paused_class)) {return true;} - left = (left === -1) ? duration : left; - el.removeClass(settings.timer_paused_class); - start = new Date().getTime(); - progress.animate({'width': '100%'}, left, 'linear'); - timeout = setTimeout(function() { - self.restart(); - callback(); - }, left); - el.trigger('orbit:timer-started') - }; - - this.stop = function() { - if (el.hasClass(settings.timer_paused_class)) {return true;} - clearTimeout(timeout); - el.addClass(settings.timer_paused_class); - var end = new Date().getTime(); - left = left - (end - start); - var w = 100 - ((left / duration) * 100); - self.update_progress(w); - el.trigger('orbit:timer-stopped'); - }; - }; - - var SlideAnimation = function(settings, container) { - var duration = settings.animation_speed; - var is_rtl = ($('html[dir=rtl]').length === 1); - var margin = is_rtl ? 'marginRight' : 'marginLeft'; - var animMargin = {}; - animMargin[margin] = '0%'; - - this.next = function(current, next, callback) { - next.animate(animMargin, duration, 'linear', function() { - current.css(margin, '100%'); - callback(); - }); - }; - - this.prev = function(current, prev, callback) { - prev.css(margin, '-100%'); - prev.animate(animMargin, duration, 'linear', function() { - current.css(margin, '100%'); - callback(); - }); - }; - }; - - var FadeAnimation = function(settings, container) { - var duration = settings.animation_speed; - var is_rtl = ($('html[dir=rtl]').length === 1); - var margin = is_rtl ? 'marginRight' : 'marginLeft'; - - this.next = function(current, next, callback) { - next.css({'margin':'0%', 'opacity':'0.01'}); - next.animate({'opacity':'1'}, duration, 'linear', function() { - current.css('margin', '100%'); - callback(); - }); - }; - - this.prev = function(current, prev, callback) { - prev.css({'margin':'0%', 'opacity':'0.01'}); - prev.animate({'opacity':'1'}, duration, 'linear', function() { - current.css('margin', '100%'); - callback(); - }); - }; - }; - - - Foundation.libs = Foundation.libs || {}; - - Foundation.libs.orbit = { - name: 'orbit', - - version: '4.3.2', - - settings: { - animation: 'slide', - timer_speed: 10000, - pause_on_hover: true, - resume_on_mouseout: false, - animation_speed: 500, - stack_on_small: false, - navigation_arrows: true, - slide_number: true, - slide_number_text: 'of', - container_class: 'orbit-container', - stack_on_small_class: 'orbit-stack-on-small', - next_class: 'orbit-next', - prev_class: 'orbit-prev', - timer_container_class: 'orbit-timer', - timer_paused_class: 'paused', - timer_progress_class: 'orbit-progress', - slides_container_class: 'orbit-slides-container', - bullets_container_class: 'orbit-bullets', - bullets_active_class: 'active', - slide_number_class: 'orbit-slide-number', - caption_class: 'orbit-caption', - active_slide_class: 'active', - orbit_transition_class: 'orbit-transitioning', - bullets: true, - timer: true, - variable_height: false, - swipe: true, - before_slide_change: noop, - after_slide_change: noop - }, - - init: function (scope, method, options) { - var self = this; - Foundation.inherit(self, 'data_options'); - - if (typeof method === 'object') { - $.extend(true, self.settings, method); - } - - if ($(scope).is('[data-orbit]')) { - var $el = $(scope); - var opts = self.data_options($el); - new Orbit($el, $.extend({},self.settings, opts)); - } - - $('[data-orbit]', scope).each(function(idx, el) { - var $el = $(el); - var opts = self.data_options($el); - new Orbit($el, $.extend({},self.settings, opts)); - }); - } - }; - - -}(Foundation.zj, this, this.document)); +!function($,window,document,undefined){"use strict";var noop=function(){},Orbit=function(el,settings){if(el.hasClass(settings.slides_container_class))return this;var container,number_container,bullets_container,timer_container,animate,timer,self=this,slides_container=el,idx=0,locked=!1;slides_container.children().first().addClass(settings.active_slide_class),self.update_slide_number=function(index){settings.slide_number&&(number_container.find("span:first").text(parseInt(index)+1),number_container.find("span:last").text(slides_container.children().length)),settings.bullets&&(bullets_container.children().removeClass(settings.bullets_active_class),$(bullets_container.children().get(index)).addClass(settings.bullets_active_class))},self.update_active_link=function(index){var link=$('a[data-orbit-link="'+slides_container.children().eq(index).attr("data-orbit-slide")+'"]');link.parents("ul").find("[data-orbit-link]").removeClass(settings.bullets_active_class),link.addClass(settings.bullets_active_class)},self.build_markup=function(){slides_container.wrap('
      '),container=slides_container.parent(),slides_container.addClass(settings.slides_container_class),settings.navigation_arrows&&(container.append($('').addClass(settings.prev_class)),container.append($('').addClass(settings.next_class))),settings.timer&&(timer_container=$("
      ").addClass(settings.timer_container_class),timer_container.append(""),timer_container.append($("
      ").addClass(settings.timer_progress_class)),timer_container.addClass(settings.timer_paused_class),container.append(timer_container)),settings.slide_number&&(number_container=$("
      ").addClass(settings.slide_number_class),number_container.append(" "+settings.slide_number_text+" "),container.append(number_container)),settings.bullets&&(bullets_container=$("
        ").addClass(settings.bullets_container_class),container.append(bullets_container),slides_container.children().each(function(idx){var bullet=$("
      1. ").attr("data-orbit-slide",idx);bullets_container.append(bullet)})),settings.stack_on_small&&container.addClass(settings.stack_on_small_class),self.update_slide_number(0),self.update_active_link(0)},self._goto=function(next_idx,start_timer){if(next_idx===idx)return!1;"object"==typeof timer&&timer.restart();var slides=slides_container.children(),dir="next";locked=!0,idx>next_idx&&(dir="prev"),next_idx>=slides.length?next_idx=0:0>next_idx&&(next_idx=slides.length-1);var current=$(slides.get(idx)),next=$(slides.get(next_idx));current.css("zIndex",2),current.removeClass(settings.active_slide_class),next.css("zIndex",4).addClass(settings.active_slide_class),slides_container.trigger("orbit:before-slide-change"),settings.before_slide_change(),self.update_active_link(next_idx);var callback=function(){var unlock=function(){idx=next_idx,locked=!1,start_timer===!0&&(timer=self.create_timer(),timer.start()),self.update_slide_number(idx),slides_container.trigger("orbit:after-slide-change",[{slide_number:idx,total_slides:slides.length}]),settings.after_slide_change(idx,slides.length)};slides_container.height()!=next.height()&&settings.variable_height?slides_container.animate({height:next.height()},250,"linear",unlock):unlock()};if(1===slides.length)return callback(),!1;var start_animation=function(){"next"===dir&&animate.next(current,next,callback),"prev"===dir&&animate.prev(current,next,callback)};next.height()>slides_container.height()&&settings.variable_height?slides_container.animate({height:next.height()},250,"linear",start_animation):start_animation()},self.next=function(e){e.stopImmediatePropagation(),e.preventDefault(),self._goto(idx+1)},self.prev=function(e){e.stopImmediatePropagation(),e.preventDefault(),self._goto(idx-1)},self.link_custom=function(e){e.preventDefault();var link=$(this).attr("data-orbit-link");if("string"==typeof link&&""!=(link=$.trim(link))){var slide=container.find("[data-orbit-slide="+link+"]");-1!=slide.index()&&self._goto(slide.index())}},self.link_bullet=function(){var index=$(this).attr("data-orbit-slide");"string"==typeof index&&""!=(index=$.trim(index))&&self._goto(parseInt(index))},self.timer_callback=function(){self._goto(idx+1,!0)},self.compute_dimensions=function(){var current=$(slides_container.children().get(idx)),h=current.height();settings.variable_height||slides_container.children().each(function(){$(this).height()>h&&(h=$(this).height())}),slides_container.height(h)},self.create_timer=function(){var t=new Timer(container.find("."+settings.timer_container_class),settings,self.timer_callback);return t},self.stop_timer=function(){"object"==typeof timer&&timer.stop()},self.toggle_timer=function(){var t=container.find("."+settings.timer_container_class);t.hasClass(settings.timer_paused_class)?("undefined"==typeof timer&&(timer=self.create_timer()),timer.start()):"object"==typeof timer&&timer.stop()},self.init=function(){self.build_markup(),settings.timer&&(timer=self.create_timer(),timer.start()),animate=new FadeAnimation(settings,slides_container),"slide"===settings.animation&&(animate=new SlideAnimation(settings,slides_container)),container.on("click","."+settings.next_class,self.next),container.on("click","."+settings.prev_class,self.prev),container.on("click","[data-orbit-slide]",self.link_bullet),container.on("click",self.toggle_timer),settings.swipe&&container.on("touchstart.fndtn.orbit",function(e){e.touches||(e=e.originalEvent);var data={start_page_x:e.touches[0].pageX,start_page_y:e.touches[0].pageY,start_time:(new Date).getTime(),delta_x:0,is_scrolling:undefined};container.data("swipe-transition",data),e.stopPropagation()}).on("touchmove.fndtn.orbit",function(e){if(e.touches||(e=e.originalEvent),!(e.touches.length>1||e.scale&&1!==e.scale)){var data=container.data("swipe-transition");if("undefined"==typeof data&&(data={}),data.delta_x=e.touches[0].pageX-data.start_page_x,"undefined"==typeof data.is_scrolling&&(data.is_scrolling=!!(data.is_scrolling||Math.abs(data.delta_x)
      2. ' + $link.text() +'
      3. '); - } else { - var $titleLi = $('
      4. '); - } - - // Copy link to subnav - if (self.settings.custom_back_text == true) { - $titleLi.find('h5>a').html(self.settings.back_text); - } else { - $titleLi.find('h5>a').html('« ' + $link.html()); - } - $dropdown.prepend($titleLi); - }); - - // Put element back in the DOM - this.settings.$section.appendTo(this.settings.$topbar); - - // check for sticky - this.sticky(); - }, - - height : function (ul) { - var total = 0, - self = this; - - ul.find('> li').each(function () { total += self.outerHeight($(this), true); }); - - return total; - }, - - sticky : function () { - var $window = $(window), - self = this; - - $window.scroll(function() { - self.updateStickyPositioning(); - }); - }, - - updateStickyPositioning: function() { - var klass = '.' + this.settings.stickyClass; - var $window = $(window); - - if ($(klass).length > 0) { - var distance = this.settings.$topbar.data('stickyoffset'); - if (!$(klass).hasClass('expanded')) { - if ($window.scrollTop() > (distance)) { - if (!$(klass).hasClass('fixed')) { - $(klass).addClass('fixed'); - $('body').addClass('f-topbar-fixed'); - } - } else if ($window.scrollTop() <= distance) { - if ($(klass).hasClass('fixed')) { - $(klass).removeClass('fixed'); - $('body').removeClass('f-topbar-fixed'); - } - } - } - } - }, - - off : function () { - $(this.scope).off('.fndtn.topbar'); - $(window).off('.fndtn.topbar'); - }, - - reflow : function () {} - }; -}(Foundation.zj, this, this.document)); +!function($,window,document){"use strict";Foundation.libs.topbar={name:"topbar",version:"4.3.2",settings:{index:0,stickyClass:"sticky",custom_back_text:!0,back_text:"Back",is_hover:!0,mobile_show_parent_link:!1,scrolltop:!0,init:!1},init:function(section,method,options){Foundation.inherit(this,"data_options addCustomRule");var self=this;return"object"==typeof method?$.extend(!0,this.settings,method):"undefined"!=typeof options&&$.extend(!0,this.settings,options),"string"!=typeof method?($(".top-bar, [data-topbar]").each(function(){$.extend(!0,self.settings,self.data_options($(this))),self.settings.$w=$(window),self.settings.$topbar=$(this),self.settings.$section=self.settings.$topbar.find("section"),self.settings.$titlebar=self.settings.$topbar.children("ul").first(),self.settings.$topbar.data("index",0);var topbarContainer=self.settings.$topbar.parent();topbarContainer.hasClass("fixed")||topbarContainer.hasClass(self.settings.stickyClass)?(self.settings.$topbar.data("height",self.outerHeight(topbarContainer)),self.settings.$topbar.data("stickyoffset",topbarContainer.offset().top)):self.settings.$topbar.data("height",self.outerHeight(self.settings.$topbar));var breakpoint=$("
        ").insertAfter(self.settings.$topbar);self.settings.breakPoint=breakpoint.width(),breakpoint.remove(),self.assemble(),self.settings.is_hover&&self.settings.$topbar.find(".has-dropdown").addClass("not-click"),self.addCustomRule(".f-topbar-fixed { padding-top: "+self.settings.$topbar.data("height")+"px }"),self.settings.$topbar.parent().hasClass("fixed")&&$("body").addClass("f-topbar-fixed")}),self.settings.init||this.events(),this.settings.init):this[method].call(this,options)},toggle:function(){var self=this,topbar=$(".top-bar, [data-topbar]"),section=topbar.find("section, .section");self.breakpoint()&&(self.rtl?(section.css({right:"0%"}),section.find(">.name").css({right:"100%"})):(section.css({left:"0%"}),section.find(">.name").css({left:"100%"})),section.find("li.moved").removeClass("moved"),topbar.data("index",0),topbar.toggleClass("expanded").css("height","")),self.settings.scrolltop?topbar.hasClass("expanded")?topbar.parent().hasClass("fixed")&&(self.settings.scrolltop?(topbar.parent().removeClass("fixed"),topbar.addClass("fixed"),$("body").removeClass("f-topbar-fixed"),window.scrollTo(0,0)):topbar.parent().removeClass("expanded")):topbar.hasClass("fixed")&&(topbar.parent().addClass("fixed"),topbar.removeClass("fixed"),$("body").addClass("f-topbar-fixed")):(topbar.parent().hasClass(self.settings.stickyClass)&&topbar.parent().addClass("fixed"),topbar.parent().hasClass("fixed")&&(topbar.hasClass("expanded")?(topbar.addClass("fixed"),topbar.parent().addClass("expanded")):(topbar.removeClass("fixed"),topbar.parent().removeClass("expanded"),self.updateStickyPositioning())))},timer:null,events:function(){var self=this;$(this.scope).off(".fndtn.topbar").on("click.fndtn.topbar",".top-bar .toggle-topbar, [data-topbar] .toggle-topbar",function(e){e.preventDefault(),self.toggle()}).on("click.fndtn.topbar",".top-bar li.has-dropdown",function(e){{var li=$(this),target=$(e.target),topbar=li.closest("[data-topbar], .top-bar");topbar.data("topbar")}return target.data("revealId")?void self.toggle():void(self.breakpoint()||(!self.settings.is_hover||Modernizr.touch)&&(e.stopImmediatePropagation(),"A"===target[0].nodeName&&target.parent().hasClass("has-dropdown")&&e.preventDefault(),li.hasClass("hover")?(li.removeClass("hover").find("li").removeClass("hover"),li.parents("li.hover").removeClass("hover")):li.addClass("hover")))}).on("click.fndtn.topbar",".top-bar .has-dropdown>a, [data-topbar] .has-dropdown>a",function(e){if(self.breakpoint()&&$(window).width()!=self.settings.breakPoint){e.preventDefault();var $this=$(this),topbar=$this.closest(".top-bar, [data-topbar]"),section=topbar.find("section, .section"),$selectedLi=($this.next(".dropdown").outerHeight(),$this.closest("li"));topbar.data("index",topbar.data("index")+1),$selectedLi.addClass("moved"),self.rtl?(section.css({right:-(100*topbar.data("index"))+"%"}),section.find(">.name").css({right:100*topbar.data("index")+"%"})):(section.css({left:-(100*topbar.data("index"))+"%"}),section.find(">.name").css({left:100*topbar.data("index")+"%"})),topbar.css("height",self.outerHeight($this.siblings("ul"),!0)+self.settings.$topbar.data("height"))}}),$(window).on("resize.fndtn.topbar",function(){if("undefined"!=typeof self.settings.$topbar){var stickyOffset,stickyContainer=self.settings.$topbar.parent("."+this.settings.stickyClass);if(!self.breakpoint()){var doToggle=self.settings.$topbar.hasClass("expanded");$(".top-bar, [data-topbar]").css("height","").removeClass("expanded").find("li").removeClass("hover"),doToggle&&self.toggle()}stickyContainer.length>0&&(stickyContainer.hasClass("fixed")?(stickyContainer.removeClass("fixed"),stickyOffset=stickyContainer.offset().top,$(document.body).hasClass("f-topbar-fixed")&&(stickyOffset-=self.settings.$topbar.data("height")),self.settings.$topbar.data("stickyoffset",stickyOffset),stickyContainer.addClass("fixed")):(stickyOffset=stickyContainer.offset().top,self.settings.$topbar.data("stickyoffset",stickyOffset)))}}.bind(this)),$("body").on("click.fndtn.topbar",function(e){var parent=$(e.target).closest("li").closest("li.hover");parent.length>0||$(".top-bar li, [data-topbar] li").removeClass("hover")}),$(this.scope).on("click.fndtn",".top-bar .has-dropdown .back, [data-topbar] .has-dropdown .back",function(e){e.preventDefault();var $this=$(this),topbar=$this.closest(".top-bar, [data-topbar]"),section=topbar.find("section, .section"),$movedLi=$this.closest("li.moved"),$previousLevelUl=$movedLi.parent();topbar.data("index",topbar.data("index")-1),self.rtl?(section.css({right:-(100*topbar.data("index"))+"%"}),section.find(">.name").css({right:100*topbar.data("index")+"%"})):(section.css({left:-(100*topbar.data("index"))+"%"}),section.find(">.name").css({left:100*topbar.data("index")+"%"})),0===topbar.data("index")?topbar.css("height",""):topbar.css("height",self.outerHeight($previousLevelUl,!0)+self.settings.$topbar.data("height")),setTimeout(function(){$movedLi.removeClass("moved")},300)})},breakpoint:function(){return $(document).width()<=this.settings.breakPoint||$("html").hasClass("lt-ie9")},assemble:function(){var self=this;this.settings.$section.detach(),this.settings.$section.find(".has-dropdown>a").each(function(){var $link=$(this),$dropdown=$link.siblings(".dropdown"),url=$link.attr("href");if(self.settings.mobile_show_parent_link&&url&&url.length>1)var $titleLi=$('
      5. '+$link.text()+"
      6. ");else var $titleLi=$('
      7. ');$titleLi.find("h5>a").html(1==self.settings.custom_back_text?self.settings.back_text:"« "+$link.html()),$dropdown.prepend($titleLi)}),this.settings.$section.appendTo(this.settings.$topbar),this.sticky()},height:function(ul){var total=0,self=this;return ul.find("> li").each(function(){total+=self.outerHeight($(this),!0)}),total},sticky:function(){var $window=$(window),self=this;$window.scroll(function(){self.updateStickyPositioning()})},updateStickyPositioning:function(){var klass="."+this.settings.stickyClass,$window=$(window);if($(klass).length>0){var distance=this.settings.$topbar.data("stickyoffset");$(klass).hasClass("expanded")||($window.scrollTop()>distance?$(klass).hasClass("fixed")||($(klass).addClass("fixed"),$("body").addClass("f-topbar-fixed")):$window.scrollTop()<=distance&&$(klass).hasClass("fixed")&&($(klass).removeClass("fixed"),$("body").removeClass("f-topbar-fixed")))}},off:function(){$(this.scope).off(".fndtn.topbar"),$(window).off(".fndtn.topbar")},reflow:function(){}}}(Foundation.zj,this,this.document); \ No newline at end of file diff --git a/javascripts/vendor/custom.modernizr.js b/javascripts/vendor/custom.modernizr.js index 4eb3d06..93fe0fb 100644 --- a/javascripts/vendor/custom.modernizr.js +++ b/javascripts/vendor/custom.modernizr.js @@ -1,4 +1 @@ -/* Modernizr 2.6.2 (Custom Build) | MIT & BSD - * Build: http://modernizr.com/download/#-inlinesvg-svg-svgclippaths-touch-shiv-mq-cssclasses-teststyles-prefixes-ie8compat-load - */ -;window.Modernizr=function(a,b,c){function y(a){j.cssText=a}function z(a,b){return y(m.join(a+";")+(b||""))}function A(a,b){return typeof a===b}function B(a,b){return!!~(""+a).indexOf(b)}function C(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:A(f,"function")?f.bind(d||b):f}return!1}var d="2.6.2",e={},f=!0,g=b.documentElement,h="modernizr",i=b.createElement(h),j=i.style,k,l={}.toString,m=" -webkit- -moz- -o- -ms- ".split(" "),n={svg:"http://www.w3.org/2000/svg"},o={},p={},q={},r=[],s=r.slice,t,u=function(a,c,d,e){var f,i,j,k,l=b.createElement("div"),m=b.body,n=m||b.createElement("body");if(parseInt(d,10))while(d--)j=b.createElement("div"),j.id=e?e[d]:h+(d+1),l.appendChild(j);return f=["­",'"].join(""),l.id=h,(m?l:n).innerHTML+=f,n.appendChild(l),m||(n.style.background="",n.style.overflow="hidden",k=g.style.overflow,g.style.overflow="hidden",g.appendChild(n)),i=c(l,a),m?l.parentNode.removeChild(l):(n.parentNode.removeChild(n),g.style.overflow=k),!!i},v=function(b){var c=a.matchMedia||a.msMatchMedia;if(c)return c(b).matches;var d;return u("@media "+b+" { #"+h+" { position: absolute; } }",function(b){d=(a.getComputedStyle?getComputedStyle(b,null):b.currentStyle)["position"]=="absolute"}),d},w={}.hasOwnProperty,x;!A(w,"undefined")&&!A(w.call,"undefined")?x=function(a,b){return w.call(a,b)}:x=function(a,b){return b in a&&A(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=s.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(s.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(s.call(arguments)))};return e}),o.touch=function(){var c;return"ontouchstart"in a||a.DocumentTouch&&b instanceof DocumentTouch?c=!0:u(["@media (",m.join("touch-enabled),("),h,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(a){c=a.offsetTop===9}),c},o.svg=function(){return!!b.createElementNS&&!!b.createElementNS(n.svg,"svg").createSVGRect},o.inlinesvg=function(){var a=b.createElement("div");return a.innerHTML="",(a.firstChild&&a.firstChild.namespaceURI)==n.svg},o.svgclippaths=function(){return!!b.createElementNS&&/SVGClipPath/.test(l.call(b.createElementNS(n.svg,"clipPath")))};for(var D in o)x(o,D)&&(t=D.toLowerCase(),e[t]=o[D](),r.push((e[t]?"":"no-")+t));return e.addTest=function(a,b){if(typeof a=="object")for(var d in a)x(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,typeof f!="undefined"&&f&&(g.className+=" "+(b?"":"no-")+a),e[a]=b}return e},y(""),i=k=null,function(a,b){function k(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function l(){var a=r.elements;return typeof a=="string"?a.split(" "):a}function m(a){var b=i[a[g]];return b||(b={},h++,a[g]=h,i[h]=b),b}function n(a,c,f){c||(c=b);if(j)return c.createElement(a);f||(f=m(c));var g;return f.cache[a]?g=f.cache[a].cloneNode():e.test(a)?g=(f.cache[a]=f.createElem(a)).cloneNode():g=f.createElem(a),g.canHaveChildren&&!d.test(a)?f.frag.appendChild(g):g}function o(a,c){a||(a=b);if(j)return a.createDocumentFragment();c=c||m(a);var d=c.frag.cloneNode(),e=0,f=l(),g=f.length;for(;e",f="hidden"in a,j=a.childNodes.length==1||function(){b.createElement("a");var a=b.createDocumentFragment();return typeof a.cloneNode=="undefined"||typeof a.createDocumentFragment=="undefined"||typeof a.createElement=="undefined"}()}catch(c){f=!0,j=!0}})();var r={elements:c.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:c.shivCSS!==!1,supportsUnknownElements:j,shivMethods:c.shivMethods!==!1,type:"default",shivDocument:q,createElement:n,createDocumentFragment:o};a.html5=r,q(b)}(this,b),e._version=d,e._prefixes=m,e.mq=v,e.testStyles=u,g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+r.join(" "):""),e}(this,this.document),function(a,b,c){function d(a){return"[object Function]"==o.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=p.shift();q=1,a?a.t?m(function(){("c"==a.t?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){"img"!=a&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l=b.createElement(a),o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};1===y[c]&&(r=1,y[c]=[]),"object"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),"img"!=a&&(r||2===y[c]?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i("c"==b?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),1==p.length&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&"[object Opera]"==o.call(a.opera),l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return"[object Array]"==o.call(a)},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f',a,""].join(""),l.id=h,(m?l:n).innerHTML+=f,n.appendChild(l),m||(n.style.background="",n.style.overflow="hidden",k=g.style.overflow,g.style.overflow="hidden",g.appendChild(n)),i=c(l,a),m?l.parentNode.removeChild(l):(n.parentNode.removeChild(n),g.style.overflow=k),!!i},v=function(b){var c=a.matchMedia||a.msMatchMedia;if(c)return c(b).matches;var d;return u("@media "+b+" { #"+h+" { position: absolute; } }",function(b){d="absolute"==(a.getComputedStyle?getComputedStyle(b,null):b.currentStyle).position}),d},w={}.hasOwnProperty;x=A(w,"undefined")||A(w.call,"undefined")?function(a,b){return b in a&&A(a.constructor.prototype[b],"undefined")}:function(a,b){return w.call(a,b)},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if("function"!=typeof c)throw new TypeError;var d=s.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(s.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(s.call(arguments)))};return e}),o.touch=function(){var c;return"ontouchstart"in a||a.DocumentTouch&&b instanceof DocumentTouch?c=!0:u(["@media (",m.join("touch-enabled),("),h,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(a){c=9===a.offsetTop}),c},o.svg=function(){return!!b.createElementNS&&!!b.createElementNS(n.svg,"svg").createSVGRect},o.inlinesvg=function(){var a=b.createElement("div");return a.innerHTML="",(a.firstChild&&a.firstChild.namespaceURI)==n.svg},o.svgclippaths=function(){return!!b.createElementNS&&/SVGClipPath/.test(l.call(b.createElementNS(n.svg,"clipPath")))};for(var D in o)x(o,D)&&(t=D.toLowerCase(),e[t]=o[D](),r.push((e[t]?"":"no-")+t));return e.addTest=function(a,b){if("object"==typeof a)for(var d in a)x(a,d)&&e.addTest(d,a[d]);else{if(a=a.toLowerCase(),e[a]!==c)return e;b="function"==typeof b?b():b,"undefined"!=typeof f&&f&&(g.className+=" "+(b?"":"no-")+a),e[a]=b}return e},y(""),i=k=null,function(a,b){function k(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function l(){var a=r.elements;return"string"==typeof a?a.split(" "):a}function m(a){var b=i[a[g]];return b||(b={},h++,a[g]=h,i[h]=b),b}function n(a,c,f){if(c||(c=b),j)return c.createElement(a);f||(f=m(c));var g;return g=f.cache[a]?f.cache[a].cloneNode():e.test(a)?(f.cache[a]=f.createElem(a)).cloneNode():f.createElem(a),g.canHaveChildren&&!d.test(a)?f.frag.appendChild(g):g}function o(a,c){if(a||(a=b),j)return a.createDocumentFragment();c=c||m(a);for(var d=c.frag.cloneNode(),e=0,f=l(),g=f.length;g>e;e++)d.createElement(f[e]);return d}function p(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return r.shivMethods?n(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+l().join().replace(/\w+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(r,b.frag)}function q(a){a||(a=b);var c=m(a);return r.shivCSS&&!f&&!c.hasCSS&&(c.hasCSS=!!k(a,"article,aside,figcaption,figure,footer,header,hgroup,nav,section{display:block}mark{background:#FF0;color:#000}")),j||p(a,c),a}var f,j,c=a.html5||{},d=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,e=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,g="_html5shiv",h=0,i={};!function(){try{var a=b.createElement("a");a.innerHTML="",f="hidden"in a,j=1==a.childNodes.length||function(){b.createElement("a");var a=b.createDocumentFragment();return"undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}()}catch(c){f=!0,j=!0}}();var r={elements:c.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:c.shivCSS!==!1,supportsUnknownElements:j,shivMethods:c.shivMethods!==!1,type:"default",shivDocument:q,createElement:n,createDocumentFragment:o};a.html5=r,q(b)}(this,b),e._version=d,e._prefixes=m,e.mq=v,e.testStyles=u,g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+r.join(" "):""),e}(this,this.document),function(a,b,c){function d(a){return"[object Function]"==o.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=p.shift();q=1,a?a.t?m(function(){("c"==a.t?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){"img"!=a&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l=b.createElement(a),o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};1===y[c]&&(r=1,y[c]=[]),"object"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),"img"!=a&&(r||2===y[c]?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i("c"==b?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),1==p.length&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var A,B,l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&"[object Opera]"==o.call(a.opera),l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return"[object Array]"==o.call(a)},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}};B=function(a){function b(a){var e,f,g,a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a};for(f=0;d>f;f++)g=a[f].split("="),(e=z[g.shift()])&&(c=e(c,g));for(f=0;b>f;f++)c=x[f](c);return c}function g(a,e,f,g,h){var i=b(a),j=i.autoCallback;i.url.split(".").pop().split("?").shift(),i.bypass||(e&&(e=d(e)?e:e[a]||e[g]||e[a.split("/").pop().split("?")[0]]),i.instead?i.instead(a,e,f,g,h):(y[i.url]?i.noexec=!0:y[i.url]=1,f.load(i.url,i.forceCSS||!i.forceJS&&"css"==i.url.split(".").pop().split("?").shift()?"c":c,i.noexec,i.attrs,i.timeout),(d(e)||d(j))&&f.load(function(){k(),e&&e(i.origUrl,h,g),j&&j(i.origUrl,h,g),y[i.url]=2})))}function h(a,b){function c(a,c){if(a){if(e(a))c||(j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}),g(a,j,b,0,h);else if(Object(a)===a)for(n in m=function(){var c,b=0;for(c in a)a.hasOwnProperty(c)&&b++;return b}(),a)a.hasOwnProperty(n)&&(!c&&!--m&&(d(j)?j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}:j[n]=function(a){return function(){var b=[].slice.call(arguments);a&&a.apply(this,b),l()}}(k[n])),g(a[n],j,b,n,h))}else!c&&l()}var m,n,h=!!a.test,i=a.load||a.both,j=a.callback||f,k=j,l=a.complete||f;c(h?a.yep:a.nope,!!i),i&&c(i)}var i,j,l=this.yepnope.loader;if(e(a))g(a,0,l,0);else if(w(a))for(i=0;iJavaEE Sample::Batch::Batch Listeners

        Batch Listeners

        Run
        How to run the sample
        The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
        git clone git://github.com/javaee-samples/javaee7-samples.git
        cd javaee7-samples/batch/batch-listeners/
        Now we are ready to start testing. You can run all the tests in this sample by executing:
        mvn test
        Or you can run individual tests by executing one of the following:
        mvn test -Dtest=BatchListenersTest

        Batch Listeners - Applying Listeners to Job, Chunk, Step, Reader, Processor and Writer

        BatchListenersTest

        +

        The Batch specification, provides several listeners to notify about specific event occurring during the batch +processing execution.

        +
        +
        +

        Events can be caught via extending the following classes, for the appropriate batch lifecycle event:

        +
        + +
        +

        The Job Listener:

        +
        +
        +
        +
        @Named()
        +public class MyJobListener extends AbstractJobListener {
        +
        +    public MyJobListener();
        +
        +    @Override()
        +    public void beforeJob();
        +
        +    @Override()
        +    public void afterJob();
        +}
        +
        +
        +
        +

        Allows you to execute code before and after the job execution. Useful to setup and clear resources needed by the job.

        +
        +
        +

        The Step Listener:

        +
        +
        +
        +
        @Named()
        +public class MyStepListener extends AbstractStepListener {
        +
        +    public MyStepListener();
        +
        +    @Override()
        +    public void beforeStep() throws Exception;
        +
        +    @Override()
        +    public void afterStep() throws Exception;
        +}
        +
        +
        +
        +

        Allows you to execute code before and after the step execution. Useful to setup and clear resources needed by the +step.

        +
        +
        +

        The Chunk Listener:

        +
        +
        +
        +
        @Named()
        +public class MyChunkListener extends AbstractChunkListener {
        +
        +    public MyChunkListener();
        +
        +    @Override()
        +    public void beforeChunk() throws Exception;
        +
        +    @Override()
        +    public void afterChunk() throws Exception;
        +}
        +
        +
        +
        +

        Allows you to execute code before and after the chunk processing. Useful to setup and clear resources needed by the +chunk.

        +
        +
        +

        The Read Listener:

        +
        +
        +
        +
        @Named()
        +public class MyItemReadListener extends AbstractItemReadListener {
        +
        +    public MyItemReadListener();
        +
        +    @Override()
        +    public void beforeRead() throws Exception;
        +
        +    @Override()
        +    public void afterRead(Object item) throws Exception;
        +
        +    @Override()
        +    public void onReadError(Exception ex) throws Exception;
        +}
        +
        +
        +
        +

        Allows you to execute code before and after reading a element as well if an error occurs reading that element. Useful +to setup additional resources and add additional information to the object reading. You can also provide some logic +to treat a failed object read.

        +
        +
        +

        The Processor Listener:

        +
        +
        +
        +
        @Named()
        +public class MyItemProcessorListener extends AbstractItemProcessListener {
        +
        +    public MyItemProcessorListener();
        +
        +    @Override()
        +    public void beforeProcess(Object item) throws Exception;
        +
        +    @Override()
        +    public void afterProcess(Object item, Object result) throws Exception;
        +
        +    @Override()
        +    public void onProcessError(Object item, Exception ex) throws Exception;
        +}
        +
        +
        +
        +

        Allows you to execute code before and after processing a element as well if an error occurs processing that element. +Useful to setup additional resources and add additional information to the object processing. You can also provide +some logic to treat a failed object processing.

        +
        +
        +

        The Writer Listener:

        +
        +
        +
        +
        @Named()
        +public class MyItemWriteListener extends AbstractItemWriteListener {
        +
        +    public MyItemWriteListener();
        +
        +    @Override()
        +    public void beforeWrite(List items) throws Exception;
        +
        +    @Override()
        +    public void afterWrite(List items) throws Exception;
        +
        +    @Override()
        +    public void onWriteError(List items, Exception ex) throws Exception;
        +}
        +
        +
        +
        +

        Allows you to execute code before and after writing a element as well if an error occurs writing that element. +Useful to setup additional resources and add additional information to the object writing. You can also provide +some logic to treat a failed object write.

        +
        +
        +

        The listeners element can be used at the step level or the job level to define which listeners to run for each +batch processing event.

        +
        +
        +
        +
        <?xml version="1.0" encoding="UTF-8"?>
        +<job id="myJob" xmlns="http://xmlns.jcp.org/xml/ns/javaee" version="1.0">
        +    <listeners>
        +        <listener ref="myJobListener"/>
        +    </listeners>
        +    <step id="myStep" >
        +        <listeners>
        +            <listener ref="myStepListener"/>
        +            <listener ref="myChunkListener"/>
        +            <listener ref="myItemReadListener"/>
        +            <listener ref="myItemProcessorListener"/>
        +            <listener ref="myItemWriteListener"/>
        +        </listeners>
        +        <chunk item-count="3">
        +            <reader ref="myItemReader"/>
        +            <processor ref="myItemProcessor"/>
        +            <writer ref="myItemWriter"/>
        +        </chunk>
        +    </step>
        +</job>
        +
        +
        +

        We’re just going to deploy the application as a web archive. Note the inclusion of the following files:

        +
        +
        +
        +
        /META-INF/batch-jobs/myJob.xml
        +
        +
        +
        +

        The myJob.xml file is needed for running the batch definition.

        +
        +
        +
        @Deployment
        +public static WebArchive createDeployment() {
        +    WebArchive war = ShrinkWrap.create(WebArchive.class)
        +            .addClass(BatchTestHelper.class)
        +            .addPackage("org.javaee7.batch.batch.listeners")
        +            .addAsWebInfResource(EmptyAsset.INSTANCE, ArchivePaths.create("beans.xml"))
        +            .addAsResource("META-INF/batch-jobs/myJob.xml");
        +    System.out.println(war.toString(true));
        +    return war;
        +}
        +
        +
        +

        In the test, we’re just going to invoke the batch execution and wait for completion. To validate the test +expected behaviour we need to query the Metric object available in the step execution and +also verify if the listeners were executed correctly via a CountDownLatch wait.

        +
        +
        +

        The batch process itself will read and process 10 elements from numbers 1 to 10, but only write the odd +elements.

        +
        +
        +
          +
        • +

          Each listener will decrement the total value of the CountDownLatch, until all the predicted events are +executed. The number of predicted events is 60:

          +
          +
            +
          • +

            MyJobListener executes 2 times, 1 for MyJobListener#beforeJob and 1 more for MyJobListener#afterJob.

            +
          • +
          • +

            MyStepListener executes 2 times, 1 for MyStepListener#beforeStep and 1 more for MyStepListener#afterStep.

            +
          • +
          • +

            MyChunkListener executes 8 times, 4 for MyChunkListener#beforeChunk and 4 more +for MyChunkListener#afterChunk. Chunk size is set to 3 and the total elements is 10, so 10/3 = 3 and 1 more +for the last element, means 4 for each chunk listener event.

            +
          • +
          • +

            MyItemReader executes 22 times, 10 elements in total plus an empty read, so MyItemReadListener#beforeRead +executes 11 times and MyItemReadListener#afterRead the other 11 times.

            +
          • +
          • +

            MyItemProcessorListener executes 20 times, 10 elements read in total, +so MyItemProcessorLister#beforeProcess executes 10 times +and MyItemProcessorLister#afterProcess the other 10 times.

            +
          • +
          • +

            MyItemWriterListener executed 6 times, 3 times for MyItemWriterListener#beforeWrite and another 3 times +for MyItemWriterListener#afterWrite. This one is a bit more tricky, since not every element needs to be +written. Looking at MyItemProcessor, only even records are going to be written. We also need to take into +account the elements read per chunk, so: Chunk[1] read and process [1,2,3] and wrote [2,6], Chunk[2] read and +process [4,5,6] and wrote [10], Chunk[3] read and process [7,8,9] and wrote [14,18], Chunk[4] read and process +[10] and did not wrote anything, so only 3 writes for the full processing.

            +
          • +
          • +

            Total: 2 + 2 + 8 + 22 + 20 + 6 = 60

            +
          • +
          +
          +
        • +
        +
        +
        +
        @Test
        +public void testBatchListeners() throws Exception {
        +    JobOperator jobOperator = BatchRuntime.getJobOperator();
        +    Long executionId = jobOperator.start("myJob", new Properties());
        +    JobExecution jobExecution = jobOperator.getJobExecution(executionId);
        +
        +    jobExecution = BatchTestHelper.keepTestAlive(jobExecution);
        +
        +    List<StepExecution> stepExecutions = jobOperator.getStepExecutions(executionId);
        +    for (StepExecution stepExecution : stepExecutions) {
        +        if (stepExecution.getStepName().equals("myStep")) {
        +            Map<Metric.MetricType, Long> metricsMap = BatchTestHelper.getMetricsMap(stepExecution.getMetrics());
        +
        +            assertEquals(10L, metricsMap.get(Metric.MetricType.READ_COUNT).longValue());
        +            assertEquals(10L / 2L, metricsMap.get(Metric.MetricType.WRITE_COUNT).longValue());
        +            assertEquals(10L / 3 + (10L % 3 > 0 ? 1 : 0), metricsMap.get(Metric.MetricType.COMMIT_COUNT).longValue());
        +        }
        +    }
        +
        +    assertTrue(BatchListenerRecorder.batchListenersCountDownLatch.await(0, TimeUnit.SECONDS));
        +    assertEquals(jobExecution.getBatchStatus(), BatchStatus.COMPLETED);
        +}
        +
        +

        Share the Knowledge

        Find this sample useful? Share on

        There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

        Help Improve

        Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

        Recent Changelog

        • Dec 14, 2014: Switch from polling on jobexecution (for job completion) to polling with joboperator and executionid by Scott Kurz
        • Jul 05, 2014: Removed header license for batch xml files by Roberto Cortez
        • Jun 22, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
        • Jun 20, 2014: Added fqn to java ee api references to generate direct links to javadocs by radcortez
        • Jun 19, 2014: Documentation clarifications and typos by radcortez
        • May 27, 2014: Added documentation to batch-listeners project by Roberto Cortez
        • Dec 31, 2013: Code style issues by Roberto Cortez
        • Dec 31, 2013: Removed servlets and jsp's by Roberto Cortez
        • Dec 04, 2013: Changed asserts for countdownlatch by Roberto Cortez
        • Dec 04, 2013: Refactored batch tests to use countdownlatch instead of boolean static variables to monitor execution by Roberto Cortez
        How to help improve this sample
        The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
        git clone git://github.com/javaee-samples/javaee7-samples.git
        cd javaee7-samples/batch/batch-listeners/

        Do the changes as you see fit and send a pull request!

        Good Luck!

        + \ No newline at end of file diff --git a/sample/batch-batchlet-simple/index.html b/sample/batch-batchlet-simple/index.html new file mode 100644 index 0000000..6c63bc1 --- /dev/null +++ b/sample/batch-batchlet-simple/index.html @@ -0,0 +1,98 @@ +JavaEE Sample::Batch::Batchlet Simple

        Batchlet Simple

        Run
        How to run the sample
        The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
        git clone git://github.com/javaee-samples/javaee7-samples.git
        cd javaee7-samples/batch/batchlet-simple/
        Now we are ready to start testing. You can run all the tests in this sample by executing:
        mvn test
        Or you can run individual tests by executing one of the following:
        mvn test -Dtest=MyBatchletTest

        Batchlet Simple - Execute a task oriented step

        MyBatchletTest

        +

        Batchlet is the simplest processing style available in the Batch specification. It’s a task oriented step where the +task is invoked once, executes, and returns an exit status.

        +
        +
        +

        A Batchlet need to implement Batchlet interface or in alternative extend +AbstractBatchlet that already provides empty implementations for all methods.

        +
        +
        +
        +
        @Named()
        +public class MyBatchlet extends AbstractBatchlet {
        +
        +    public MyBatchlet();
        +
        +    @Override()
        +    public String process();
        +}
        +
        +
        +
        +

        We are mostly interested in overriding AbstractBatchlet#process to provide the behaviour that we +want to achieve with the Batchlet itself. Common cases include: copy files to process with a chunk oriented step, +startup and cleanup, or validations to your processing workflow.

        +
        +
        +

        To run your Batchlet, just add it to the job xml file (myJob.xml).

        +
        +
        +
        +
        <?xml version="1.0" encoding="UTF-8"?>
        +<job id="myJob" xmlns="http://xmlns.jcp.org/xml/ns/javaee" version="1.0">
        +    <step id="myStep" >
        +        <batchlet ref="myBatchlet"/>
        +    </step>
        +</job>
        +
        +
        +

        We’re just going to deploy the application as a web archive. Note the inclusion of the following files:

        +
        +
        +
        +
        /META-INF/batch-jobs/myJob.xml
        +
        +
        +
        +

        The myJob.xml file is needed for running the batch definition.

        +
        +
        +
        @Deployment
        +public static WebArchive createDeployment() {
        +    WebArchive war = ShrinkWrap.create(WebArchive.class)
        +            .addClass(BatchTestHelper.class)
        +            .addClass(MyBatchlet.class)
        +            .addAsWebInfResource(EmptyAsset.INSTANCE, ArchivePaths.create("beans.xml"))
        +            .addAsResource("META-INF/batch-jobs/myJob.xml");
        +    System.out.println(war.toString(true));
        +    return war;
        +}
        +
        +
        +

        In the test, we’re just going to invoke the batch execution and wait for completion. To validate the test +expected behaviour we just need to check the Batch Status in the JobExecution object. We +should get a COMPLETED.

        +
        +
        +
        @Test
        +public void testBatchletProcess() throws Exception {
        +    JobOperator jobOperator = BatchRuntime.getJobOperator();
        +    Long executionId = jobOperator.start("myJob", new Properties());
        +    JobExecution jobExecution = jobOperator.getJobExecution(executionId);
        +
        +    jobExecution = BatchTestHelper.keepTestAlive(jobExecution);
        +
        +    (1)
        +    assertEquals(jobExecution.getBatchStatus(), BatchStatus.COMPLETED);
        +}
        +
        +
        +
        +
          +
        1. +

          Job should be completed.

          +
        2. +
        +

        Share the Knowledge

        Find this sample useful? Share on

        There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

        Help Improve

        Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

        Recent Changelog

        • Dec 14, 2014: Switch from polling on jobexecution (for job completion) to polling with joboperator and executionid by Scott Kurz
        • Jul 05, 2014: Removed header license for batch xml files by Roberto Cortez
        • Jun 22, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
        • Jun 20, 2014: Added fqn to java ee api references to generate direct links to javadocs by radcortez
        • Jun 19, 2014: Documentation clarifications and typos by radcortez
        • Jun 05, 2014: Add include of myjbos.xml file in doc by Aslak Knutsen
        • May 29, 2014: Added documentation to batchlet-simple project by Roberto Cortez
        • Dec 31, 2013: Code style issues by Roberto Cortez
        • Dec 31, 2013: Removed servlets and jsp's by Roberto Cortez
        • Nov 21, 2013: Removing some redundant elements by Arun Gupta
        How to help improve this sample
        The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
        git clone git://github.com/javaee-samples/javaee7-samples.git
        cd javaee7-samples/batch/batchlet-simple/

        Do the changes as you see fit and send a pull request!

        Good Luck!

        + \ No newline at end of file diff --git a/sample/batch-chunk-checkpoint/index.html b/sample/batch-chunk-checkpoint/index.html new file mode 100644 index 0000000..3e8d371 --- /dev/null +++ b/sample/batch-chunk-checkpoint/index.html @@ -0,0 +1,141 @@ +JavaEE Sample::Batch::Batch Chunk Checkpoint

        Batch Chunk Checkpoint

        Run
        How to run the sample
        The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
        git clone git://github.com/javaee-samples/javaee7-samples.git
        cd javaee7-samples/batch/chunk-checkpoint/
        Now we are ready to start testing. You can run all the tests in this sample by executing:
        mvn test
        Or you can run individual tests by executing one of the following:
        mvn test -Dtest=BatchChunkCheckpointTest

        Chunk Checkpoint - Custom Checkpoint Policy

        BatchChunkCheckpointTest

        +

        The Batch specification provides a Chunk Oriented processing style. This style is defined by enclosing into a +transaction a set of reads, process and write operations via ItemReader, +ItemProcessor and ItemWriter. Items are read one at a time, processed +and aggregated. The transaction is then committed when the defined checkpoint-policy is triggered.

        +
        +
        +

        The checkpoint-policy can be defined as item or custom. The item policy means the chunk is checkpointed after +a specified number of items are processed. The custom policy means the chunk is checkpointed according to a +checkpoint algorithm implementation. To use the custom policy you also need to define a checkpoint-algorithm +element.

        +
        +
        +
        +
        <?xml version="1.0" encoding="UTF-8"?>
        +<job id="myJob" xmlns="http://xmlns.jcp.org/xml/ns/javaee" version="1.0">
        +    <step id="myStep" >
        +        <chunk checkpoint-policy="custom">
        +            <reader ref="myItemReader"/>
        +            <processor ref="myItemProcessor"/>
        +            <writer ref="myItemWriter"/>
        +            <checkpoint-algorithm ref="myCheckpointAlgorithm"/>
        +        </chunk>
        +    </step>
        +</job>
        +
        +
        +
        +

        A very simple job is defined in the myJob.xml file. Just a single step with a reader, a processor and a writer. For +this sample, a custom checkpoint policy is going to be used. The custom policy needs to implement +CheckpointAlgorithm or in alternative extend +AbstractCheckpointAlgorithm that already provides empty implementations for all methods.

        +
        +
        +
        +
        @Named()
        +public class MyCheckpointAlgorithm extends AbstractCheckpointAlgorithm {
        +
        +    public MyCheckpointAlgorithm();
        +    public static CountDownLatch checkpointCountDownLatch;
        +
        +    @Override()
        +    public boolean isReadyToCheckpoint() throws Exception;
        +}
        +
        +
        +
        +

        Note that the behaviour of this custom checkpoint algorithm could also be achieved by using the item policy and +defining the item-count element at the chunk level.

        +
        +

        We’re just going to deploy the application as a web archive. Note the inclusion of the following files:

        +
        +
        +
        +
        /META-INF/batch-jobs/myJob.xml
        +
        +
        +
        +

        The myJob.xml file is needed for running the batch definition.

        +
        +
        +
        @Deployment
        +public static WebArchive createDeployment() {
        +    WebArchive war = ShrinkWrap.create(WebArchive.class)
        +            .addClass(BatchTestHelper.class)
        +            .addPackage("org.javaee7.batch.chunk.checkpoint")
        +            .addAsWebInfResource(EmptyAsset.INSTANCE, ArchivePaths.create("beans.xml"))
        +            .addAsResource("META-INF/batch-jobs/myJob.xml");
        +    System.out.println(war.toString(true));
        +    return war;
        +}
        +
        +
        +

        In the test, we’re just going to invoke the batch execution and wait for completion. To validate the test +expected behaviour we need to query the Metric object available in the step execution.

        +
        +
        +

        The batch process itself will read and process 10 elements from numbers 1 to 10, but only write the odd +elements. Commits are executed after 5 elements are read by the custom checkpoint algorithm.

        +
        +
        +
        @Test
        +public void testBatchChunkCheckpoint() throws Exception {
        +    JobOperator jobOperator = BatchRuntime.getJobOperator();
        +    Long executionId = jobOperator.start("myJob", new Properties());
        +    JobExecution jobExecution = jobOperator.getJobExecution(executionId);
        +
        +    jobExecution = BatchTestHelper.keepTestAlive(jobExecution);
        +
        +    List<StepExecution> stepExecutions = jobOperator.getStepExecutions(executionId);
        +    for (StepExecution stepExecution : stepExecutions) {
        +        if (stepExecution.getStepName().equals("myStep")) {
        +            Map<Metric.MetricType, Long> metricsMap = BatchTestHelper.getMetricsMap(stepExecution.getMetrics());
        +
        +            (1)
        +            assertEquals(10L, metricsMap.get(Metric.MetricType.READ_COUNT).longValue());
        +            (2)
        +            assertEquals(10L / 2L, metricsMap.get(Metric.MetricType.WRITE_COUNT).longValue());
        +            (3)
        +            assertEquals(10L / 5L + 1, metricsMap.get(Metric.MetricType.COMMIT_COUNT).longValue());
        +        }
        +    }
        +
        +    (4)
        +    assertTrue(MyCheckpointAlgorithm.checkpointCountDownLatch.await(0, TimeUnit.SECONDS));
        +    (5)
        +    assertEquals(jobExecution.getBatchStatus(), BatchStatus.COMPLETED);
        +}
        +
        +
        +
        +
          +
        1. +

          The read count should be 10 elements. Check MyItemReader.

          +
        2. +
        3. +

          The write count should be 5. Only half of the elements read are processed to be written.

          +
        4. +
        5. +

          The commit count should be 3. Checkpoint is on every 5th read, plus one final read-commit.

          +
        6. +
        7. +

          The checkpoint algorithm should be checked 10 times. One for each element read.

          +
        8. +
        9. +

          Job should be completed.

          +
        10. +
        +

        Share the Knowledge

        Find this sample useful? Share on

        There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

        Help Improve

        Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

        Recent Changelog

        • Dec 14, 2014: Switch from polling on jobexecution (for job completion) to polling with joboperator and executionid by Scott Kurz
        • Jul 05, 2014: Removed header license for batch xml files by Roberto Cortez
        • Jun 22, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
        • Jun 20, 2014: Added fqn to java ee api references to generate direct links to javadocs by radcortez
        • Jun 19, 2014: Documentation clarifications and typos by radcortez
        • Jun 18, 2014: Fixed documentation of chunk-checkpoint project by radcortez
        • Jun 18, 2014: Added documentation to chunk-checkpoint project by radcortez
        • Dec 31, 2013: Code style issues by Roberto Cortez
        • Dec 31, 2013: Removed servlets and jsp's by Roberto Cortez
        • Dec 04, 2013: Changed asserts for countdownlatch by Roberto Cortez
        How to help improve this sample
        The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
        git clone git://github.com/javaee-samples/javaee7-samples.git
        cd javaee7-samples/batch/chunk-checkpoint/

        Do the changes as you see fit and send a pull request!

        Good Luck!

        + \ No newline at end of file diff --git a/sample/batch-chunk-csv-database/index.html b/sample/batch-chunk-csv-database/index.html new file mode 100644 index 0000000..483e18a --- /dev/null +++ b/sample/batch-chunk-csv-database/index.html @@ -0,0 +1,208 @@ +JavaEE Sample::Batch::Batch Chunk CSV Database

        Batch Chunk CSV Database

        Run
        How to run the sample
        The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
        git clone git://github.com/javaee-samples/javaee7-samples.git
        cd javaee7-samples/batch/chunk-csv-database/
        Now we are ready to start testing. You can run all the tests in this sample by executing:
        mvn test
        Or you can run individual tests by executing one of the following:
        mvn test -Dtest=BatchCSVDatabaseTest

        Chunk Processing - Read, Process, Write to a Database

        BatchCSVDatabaseTest

        +

        The Batch specification provides a Chunk Oriented processing style. This style is defined by enclosing into a +transaction a set of reads, process and write operations via ItemReader, +ItemProcessor and ItemWriter. Items are read one at a time, processed +and aggregated. The transaction is then committed when the defined checkpoint-policy is triggered.

        +
        +
        +
        +
        <?xml version="1.0" encoding="UTF-8"?>
        +<job id="myJob" xmlns="http://xmlns.jcp.org/xml/ns/javaee" version="1.0">
        +    <step id="myStep" >
        +        <chunk item-count="3">
        +            <reader ref="myItemReader"/>
        +            <processor ref="myItemProcessor"/>
        +            <writer ref="myItemWriter"/>
        +        </chunk>
        +    </step>
        +</job>
        +
        +
        +
        +

        A very simple job is defined in the myJob.xml file. Just a single step with a reader, a processor and a writer.

        +
        +
        +

        This job will read a file from the system in CSV format:

        +
        +
        +
        +
        @Override
        +public void open(Serializable checkpoint) throws Exception {
        +    reader = new BufferedReader(
        +            new InputStreamReader(
        +                    Thread.currentThread().getContextClassLoader().getResourceAsStream("/META-INF/mydata.csv")));
        +}
        +
        +
        +
        +
        +
        @Override
        +public String readItem() {
        +    try {
        +        return reader.readLine();
        +    } catch (IOException ex) {
        +        Logger.getLogger(MyItemReader.class.getName()).log(Level.SEVERE, null, ex);
        +    }
        +    return null;
        +}
        +
        +
        +
        +

        Process the data by transforming it into a Person object:

        +
        +
        +
        +
        @Override
        +public Person processItem(Object t) {
        +    System.out.println("processItem: " + t);
        +
        +    StringTokenizer tokens = new StringTokenizer((String)t, ",");
        +
        +    String name = tokens.nextToken();
        +    String date;
        +
        +    try {
        +        date = tokens.nextToken();
        +        format.setLenient(false);
        +        format.parse(date);
        +    } catch (ParseException e) {
        +        return null;
        +    }
        +
        +    return new Person(id++, name, date);
        +}
        +
        +
        +
        +

        And finally write the data using JPA to a database:

        +
        +
        +
        +
        @Override
        +public void writeItems(List list) {
        +    System.out.println("writeItems: " + list);
        +    for (Object person : list) {
        +        em.persist(person);
        +    }
        +}
        +
        +
        +

        We’re just going to deploy the application as a web archive. Note the inclusion of the following files:

        +
        +
        +
        +
        /META-INF/batch-jobs/myJob.xml
        +/META-INF/persistence.xml
        +/META-INF/create.sql
        +/META-INF/drop.sql
        +/META-INF/mydata.csv
        +
        +
        +
        +
          +
        • +

          The myJob.xml file is needed for running the batch definition.

          +
        • +
        • +

          The persistence.xml file is needed for JPA configuration, create schema, load-data and drop schema.

          +
        • +
        • +

          The create.sql file has the necessary database schema for the data.

          +
        • +
        • +

          The drop.sql file has the required commands to drop the database schema created.

          +
        • +
        • +

          The mydata.csv file has the data to load into the database.

          +
        • +
        +
        +
        +
        @Deployment
        +public static WebArchive createDeployment() {
        +    WebArchive war = ShrinkWrap.create(WebArchive.class)
        +            .addClass(BatchTestHelper.class)
        +            .addPackage("org.javaee7.batch.chunk.csv.database")
        +            .addAsWebInfResource(EmptyAsset.INSTANCE, ArchivePaths.create("beans.xml"))
        +            .addAsResource("META-INF/batch-jobs/myJob.xml")
        +            .addAsResource("META-INF/persistence.xml")
        +            .addAsResource("META-INF/create.sql")
        +            .addAsResource("META-INF/drop.sql")
        +            .addAsResource("META-INF/mydata.csv");
        +    System.out.println(war.toString(true));
        +    return war;
        +}
        +
        +
        +

        In the test, we’re just going to invoke the batch execution and wait for completion. To validate the test +expected behaviour we need to query the Metric object available in the step execution.

        +
        +
        +

        The batch process itself will read and write 7 elements of type Person. Commits are executed after 3 elements +are read.

        +
        +
        +
        @SuppressWarnings("unchecked")
        +@Test
        +public void testBatchCSVDatabase() throws Exception {
        +    JobOperator jobOperator = BatchRuntime.getJobOperator();
        +    Long executionId = jobOperator.start("myJob", new Properties());
        +    JobExecution jobExecution = jobOperator.getJobExecution(executionId);
        +
        +    jobExecution = BatchTestHelper.keepTestAlive(jobExecution);
        +
        +    List<StepExecution> stepExecutions = jobOperator.getStepExecutions(executionId);
        +    for (StepExecution stepExecution : stepExecutions) {
        +        if (stepExecution.getStepName().equals("myStep")) {
        +            Map<Metric.MetricType, Long> metricsMap = BatchTestHelper.getMetricsMap(stepExecution.getMetrics());
        +
        +            (1)
        +            assertEquals(7L, metricsMap.get(Metric.MetricType.READ_COUNT).longValue());
        +            (2)
        +            assertEquals(7L, metricsMap.get(Metric.MetricType.WRITE_COUNT).longValue());
        +            (3)
        +            assertEquals(3L, metricsMap.get(Metric.MetricType.COMMIT_COUNT).longValue());
        +        }
        +    }
        +
        +    Query query = entityManager.createNamedQuery("Person.findAll");
        +    List<Person> persons = query.getResultList();
        +
        +    (4)
        +    assertEquals(7L, persons.size());
        +    (5)
        +    assertEquals(jobExecution.getBatchStatus(), BatchStatus.COMPLETED);
        +}
        +
        +
        +
        +
          +
        1. +

          The read count should be 7 elements. Check MyItemReader.

          +
        2. +
        3. +

          The write count should be the same 7 read elements.

          +
        4. +
        5. +

          The commit count should be 4. Checkpoint is on every 3rd read, 4 commits for read elements.

          +
        6. +
        7. +

          Confirm that the elements were actually persisted into the database.

          +
        8. +
        9. +

          Job should be completed.

          +
        10. +
        +

        Share the Knowledge

        Find this sample useful? Share on

        There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

        Help Improve

        Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

        Recent Changelog

        • Dec 14, 2014: Switch from polling on jobexecution (for job completion) to polling with joboperator and executionid by Scott Kurz
        • Oct 29, 2014: Fixed #269. npe loading the csv file from the glassfish embedded regular classloader. changed to use the thread context classloader by Roberto Cortez
        • Jul 05, 2014: Removed header license for batch xml files by Roberto Cortez
        • Jun 22, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
        • Jun 20, 2014: Added fqn to java ee api references to generate direct links to javadocs by radcortez
        • Jun 19, 2014: Documentation clarifications and typos by radcortez
        • Jun 18, 2014: Added documentation to chunk-csv-database project by radcortez
        • Dec 31, 2013: Code style issues by Roberto Cortez
        • Dec 31, 2013: Removed servlets and jsp's by Roberto Cortez
        • Dec 24, 2013: Changed person entity id generation to be manually assigned by Roberto Cortez
        How to help improve this sample
        The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
        git clone git://github.com/javaee-samples/javaee7-samples.git
        cd javaee7-samples/batch/chunk-csv-database/

        Do the changes as you see fit and send a pull request!

        Good Luck!

        + \ No newline at end of file diff --git a/sample/batch-chunk-exception/index.html b/sample/batch-chunk-exception/index.html new file mode 100644 index 0000000..7a6f578 --- /dev/null +++ b/sample/batch-chunk-exception/index.html @@ -0,0 +1,232 @@ +JavaEE Sample::Batch::Batch Chunk Exception

        Batch Chunk Exception

        Run
        How to run the sample
        The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
        git clone git://github.com/javaee-samples/javaee7-samples.git
        cd javaee7-samples/batch/chunk-exception/
        Now we are ready to start testing. You can run all the tests in this sample by executing:
        mvn test
        Or you can run individual tests by executing one of the following:
        mvn test -Dtest=BatchChunkExceptionTest

        Chunk Exception Handling - Retrying and Skipping

        BatchChunkExceptionTest

        +

        Exceptions are a natural part of Batch Processing, and the batch itself should be prepared to deal with +exceptions during processing.

        +
        +
        +

        Batch Processing deals with two kinds of exceptions: skippable and retryable. Skippable Exceptions are used to skip +elements during reading, processing and writing and continue to the next element. Retryable Exceptions on the other +hand when thrown will try to retry the chunk on which the exception occurred.

        +
        +
        +

        When the same exception is specified as both retryable and skippable, retryable takes precedence over skippable +during regular processing of the chunk. While the chunk is retrying, skippable takes precedence over retryable since +the exception is already being retried.

        +
        +
        +

        The Reader:

        +
        +
        +
        +
        @Named()
        +public class MyItemReader extends AbstractItemReader {
        +
        +    public MyItemReader();
        +    private StringTokenizer tokens;
        +    private MyInputRecord lastElement;
        +    private boolean alreadyFailed;
        +
        +    @Override()
        +    public void open(Serializable checkpoint);
        +
        +    @Override()
        +    public Object readItem();
        +
        +    @Override()
        +    public Serializable checkpointInfo() throws Exception;
        +}
        +
        +
        +
        +

        Just reads elements from a list and simulate a retry exception.

        +
        +
        +

        The Processor:

        +
        +
        +
        +
        @Named()
        +public class MyItemProcessor implements ItemProcessor {
        +
        +    public MyItemProcessor();
        +
        +    @Override()
        +    public Object processItem(Object t);
        +}
        +
        +
        +
        +

        Process and simulate a skip exception.

        +
        +
        +

        The Writer:

        +
        +
        +
        +
        @Named()
        +public class MyItemWriter extends AbstractItemWriter {
        +
        +    public MyItemWriter();
        +    private static int retries;
        +
        +    @Override()
        +    public void writeItems(List list);
        +}
        +
        +
        +
        +

        The writer will retry an exception and then skip it.

        +
        +
        +

        The batch specification also allows you to provide listeners for skipping and retrying for every operation. Have a +look into the following classes:

        +
        +
        +
          +
        • +

          MySkipReadListener

          +
        • +
        • +

          MySkipProcessorListener

          +
        • +
        • +

          MySkipWriteListener

          +
        • +
        • +

          MyRetryReadListener

          +
        • +
        • +

          MyRetryProcessorListener

          +
        • +
        • +

          MyRetryWriteListener

          +
        • +
        +
        +
        +

        Events can be caught via extending the following classes, for the appropriate batch lifecycle event:

        +
        + +
        +
        +
        <?xml version="1.0" encoding="UTF-8"?>
        +<job id="myJob" xmlns="http://xmlns.jcp.org/xml/ns/javaee" version="1.0">
        +    <step id="myStep" >
        +        <listeners>
        +            <listener ref="mySkipReadListener"/>
        +            <listener ref="mySkipProcessorListener"/>
        +            <listener ref="mySkipWriteListener"/>
        +            <listener ref="myRetryReadListener"/>
        +            <listener ref="myRetryProcessorListener"/>
        +            <listener ref="myRetryWriteListener"/>
        +        </listeners>
        +
        +        <chunk checkpoint-policy="item" item-count="3" skip-limit="3" retry-limit="3">
        +            <reader ref="myItemReader"/>
        +            <processor ref="myItemProcessor"/>
        +            <writer ref="myItemWriter"/>
        +            <skippable-exception-classes>
        +                <include class="java.lang.RuntimeException"/>
        +                <include class="java.lang.UnsupportedOperationException"/>
        +            </skippable-exception-classes>
        +            <retryable-exception-classes>
        +                <include class="java.lang.IllegalArgumentException"/>
        +                <include class="java.lang.UnsupportedOperationException"/>
        +            </retryable-exception-classes>
        +        </chunk>
        +    </step>
        +</job>
        +
        +
        +
        +

        A very simple job is defined in the myJob.xml file. Just a single step with a reader, a processor and a writer. For +this sample we are going to process a few records and mix some exceptions during read, processing and write of the +chunk. Batch exception handling is achieved by defining the elements skippable-exception-classes and +retryable-exception-classes into the chunk. Both elements should indicate the full qualified name of the +exceptions that we are trying to catch. The listeners element can be used at the step level to define which +listeners to run for each batch processing event.

        +
        +

        We’re just going to deploy the application as a web archive. Note the inclusion of the following files:

        +
        +
        +
        +
        /META-INF/batch-jobs/myJob.xml
        +
        +
        +
        +

        The myJob.xml file is needed for running the batch definition.

        +
        +
        +
        @Deployment
        +public static WebArchive createDeployment() {
        +    WebArchive war = ShrinkWrap.create(WebArchive.class)
        +            .addClass(BatchTestHelper.class)
        +            .addPackage("org.javaee7.batch.chunk.exception")
        +            .addAsWebInfResource(EmptyAsset.INSTANCE, ArchivePaths.create("beans.xml"))
        +            .addAsResource("META-INF/batch-jobs/myJob.xml");
        +    System.out.println(war.toString(true));
        +    return war;
        +}
        +
        +
        +

        In the test, we’re just going to invoke the batch execution and wait for completion. To validate the test +expected behaviour we need to query the Metric object available in the step execution.

        +
        +
        +
        @Test
        +public void testBatchChunkException() throws Exception {
        +    JobOperator jobOperator = BatchRuntime.getJobOperator();
        +    Long executionId = jobOperator.start("myJob", new Properties());
        +    JobExecution jobExecution = jobOperator.getJobExecution(executionId);
        +
        +    jobExecution = BatchTestHelper.keepTestAlive(jobExecution);
        +
        +    List<StepExecution> stepExecutions = jobOperator.getStepExecutions(executionId);
        +    for (StepExecution stepExecution : stepExecutions) {
        +        if (stepExecution.getStepName().equals("myStep")) {
        +            Map<Metric.MetricType, Long> metricsMap = BatchTestHelper.getMetricsMap(stepExecution.getMetrics());
        +
        +            assertEquals(1L, metricsMap.get(Metric.MetricType.PROCESS_SKIP_COUNT).longValue());
        +            // There are a few differences between Glassfish and Wildfly. Needs investigation.
        +            //assertEquals(1L, metricsMap.get(Metric.MetricType.WRITE_SKIP_COUNT).longValue());
        +            assertEquals(1L, ChunkExceptionRecorder.retryReadExecutions);
        +        }
        +    }
        +
        +    assertTrue(ChunkExceptionRecorder.chunkExceptionsCountDownLatch.await(0, TimeUnit.SECONDS));
        +    assertEquals(BatchStatus.COMPLETED, jobExecution.getBatchStatus());
        +}
        +
        +

        Share the Knowledge

        Find this sample useful? Share on

        There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

        Help Improve

        Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

        Recent Changelog

        • Dec 14, 2014: Switch from polling on jobexecution (for job completion) to polling with joboperator and executionid by Scott Kurz
        • Jul 05, 2014: Removed header license for batch xml files by Roberto Cortez
        • Jun 22, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
        • Jun 20, 2014: Added fqn to java ee api references to generate direct links to javadocs by radcortez
        • Jun 19, 2014: Documentation clarifications and typos by radcortez
        • May 27, 2014: Fixed a few javadocs typos by Roberto Cortez
        • May 08, 2014: Fixed chunk exception wildfly test by Roberto Cortez
        • Apr 04, 2014: Fixed chunk exception test by Roberto Cortez
        • Dec 31, 2013: Code style issues by Roberto Cortez
        • Dec 31, 2013: Removed servlets and jsp's by Roberto Cortez
        How to help improve this sample
        The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
        git clone git://github.com/javaee-samples/javaee7-samples.git
        cd javaee7-samples/batch/chunk-exception/

        Do the changes as you see fit and send a pull request!

        Good Luck!

        + \ No newline at end of file diff --git a/sample/batch-chunk-mapper/index.html b/sample/batch-chunk-mapper/index.html new file mode 100644 index 0000000..cfbfaed --- /dev/null +++ b/sample/batch-chunk-mapper/index.html @@ -0,0 +1,188 @@ +JavaEE Sample::Batch::Batch Chunk Partition Mapper

        Batch Chunk Partition Mapper

        Run
        How to run the sample
        The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
        git clone git://github.com/javaee-samples/javaee7-samples.git
        cd javaee7-samples/batch/chunk-mapper/
        Now we are ready to start testing. You can run all the tests in this sample by executing:
        mvn test
        Or you can run individual tests by executing one of the following:
        mvn test -Dtest=BatchChunkMapperTest

        Chunk Processing - Read, Process, Write in multiple Threads

        BatchChunkMapperTest

        +

        The Batch specification provides a Chunk Oriented processing style. This style is defined by enclosing into a +transaction a set of reads, process and write operations via ItemReader, +ItemProcessor and ItemWriter. Items are read one at a time, processed +and aggregated. The transaction is then committed when the defined checkpoint-policy is triggered.

        +
        +
        +

        Many batch processing problems can be solved with single threaded, single process jobs, but the Batch specification +allows for steps to be executed as a partitioned step, meaning that the step can be parallelized across multiple +threads. This is useful if you have some kind of bottleneck or if you can considerable boost your batch processing +performance by splitting the work to be done.

        +
        +
        +

        You can define the number of partitions and the number of threads using a custom mapper. The custom mapper needs to +implement PartitionMapper and create a new PartitionPlan to +define the partitions behaviour. Each partition is required to receive a set of unique parameters that instruct it +into which data it should operate.

        +
        +
        +

        Since each thread runs a separate copy of the step, chunking and checkpointing occur independently on each thread for +chunk type steps.

        +
        +
        +
        +
        <?xml version="1.0" encoding="UTF-8"?>
        +<job id="myJob" xmlns="http://xmlns.jcp.org/xml/ns/javaee" version="1.0">
        +    <step id="myStep" >
        +        <chunk item-count="3">
        +            <reader ref="myItemReader">
        +                <properties>
        +                    <property name="start" value="#{partitionPlan['start']}"  />
        +                    <property name="end" value="#{partitionPlan['end']}"  />
        +                </properties>
        +            </reader>
        +            <processor ref="myItemProcessor"/>
        +            <writer ref="myItemWriter"/>
        +        </chunk>
        +        <partition>
        +            <mapper ref="myMapper"/>
        +            <reducer ref="myReducer"/>
        +
        +        </partition>
        +    </step>
        +</job>
        +
        +
        +
        +

        A job is defined in the myJob.xml file. Just a single step with a reader, a processor and a writer. This step also +defines that the step should be executed into a partition with a custom mapper:

        +
        +
        +
        +
        @Named()
        +public class MyMapper implements PartitionMapper {
        +
        +    public MyMapper();
        +
        +    @Override()
        +    public PartitionPlan mapPartitions() throws Exception;
        +}
        +
        +
        +
        +

        The mapper defines 2 partitions and 2 threads. Properties for each partition define the data that is going to be +read. For the first partition we start on 1 and end on 10. For the second partition we start on 11 and end on 20. The +MyItemReader will generate the data based on these properties.

        +
        +
        +
        +
        @Named()
        +public class MyItemReader extends AbstractItemReader {
        +
        +    public MyItemReader();
        +    public static int totalReaders;
        +    private int readerId;
        +    private StringTokenizer tokens;
        +    @Inject()
        +    @BatchProperty(name = "start")
        +    private String startProp;
        +    @Inject()
        +    @BatchProperty(name = "end")
        +    private String endProp;
        +    @Inject()
        +    private JobContext context;
        +
        +    @Override()
        +    public void open(Serializable e);
        +
        +    @Override()
        +    public MyInputRecord readItem();
        +}
        +
        +
        +

        We’re just going to deploy the application as a web archive. Note the inclusion of the following files:

        +
        +
        +
        +
        /META-INF/batch-jobs/myJob.xml
        +
        +
        +
        +

        The myJob.xml file is needed for running the batch definition.

        +
        +
        +
        @Deployment
        +public static WebArchive createDeployment() {
        +    WebArchive war = ShrinkWrap.create(WebArchive.class)
        +            .addClass(BatchTestHelper.class)
        +            .addPackage("org.javaee7.batch.sample.chunk.mapper")
        +            .addAsWebInfResource(EmptyAsset.INSTANCE, ArchivePaths.create("beans.xml"))
        +            .addAsResource("META-INF/batch-jobs/myJob.xml");
        +    System.out.println(war.toString(true));
        +    return war;
        +}
        +
        +
        +

        In the test, we’re just going to invoke the batch execution and wait for completion. To validate the test +expected behaviour we need to query the Metric object available in the step execution.

        +
        +
        +

        The batch process itself will read and process 20 elements from numbers 1 to 20, but only write the odd +elements. Elements from 1 to 10 will be processed in one partition and elements from 11 to 20 in another +partition. Commits are executed after 3 elements are read by partition.

        +
        +
        +
        @Test
        +public void testBatchChunkMapper() throws Exception {
        +    JobOperator jobOperator = BatchRuntime.getJobOperator();
        +    Long executionId = jobOperator.start("myJob", new Properties());
        +    JobExecution jobExecution = jobOperator.getJobExecution(executionId);
        +
        +    jobExecution = BatchTestHelper.keepTestAlive(jobExecution);
        +
        +    List<StepExecution> stepExecutions = jobOperator.getStepExecutions(executionId);
        +    for (StepExecution stepExecution : stepExecutions) {
        +        if (stepExecution.getStepName().equals("myStep")) {
        +            Map<Metric.MetricType, Long> metricsMap = BatchTestHelper.getMetricsMap(stepExecution.getMetrics());
        +
        +            (1)
        +            assertEquals(20L, metricsMap.get(Metric.MetricType.READ_COUNT).longValue());
        +            (2)
        +            assertEquals(10L, metricsMap.get(Metric.MetricType.WRITE_COUNT).longValue());
        +            // Number of elements by the item count value on myJob.xml, plus an additional transaction for the
        +            // remaining elements by each partition.
        +            long commitCount = (10L / 3 + (10 % 3 > 0 ? 1 : 0)) * 2;
        +            (3)
        +            assertEquals(commitCount, metricsMap.get(Metric.MetricType.COMMIT_COUNT).longValue());
        +        }
        +    }
        +
        +    (4)
        +    assertEquals(2L, MyItemReader.totalReaders);
        +    (5)
        +    assertEquals(BatchStatus.COMPLETED, jobExecution.getBatchStatus());
        +}
        +
        +
        +
        +
          +
        1. +

          The read count should be 20 elements. Check MyItemReader.

          +
        2. +
        3. +

          The write count should be 10. Only half of the elements read are processed to be written.

          +
        4. +
        5. +

          The commit count should be 8. Checkpoint is on every 3rd read, 4 commits for read elements and 2 partitions.

          +
        6. +
        7. +

          Make sure that all the partitions were created.

          +
        8. +
        9. +

          Job should be completed.

          +
        10. +
        +

        Share the Knowledge

        Find this sample useful? Share on

        There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

        Help Improve

        Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

        Recent Changelog

        • Dec 14, 2014: Switch from polling on jobexecution (for job completion) to polling with joboperator and executionid by Scott Kurz
        • Jul 05, 2014: Removed header license for batch xml files by Roberto Cortez
        • Jun 22, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
        • Jun 20, 2014: Added fqn to java ee api references to generate direct links to javadocs by radcortez
        • Jun 19, 2014: Documentation clarifications and typos by radcortez
        • Jun 18, 2014: Added documentation to chunk-mapper project by radcortez
        • Dec 31, 2013: Code style issues by Roberto Cortez
        • Dec 31, 2013: Removed servlets and jsp's by Roberto Cortez
        • Dec 28, 2013: Added test for chunk-mapper project by Roberto Cortez
        • Oct 18, 2013: Returning correct records, fixing https://github.com/arun-gupta/javaee7-samples/issues/47 by Arun Gupta
        How to help improve this sample
        The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
        git clone git://github.com/javaee-samples/javaee7-samples.git
        cd javaee7-samples/batch/chunk-mapper/

        Do the changes as you see fit and send a pull request!

        Good Luck!

        + \ No newline at end of file diff --git a/sample/batch-chunk-optional-processor/index.html b/sample/batch-chunk-optional-processor/index.html new file mode 100644 index 0000000..bc554dc --- /dev/null +++ b/sample/batch-chunk-optional-processor/index.html @@ -0,0 +1,110 @@ +JavaEE Sample::Batch::Batch Chunk Optional Processor

        Batch Chunk Optional Processor

        Run
        How to run the sample
        The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
        git clone git://github.com/javaee-samples/javaee7-samples.git
        cd javaee7-samples/batch/chunk-optional-processor/
        Now we are ready to start testing. You can run all the tests in this sample by executing:
        mvn test
        Or you can run individual tests by executing one of the following:
        mvn test -Dtest=BatchChunkOptionalProcessorTest

        Chunk Processing - Read and Write

        BatchChunkOptionalProcessorTest

        +

        The Batch specification provides a Chunk Oriented processing style. This style is defined by enclosing into a +transaction a set of reads, process and write operations via ItemReader, +ItemProcessor and ItemWriter. Items are read one at a time, processed +and aggregated. The transaction is then committed when the defined checkpoint-policy is triggered.

        +
        +
        +
        +
        <?xml version="1.0" encoding="UTF-8"?>
        +<job id="myJob" xmlns="http://xmlns.jcp.org/xml/ns/javaee" version="1.0">
        +    <step id="myStep" >
        +        <chunk item-count="3">
        +            <reader ref="myItemReader"/>
        +            <writer ref="myItemWriter"/>
        +        </chunk>
        +    </step>
        +</job>
        +
        +
        +
        +

        A very simple job is defined in the myJob.xml file. The processor is optional, so this is just a single step with a +reader and a writer.

        +
        +

        We’re just going to deploy the application as a web archive. Note the inclusion of the following files:

        +
        +
        +
        +
        /META-INF/batch-jobs/myJob.xml
        +
        +
        +
        +

        The myJob.xml file is needed for running the batch definition.

        +
        +
        +
        @Deployment
        +public static WebArchive createDeployment() {
        +    WebArchive war = ShrinkWrap.create(WebArchive.class)
        +            .addClass(BatchTestHelper.class)
        +            .addPackage("org.javaee7.batch.chunk.optional.processor")
        +            .addAsWebInfResource(EmptyAsset.INSTANCE, ArchivePaths.create("beans.xml"))
        +            .addAsResource("META-INF/batch-jobs/myJob.xml");
        +    System.out.println(war.toString(true));
        +    return war;
        +}
        +
        +
        +

        In the test, we’re just going to invoke the batch execution and wait for completion. To validate the test +expected behaviour we need to query the Metric object available in the step execution.

        +
        +
        +

        The batch process itself will read 10 elements from numbers 1 to 10, and write the same elements. Commits are +executed after 3 elements are read.

        +
        +
        +
        @Test
        +public void testBatchChunkOptionalProcessor() throws Exception {
        +    JobOperator jobOperator = BatchRuntime.getJobOperator();
        +    Long executionId = jobOperator.start("myJob", new Properties());
        +    JobExecution jobExecution = jobOperator.getJobExecution(executionId);
        +
        +    jobExecution = BatchTestHelper.keepTestAlive(jobExecution);
        +
        +    List<StepExecution> stepExecutions = jobOperator.getStepExecutions(executionId);
        +    for (StepExecution stepExecution : stepExecutions) {
        +        if (stepExecution.getStepName().equals("myStep")) {
        +            Map<Metric.MetricType, Long> metricsMap = BatchTestHelper.getMetricsMap(stepExecution.getMetrics());
        +
        +            (1)
        +            assertEquals(10L, metricsMap.get(Metric.MetricType.READ_COUNT).longValue());
        +            (2)
        +            assertEquals(10L, metricsMap.get(Metric.MetricType.WRITE_COUNT).longValue());
        +            (3)
        +            assertEquals(10L / 3 + (10L % 3 > 0 ? 1 : 0),
        +                         metricsMap.get(Metric.MetricType.COMMIT_COUNT).longValue());
        +        }
        +    }
        +
        +    (4)
        +    assertEquals(BatchStatus.COMPLETED, jobExecution.getBatchStatus());
        +}
        +
        +
        +
        +
          +
        1. +

          The read count should be 10 elements. Check MyItemReader.

          +
        2. +
        3. +

          The write count should be same 10 read elements.

          +
        4. +
        5. +

          The commit count should be 4. Checkpoint is on every 3rd read, 4 commits for read elements.

          +
        6. +
        7. +

          Job should be completed.

          +
        8. +
        +

        Share the Knowledge

        Find this sample useful? Share on

        There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

        Help Improve

        Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

        Recent Changelog

        • Dec 14, 2014: Switch from polling on jobexecution (for job completion) to polling with joboperator and executionid by Scott Kurz
        • Jul 05, 2014: Removed header license for batch xml files by Roberto Cortez
        • Jun 22, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
        • Jun 20, 2014: Added fqn to java ee api references to generate direct links to javadocs by radcortez
        • Jun 19, 2014: Documentation clarifications and typos by radcortez
        • Jun 18, 2014: Fixed documentation of chunk-optional-processor project by radcortez
        • Jun 18, 2014: Added documentation to chunk-optional-processor project by radcortez
        • Dec 31, 2013: Code style issues by Roberto Cortez
        • Dec 31, 2013: Removed servlets and jsp's by Roberto Cortez
        • Dec 30, 2013: Added test for chunk-optional-processor project by Roberto Cortez
        How to help improve this sample
        The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
        git clone git://github.com/javaee-samples/javaee7-samples.git
        cd javaee7-samples/batch/chunk-optional-processor/

        Do the changes as you see fit and send a pull request!

        Good Luck!

        + \ No newline at end of file diff --git a/sample/batch-chunk-partition/index.html b/sample/batch-chunk-partition/index.html new file mode 100644 index 0000000..39c74b9 --- /dev/null +++ b/sample/batch-chunk-partition/index.html @@ -0,0 +1,172 @@ +JavaEE Sample::Batch::Batch Chunk Partition

        Batch Chunk Partition

        Run
        How to run the sample
        The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
        git clone git://github.com/javaee-samples/javaee7-samples.git
        cd javaee7-samples/batch/chunk-partition/
        Now we are ready to start testing. You can run all the tests in this sample by executing:
        mvn test
        Or you can run individual tests by executing one of the following:
        mvn test -Dtest=BatchChunkPartitionTest

        Chunk Processing - Read, Process, Write in multiple Threads

        BatchChunkPartitionTest

        +

        The Batch specification provides a Chunk Oriented processing style. This style is defined by enclosing into a +transaction a set of reads, process and write operations via ItemReader, +ItemProcessor and ItemWriter. Items are read one at a time, processed +and aggregated. The transaction is then committed when the defined checkpoint-policy is triggered.

        +
        +
        +

        Many batch processing problems can be solved with single threaded, single process jobs, but the Batch specification +allows for steps to be executed as a partitioned step, meaning that the step can be parallelized across multiple +threads. This is useful if you have some kind of bottleneck or if you can considerable boost your batch processing +performance by splitting the work to be done.

        +
        +
        +

        You can define the number of partitions and the number of threads by using the element partition in the step +definition. Each partition is required to receive a set of unique parameters that instruct it into which data it +should operate.

        +
        +
        +

        Since each thread runs a separate copy of the step, chunking and checkpointing occur independently on each thread for +chunk type steps.

        +
        +
        +
        +
        <?xml version="1.0" encoding="UTF-8"?>
        +<job id="myJob" xmlns="http://xmlns.jcp.org/xml/ns/javaee" version="1.0">
        +    <step id="myStep" >
        +        <chunk item-count="3">
        +            <reader ref="myItemReader">
        +                <properties>
        +                    <property name="start" value="#{partitionPlan['start']}"  />
        +                    <property name="end" value="#{partitionPlan['end']}"  />
        +                </properties>
        +            </reader>
        +            <processor ref="myItemProcessor"/>
        +            <writer ref="myItemWriter"/>
        +        </chunk>
        +        <partition>
        +            <plan partitions="2">
        +                <properties partition="0">
        +                    <property name="start" value="1"/>
        +                    <property name="end" value="10"/>
        +                </properties>
        +                <properties partition="1">
        +                    <property name="start" value="11"/>
        +                    <property name="end" value="20"/>
        +                </properties>
        +            </plan>
        +        </partition>
        +    </step>
        +</job>
        +
        +
        +
        +

        A job is defined in the myJob.xml file. Just a single step with a reader, a processor and a writer. This step also +defines that the step should be executed in two separate partitions: "1" and "2". Properties for each partition +define the data that is going to be read. For partition "1" we start on 1 and end on 10. For partition "2" we start +on 11 and end on 20. The MyItemReader will generate the data based on these properties.

        +
        +
        +
        +
        @Named()
        +public class MyItemReader extends AbstractItemReader {
        +
        +    public MyItemReader();
        +    public static int totalReaders;
        +    private int readerId;
        +    private StringTokenizer tokens;
        +    @Inject()
        +    @BatchProperty(name = "start")
        +    private String startProp;
        +    @Inject()
        +    @BatchProperty(name = "end")
        +    private String endProp;
        +
        +    @Override()
        +    public void open(Serializable e);
        +
        +    @Override()
        +    public MyInputRecord readItem();
        +}
        +
        +
        +

        We’re just going to deploy the application as a web archive. Note the inclusion of the following files:

        +
        +
        +
        +
        /META-INF/batch-jobs/myJob.xml
        +
        +
        +
        +

        The myJob.xml file is needed for running the batch definition.

        +
        +
        +
        @Deployment
        +public static WebArchive createDeployment() {
        +    WebArchive war = ShrinkWrap.create(WebArchive.class)
        +            .addClass(BatchTestHelper.class)
        +            .addPackage("org.javaee7.batch.sample.chunk.partition")
        +            .addAsWebInfResource(EmptyAsset.INSTANCE, ArchivePaths.create("beans.xml"))
        +            .addAsResource("META-INF/batch-jobs/myJob.xml");
        +    System.out.println(war.toString(true));
        +    return war;
        +}
        +
        +
        +

        In the test, we’re just going to invoke the batch execution and wait for completion. To validate the test +expected behaviour we need to query the Metric object available in the step execution.

        +
        +
        +

        The batch process itself will read and process 20 elements from numbers 1 to 20, but only write the odd +elements. Elements from 1 to 10 will be processed in one partition and elements from 11 to 20 in another +partition. Commits are executed after 3 elements are read by partition.

        +
        +
        +
        @Test
        +public void testBatchChunkPartition() throws Exception {
        +    JobOperator jobOperator = BatchRuntime.getJobOperator();
        +    Long executionId = jobOperator.start("myJob", new Properties());
        +    JobExecution jobExecution = jobOperator.getJobExecution(executionId);
        +
        +    jobExecution = BatchTestHelper.keepTestAlive(jobExecution);
        +
        +    List<StepExecution> stepExecutions = jobOperator.getStepExecutions(executionId);
        +    for (StepExecution stepExecution : stepExecutions) {
        +        if (stepExecution.getStepName().equals("myStep")) {
        +            Map<Metric.MetricType, Long> metricsMap = BatchTestHelper.getMetricsMap(stepExecution.getMetrics());
        +
        +            (1)
        +            assertEquals(20L, metricsMap.get(Metric.MetricType.READ_COUNT).longValue());
        +            (2)
        +            assertEquals(10L, metricsMap.get(Metric.MetricType.WRITE_COUNT).longValue());
        +            // Number of elements by the item count value on myJob.xml, plus an additional transaction for the
        +            // remaining elements by each partition.
        +            long commitCount = (10L / 3 + (10 % 3 > 0 ? 1 : 0)) * 2;
        +            (3)
        +            assertEquals(commitCount, metricsMap.get(Metric.MetricType.COMMIT_COUNT).longValue());
        +        }
        +    }
        +
        +    (4)
        +    assertEquals(BatchStatus.COMPLETED, jobExecution.getBatchStatus());
        +}
        +
        +
        +
        +
          +
        1. +

          The read count should be 20 elements. Check MyItemReader.

          +
        2. +
        3. +

          The write count should be 10. Only half of the elements read are processed to be written.

          +
        4. +
        5. +

          The commit count should be 8. Checkpoint is on every 3rd read, 4 commits for read elements and 2 partitions.

          +
        6. +
        7. +

          Job should be completed.

          +
        8. +
        +

        Share the Knowledge

        Find this sample useful? Share on

        There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

        Help Improve

        Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

        Recent Changelog

        • Dec 14, 2014: Switch from polling on jobexecution (for job completion) to polling with joboperator and executionid by Scott Kurz
        • Jul 05, 2014: Removed header license for batch xml files by Roberto Cortez
        • Jun 22, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
        • Jun 20, 2014: Added fqn to java ee api references to generate direct links to javadocs by radcortez
        • Jun 19, 2014: Documentation clarifications and typos by radcortez
        • Jun 18, 2014: Added documentation to chunk-partition project by radcortez
        • Dec 31, 2013: Code style issues by Roberto Cortez
        • Dec 31, 2013: Removed servlets and jsp's by Roberto Cortez
        • Dec 30, 2013: Added test for chunk-partition project by Roberto Cortez
        • Oct 18, 2013: Returning correct records, fixing https://github.com/arun-gupta/javaee7-samples/issues/47 by Arun Gupta
        How to help improve this sample
        The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
        git clone git://github.com/javaee-samples/javaee7-samples.git
        cd javaee7-samples/batch/chunk-partition/

        Do the changes as you see fit and send a pull request!

        Good Luck!

        + \ No newline at end of file diff --git a/sample/batch-chunk-simple-nobeans/index.html b/sample/batch-chunk-simple-nobeans/index.html new file mode 100644 index 0000000..ab4becd --- /dev/null +++ b/sample/batch-chunk-simple-nobeans/index.html @@ -0,0 +1,111 @@ +JavaEE Sample::Batch::Batch Chunk Simple No Beans

        Batch Chunk Simple No Beans

        Run
        How to run the sample
        The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
        git clone git://github.com/javaee-samples/javaee7-samples.git
        cd javaee7-samples/batch/chunk-simple-nobeans/
        Now we are ready to start testing. You can run all the tests in this sample by executing:
        mvn test
        Or you can run individual tests by executing one of the following:
        mvn test -Dtest=BatchChunkSimpleNoBeansTest

        Chunk Processing - Read, Process, Write

        BatchChunkSimpleNoBeansTest

        +

        The Batch specification provides a Chunk Oriented processing style. This style is defined by enclosing into a +transaction a set of reads, process and write operations via ItemReader, +ItemProcessor and ItemWriter. Items are read one at a time, processed +and aggregated. The transaction is then committed when the defined checkpoint-policy is triggered.

        +
        +
        +
        +
        <?xml version="1.0" encoding="UTF-8"?>
        +<job id="myJob" xmlns="http://xmlns.jcp.org/xml/ns/javaee" version="1.0">
        +    <step id="myStep" >
        +        <chunk item-count="3">
        +            <reader ref="myItemReader"/>
        +            <processor ref="myItemProcessor"/>
        +            <writer ref="myItemWriter"/>
        +        </chunk>
        +    </step>
        +</job>
        +
        +
        +
        +

        A very simple job is defined in the myJob.xml file. Just a single step with a reader, a processor and a writer.

        +
        +

        We’re just going to deploy the application as a web archive. Note the inclusion of the following files:

        +
        +
        +
        +
        /META-INF/batch-jobs/myJob.xml
        +
        +
        +
        +

        The myJob.xml file is needed for running the batch definition. This sample is also missing the beans.xml for +CDI discovery, since for Java EE 7 this file is now optional, but you need to annotated batch dependent beans +with Dependent.

        +
        +
        +
        @Deployment
        +public static WebArchive createDeployment() {
        +    WebArchive war = ShrinkWrap.create(WebArchive.class)
        +            .addClass(BatchTestHelper.class)
        +            .addPackage("org.javaee7.batch.samples.chunk.simple.nobeans")
        +            .addAsResource("META-INF/batch-jobs/myJob.xml");
        +    System.out.println(war.toString(true));
        +    return war;
        +}
        +
        +
        +

        In the test, we’re just going to invoke the batch execution and wait for completion. To validate the test +expected behaviour we need to query the Metric object available in the step execution.

        +
        +
        +

        The batch process itself will read and process 10 elements from numbers 1 to 10, but only write the odd +elements. Commits are executed after 3 elements are read.

        +
        +
        +
        @Test
        +public void testBatchChunkSimpleNoBeans() throws Exception {
        +    JobOperator jobOperator = BatchRuntime.getJobOperator();
        +    Long executionId = jobOperator.start("myJob", new Properties());
        +    JobExecution jobExecution = jobOperator.getJobExecution(executionId);
        +
        +    jobExecution = BatchTestHelper.keepTestAlive(jobExecution);
        +
        +    List<StepExecution> stepExecutions = jobOperator.getStepExecutions(executionId);
        +    for (StepExecution stepExecution : stepExecutions) {
        +        if (stepExecution.getStepName().equals("myStep")) {
        +            Map<Metric.MetricType, Long> metricsMap = BatchTestHelper.getMetricsMap(stepExecution.getMetrics());
        +
        +            (1)
        +            assertEquals(10L, metricsMap.get(Metric.MetricType.READ_COUNT).longValue());
        +            (2)
        +            assertEquals(10L / 2L, metricsMap.get(Metric.MetricType.WRITE_COUNT).longValue());
        +            (3)
        +            assertEquals(10L / 3 + (10L % 3 > 0 ? 1 : 0),
        +                         metricsMap.get(Metric.MetricType.COMMIT_COUNT).longValue());
        +        }
        +    }
        +
        +    (4)
        +    assertEquals(BatchStatus.COMPLETED, jobExecution.getBatchStatus());
        +}
        +
        +
        +
        +
          +
        1. +

          The read count should be 10 elements. Check MyItemReader.

          +
        2. +
        3. +

          The write count should be 5. Only half of the elements read are processed to be written.

          +
        4. +
        5. +

          The commit count should be 4. Checkpoint is on every 3rd read, 4 commits for read elements.

          +
        6. +
        7. +

          Job should be completed.

          +
        8. +
        +

        Share the Knowledge

        Find this sample useful? Share on

        There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

        Help Improve

        Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

        Recent Changelog

        • Dec 14, 2014: Switch from polling on jobexecution (for job completion) to polling with joboperator and executionid by Scott Kurz
        • Jul 05, 2014: Removed header license for batch xml files by Roberto Cortez
        • Jun 22, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
        • Jun 20, 2014: Added fqn to java ee api references to generate direct links to javadocs by radcortez
        • Jun 19, 2014: Documentation clarifications and typos by radcortez
        • Jun 18, 2014: Added documentation to chunk-simple-nobeans project by radcortez
        • Dec 31, 2013: Code style issues by Roberto Cortez
        • Dec 31, 2013: Removed servlets and jsp's by Roberto Cortez
        • Dec 30, 2013: Added test for chunk-simple-nobeans project by Roberto Cortez
        • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
        How to help improve this sample
        The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
        git clone git://github.com/javaee-samples/javaee7-samples.git
        cd javaee7-samples/batch/chunk-simple-nobeans/

        Do the changes as you see fit and send a pull request!

        Good Luck!

        + \ No newline at end of file diff --git a/sample/batch-chunk-simple/index.html b/sample/batch-chunk-simple/index.html new file mode 100644 index 0000000..0c6d641 --- /dev/null +++ b/sample/batch-chunk-simple/index.html @@ -0,0 +1,110 @@ +JavaEE Sample::Batch::Batch Chunk Simple

        Batch Chunk Simple

        Run
        How to run the sample
        The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
        git clone git://github.com/javaee-samples/javaee7-samples.git
        cd javaee7-samples/batch/chunk-simple/
        Now we are ready to start testing. You can run all the tests in this sample by executing:
        mvn test
        Or you can run individual tests by executing one of the following:
        mvn test -Dtest=ChunkSimpleTest

        Chunk Processing - Read, Process, Write

        ChunkSimpleTest

        +

        The Batch specification provides a Chunk Oriented processing style. This style is defined by enclosing into a +transaction a set of reads, process and write operations via ItemReader, +ItemProcessor and ItemWriter. Items are read one at a time, processed +and aggregated. The transaction is then committed when the defined checkpoint-policy is triggered.

        +
        +
        +
        +
        <?xml version="1.0" encoding="UTF-8"?>
        +<job id="myJob" xmlns="http://xmlns.jcp.org/xml/ns/javaee" version="1.0">
        +    <step id="myStep" >
        +        <chunk item-count="3">
        +            <reader ref="myItemReader"/>
        +            <processor ref="myItemProcessor"/>
        +            <writer ref="myItemWriter"/>
        +        </chunk>
        +    </step>
        +</job>
        +
        +
        +
        +

        A very simple job is defined in the myJob.xml file. Just a single step with a reader, a processor and a writer.

        +
        +

        We’re just going to deploy the application as a web archive. Note the inclusion of the following files:

        +
        +
        +
        +
        /META-INF/batch-jobs/myJob.xml
        +
        +
        +
        +

        The myJob.xml file is needed for running the batch definition.

        +
        +
        +
        @Deployment
        +public static WebArchive createDeployment() {
        +    WebArchive war = ShrinkWrap.create(WebArchive.class)
        +            .addClass(BatchTestHelper.class)
        +            .addPackage("org.javaee7.batch.chunk.simple")
        +            .addAsWebInfResource(EmptyAsset.INSTANCE, ArchivePaths.create("beans.xml"))
        +            .addAsResource("META-INF/batch-jobs/myJob.xml");
        +    System.out.println(war.toString(true));
        +    return war;
        +}
        +
        +
        +

        In the test, we’re just going to invoke the batch execution and wait for completion. To validate the test +expected behaviour we need to query the Metric object available in the step execution.

        +
        +
        +

        The batch process itself will read and process 10 elements from numbers 1 to 10, but only write the odd +elements. Commits are executed after 3 elements are read.

        +
        +
        +
        @Test
        +public void testChunkSimple() throws Exception {
        +    JobOperator jobOperator = BatchRuntime.getJobOperator();
        +    Long executionId = jobOperator.start("myJob", new Properties());
        +    JobExecution jobExecution = jobOperator.getJobExecution(executionId);
        +
        +    jobExecution = BatchTestHelper.keepTestAlive(jobExecution);
        +
        +    List<StepExecution> stepExecutions = jobOperator.getStepExecutions(executionId);
        +    for (StepExecution stepExecution : stepExecutions) {
        +        if (stepExecution.getStepName().equals("myStep")) {
        +            Map<Metric.MetricType, Long> metricsMap = BatchTestHelper.getMetricsMap(stepExecution.getMetrics());
        +
        +            (1)
        +            assertEquals(10L, metricsMap.get(Metric.MetricType.READ_COUNT).longValue());
        +            (2)
        +            assertEquals(10L / 2L, metricsMap.get(Metric.MetricType.WRITE_COUNT).longValue());
        +            (3)
        +            assertEquals(10L / 3 + (10L % 3 > 0 ? 1 : 0),
        +                         metricsMap.get(Metric.MetricType.COMMIT_COUNT).longValue());
        +        }
        +    }
        +
        +    (4)
        +    assertEquals(jobExecution.getBatchStatus(), BatchStatus.COMPLETED);
        +}
        +
        +
        +
        +
          +
        1. +

          The read count should be 10 elements. Check MyItemReader.

          +
        2. +
        3. +

          The write count should be 5. Only half of the elements read are processed to be written.

          +
        4. +
        5. +

          The commit count should be 4. Checkpoint is on every 3rd read, 4 commits for read elements.

          +
        6. +
        7. +

          Job should be completed.

          +
        8. +
        +

        Share the Knowledge

        Find this sample useful? Share on

        There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

        Help Improve

        Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

        Recent Changelog

        • Dec 14, 2014: Switch from polling on jobexecution (for job completion) to polling with joboperator and executionid by Scott Kurz
        • Jul 05, 2014: Removed header license for batch xml files by Roberto Cortez
        • Jun 22, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
        • Jun 20, 2014: Added fqn to java ee api references to generate direct links to javadocs by radcortez
        • Jun 19, 2014: Documentation clarifications and typos by radcortez
        • Jun 18, 2014: Fixed documentation of chunk-simple project by radcortez
        • Jun 18, 2014: Added documentation to chunk-simple project by radcortez
        • Dec 31, 2013: Code style issues by Roberto Cortez
        • Dec 31, 2013: Removed servlets and jsp's by Roberto Cortez
        • Nov 21, 2013: Moved batch-utils project one level up and renamed it to utils by Roberto Cortez
        How to help improve this sample
        The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
        git clone git://github.com/javaee-samples/javaee7-samples.git
        cd javaee7-samples/batch/chunk-simple/

        Do the changes as you see fit and send a pull request!

        Good Luck!

        + \ No newline at end of file diff --git a/sample/batch-decision/index.html b/sample/batch-decision/index.html new file mode 100644 index 0000000..8723129 --- /dev/null +++ b/sample/batch-decision/index.html @@ -0,0 +1,117 @@ +JavaEE Sample::Batch::Batch Decision

        Batch Decision

        Run
        How to run the sample
        The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
        git clone git://github.com/javaee-samples/javaee7-samples.git
        cd javaee7-samples/batch/decision/
        Now we are ready to start testing. You can run all the tests in this sample by executing:
        mvn test
        Or you can run individual tests by executing one of the following:
        mvn test -Dtest=BatchDecisionTest

        Batch DSL - Decision

        BatchDecisionTest

        +

        The Batch specification allows you to implement process workflow using a Job Specification Language (JSL). In this +sample, by using the decision element, it’s possible to configure a job that follows different paths of execution +based on your own criteria by implementing a Decider

        +
        +
        +

        The Decider just needs to return a meaningful value, to use in the myJob.xml file to be able to +reference the next step that must be executed.

        +
        +
        +
        +
        <?xml version="1.0" encoding="UTF-8"?>
        +<job id="myJob" xmlns="http://xmlns.jcp.org/xml/ns/javaee" version="1.0">
        +    <step id="step1" next="decider1">
        +        <batchlet ref="myBatchlet1"/>
        +    </step>
        +    <decision id="decider1" ref="myDecider">
        +        <next on="foobar" to="step3"/>
        +
        +
        +        <stop on="foobar2" exit-status="foobar3" restart="step3"/>
        +    </decision>
        +    <step id="step2">
        +        <batchlet ref="myBatchlet2"/>
        +    </step>
        +    <step id="step3">
        +        <batchlet ref="myBatchlet3"/>
        +    </step>
        +</job>
        +
        +
        +
        +

        Three Steps and one Decider are configured in the file myJob.xml. We start by executing one step1 and +hand over the control to the Decider, which will execute step2, since the Decider is always returning the value +foobar which forwards the execution to step2.

        +
        +

        We’re just going to deploy the application as a web archive. Note the inclusion of the following files:

        +
        +
        +
        +
        /META-INF/batch-jobs/myJob.xml
        +
        +
        +
        +

        The myJob.xml file is needed for running the batch definition.

        +
        +
        +
        @Deployment
        +public static WebArchive createDeployment() {
        +    WebArchive war = ShrinkWrap.create(WebArchive.class)
        +            .addClass(BatchTestHelper.class)
        +            .addPackage("org.javaee7.batch.decision")
        +            .addAsWebInfResource(EmptyAsset.INSTANCE, ArchivePaths.create("beans.xml"))
        +            .addAsResource("META-INF/batch-jobs/myJob.xml");
        +    System.out.println(war.toString(true));
        +    return war;
        +}
        +
        +
        +

        In the test, we’re just going to invoke the batch execution and wait for completion. To validate the test +expected behaviour we need to query JobOperator#getStepExecutions and the +Metric object available in the step execution.

        +
        +
        +
        @Test
        +public void testBatchDecision() throws Exception {
        +    JobOperator jobOperator = BatchRuntime.getJobOperator();
        +    Long executionId = jobOperator.start("myJob", new Properties());
        +    JobExecution jobExecution = jobOperator.getJobExecution(executionId);
        +
        +    jobExecution = BatchTestHelper.keepTestAlive(jobExecution);
        +
        +    List<StepExecution> stepExecutions = jobOperator.getStepExecutions(executionId);
        +    List<String> executedSteps = new ArrayList<>();
        +    for (StepExecution stepExecution : stepExecutions) {
        +        executedSteps.add(stepExecution.getStepName());
        +    }
        +
        +    (1)
        +    assertEquals(2, stepExecutions.size());
        +    (2)
        +    assertArrayEquals(new String[] {"step1", "step3"}, executedSteps.toArray());
        +    (3)
        +    assertFalse(executedSteps.contains("step2"));
        +    (4)
        +    assertEquals(BatchStatus.COMPLETED, jobExecution.getBatchStatus());
        +}
        +
        +
        +
        +
          +
        1. +

          Make sure that only two steps were executed.

          +
        2. +
        3. +

          Make sure that only the expected steps were executed an in order.

          +
        4. +
        5. +

          Make sure that this step was never executed.

          +
        6. +
        7. +

          Job should be completed.

          +
        8. +
        +

        Share the Knowledge

        Find this sample useful? Share on

        There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

        Help Improve

        Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

        Recent Changelog

        • Dec 14, 2014: Switch from polling on jobexecution (for job completion) to polling with joboperator and executionid by Scott Kurz
        • Jul 05, 2014: Removed header license for batch xml files by Roberto Cortez
        • Jun 22, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
        • Jun 20, 2014: Added fqn to java ee api references to generate direct links to javadocs by radcortez
        • Jun 19, 2014: Documentation clarifications and typos by radcortez
        • Jun 12, 2014: Fix callout numbering in batchdecisiontest by Aslak Knutsen
        • Jun 12, 2014: Added documentation to decision project by Roberto Cortez
        • Dec 31, 2013: Removed servlets and jsp's by Roberto Cortez
        • Dec 30, 2013: Added test for decision project by Roberto Cortez
        • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
        How to help improve this sample
        The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
        git clone git://github.com/javaee-samples/javaee7-samples.git
        cd javaee7-samples/batch/decision/

        Do the changes as you see fit and send a pull request!

        Good Luck!

        + \ No newline at end of file diff --git a/sample/batch-flow/index.html b/sample/batch-flow/index.html new file mode 100644 index 0000000..a847204 --- /dev/null +++ b/sample/batch-flow/index.html @@ -0,0 +1,115 @@ +JavaEE Sample::Batch::Batch Flow

        Batch Flow

        Run
        How to run the sample
        The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
        git clone git://github.com/javaee-samples/javaee7-samples.git
        cd javaee7-samples/batch/flow/
        Now we are ready to start testing. You can run all the tests in this sample by executing:
        mvn test
        Or you can run individual tests by executing one of the following:
        mvn test -Dtest=BatchFlowTest

        Batch DSL - Flow

        BatchFlowTest

        +

        The Batch specification allows you to implement process workflow using a Job Specification Language (JSL). In this +sample, by using the flow element, we define a sequence of elements that execute together as a unit. When the +flow is finished the flow transitions to the next execution element. The execution elements of a flow cannot +transition to elements outside the flow.

        +
        +
        +
        +
        <?xml version="1.0" encoding="UTF-8"?>
        +<job id="myJob" xmlns="http://xmlns.jcp.org/xml/ns/javaee" version="1.0">
        +    <flow id="flow1" next="step3">
        +        <step id="step1" next="step2">
        +            <batchlet ref="myBatchlet1"/>
        +        </step>
        +        <step id="step2" >
        +            <chunk item-count="3">
        +                <reader ref="myItemReader"/>
        +                <writer ref="myItemWriter"/>
        +            </chunk>
        +        </step>
        +    </flow>
        +    <step id="step3" >
        +        <batchlet ref="myBatchlet2"/>
        +    </step>
        +</job>
        +
        +
        +
        +

        The flow element is useful to build a self contained workflow that you can reference and build as a part of a bigger +workflow.

        +
        +

        We’re just going to deploy the application as a web archive. Note the inclusion of the following files:

        +
        +
        +
        +
        /META-INF/batch-jobs/myJob.xml
        +
        +
        +
        +

        The myJob.xml file is needed for running the batch definition.

        +
        +
        +
        @Deployment
        +public static WebArchive createDeployment() {
        +    WebArchive war = ShrinkWrap.create(WebArchive.class)
        +            .addClass(BatchTestHelper.class)
        +            .addPackage("org.javaee7.batch.flow")
        +            .addAsWebInfResource(EmptyAsset.INSTANCE, ArchivePaths.create("beans.xml"))
        +            .addAsResource("META-INF/batch-jobs/myJob.xml");
        +    System.out.println(war.toString(true));
        +    return war;
        +}
        +
        +
        +

        In the test, we’re just going to invoke the batch execution and wait for completion. To validate the test +expected behaviour we need to query JobOperator#getStepExecutions and the +Metric object available in the step execution.

        +
        +
        +
        @Test
        +public void testBatchFlow() throws Exception {
        +    JobOperator jobOperator = BatchRuntime.getJobOperator();
        +    Long executionId = jobOperator.start("myJob", new Properties());
        +    JobExecution jobExecution = jobOperator.getJobExecution(executionId);
        +
        +    jobExecution = BatchTestHelper.keepTestAlive(jobExecution);
        +
        +    List<StepExecution> stepExecutions = jobOperator.getStepExecutions(executionId);
        +    List<String> executedSteps = new ArrayList<>();
        +    for (StepExecution stepExecution : stepExecutions) {
        +        executedSteps.add(stepExecution.getStepName());
        +
        +        if (stepExecution.getStepName().equals("step2")) {
        +            Map<Metric.MetricType, Long> metricsMap = BatchTestHelper.getMetricsMap(stepExecution.getMetrics());
        +            System.out.println(metricsMap);
        +            assertEquals(5L, metricsMap.get(Metric.MetricType.READ_COUNT).longValue());
        +            assertEquals(5L, metricsMap.get(Metric.MetricType.WRITE_COUNT).longValue());
        +            assertEquals(5L / 3 + (5 % 3 > 0 ? 1 : 0), metricsMap.get(Metric.MetricType.COMMIT_COUNT).longValue());
        +        }
        +    }
        +
        +    (1)
        +    assertEquals(3, stepExecutions.size());
        +    (2)
        +    assertArrayEquals(new String[]{"step1", "step2", "step3"}, executedSteps.toArray());
        +    (3)
        +    assertEquals(BatchStatus.COMPLETED, jobExecution.getBatchStatus());
        +}
        +
        +
        +
        +
          +
        1. +

          Make sure all the steps were executed.

          +
        2. +
        3. +

          Make sure all the steps were executed in order of declaration.

          +
        4. +
        5. +

          Job should be completed.

          +
        6. +
        +

        Share the Knowledge

        Find this sample useful? Share on

        There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

        Help Improve

        Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

        Recent Changelog

        • Dec 14, 2014: Switch from polling on jobexecution (for job completion) to polling with joboperator and executionid by Scott Kurz
        • Jul 05, 2014: Removed header license for batch xml files by Roberto Cortez
        • Jun 22, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
        • Jun 20, 2014: Added fqn to java ee api references to generate direct links to javadocs by radcortez
        • Jun 19, 2014: Documentation clarifications and typos by radcortez
        • Jun 12, 2014: Added documentation to flow project by Roberto Cortez
        • Dec 31, 2013: Code style issues by Roberto Cortez
        • Dec 31, 2013: Added test for flow project by Roberto Cortez
        • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
        • Sep 17, 2013: Forgot to include some files - improving output messages, adding copyrights and @author by Arun Gupta
        How to help improve this sample
        The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
        git clone git://github.com/javaee-samples/javaee7-samples.git
        cd javaee7-samples/batch/flow/

        Do the changes as you see fit and send a pull request!

        Good Luck!

        + \ No newline at end of file diff --git a/sample/batch-multiple-steps/index.html b/sample/batch-multiple-steps/index.html new file mode 100644 index 0000000..8827af5 --- /dev/null +++ b/sample/batch-multiple-steps/index.html @@ -0,0 +1,108 @@ +JavaEE Sample::Batch::Batch Multiple Steps

        Batch Multiple Steps

        Run
        How to run the sample
        The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
        git clone git://github.com/javaee-samples/javaee7-samples.git
        cd javaee7-samples/batch/multiple-steps/
        Now we are ready to start testing. You can run all the tests in this sample by executing:
        mvn test
        Or you can run individual tests by executing one of the following:
        mvn test -Dtest=BatchMultipleStepsTest

        Batch JSL - Executing Multiple Steps

        BatchMultipleStepsTest

        +

        The Batch specification allows you to implement process workflow using a Job Specification Language (JSL). In this +sample, by using the step element, it’s possible to configure a job that runs multiple steps.

        +
        +
        +

        One Chunk oriented Step and a Batchlet are configured in the file myJob.xml. They both execute in order of +declaration. First the Chunk oriented Step and finally the Batchlet Step.

        +
        +
        +
        +
        <?xml version="1.0" encoding="UTF-8"?>
        +<job id="myJob" xmlns="http://xmlns.jcp.org/xml/ns/javaee" version="1.0">
        +    <step id="step1" next="step2">
        +        <chunk item-count="3">
        +            <reader ref="myItemReader"/>
        +            <processor ref="myItemProcessor"/>
        +            <writer ref="myItemWriter"/>
        +        </chunk>
        +    </step>
        +    <step id="step2" >
        +        <batchlet ref="myBatchlet"/>
        +    </step>
        +</job>
        +
        +
        +

        We’re just going to deploy the application as a web archive. Note the inclusion of the following files:

        +
        +
        +
        +
        /META-INF/batch-jobs/myJob.xml
        +
        +
        +
        +

        The myJob.xml file is needed for running the batch definition.

        +
        +
        +
        @Deployment
        +public static WebArchive createDeployment() {
        +    WebArchive war = ShrinkWrap.create(WebArchive.class)
        +            .addClass(BatchTestHelper.class)
        +            .addPackage("org.javaee7.batch.multiple.steps")
        +            .addAsWebInfResource(EmptyAsset.INSTANCE, ArchivePaths.create("beans.xml"))
        +            .addAsResource("META-INF/batch-jobs/myJob.xml");
        +    System.out.println(war.toString(true));
        +    return war;
        +}
        +
        +
        +

        In the test, we’re just going to invoke the batch execution and wait for completion. To validate the test +expected behaviour we need to query JobOperator#getStepExecutions and the +Metric object available in the step execution.

        +
        +
        +
        @Test
        +public void testBatchMultipleSteps() throws Exception {
        +    JobOperator jobOperator = BatchRuntime.getJobOperator();
        +    Long executionId = jobOperator.start("myJob", new Properties());
        +    JobExecution jobExecution = jobOperator.getJobExecution(executionId);
        +
        +    jobExecution = BatchTestHelper.keepTestAlive(jobExecution);
        +
        +    List<StepExecution> stepExecutions = jobOperator.getStepExecutions(executionId);
        +    List<String> executedSteps = new ArrayList<>();
        +    for (StepExecution stepExecution : stepExecutions) {
        +        executedSteps.add(stepExecution.getStepName());
        +
        +        if (stepExecution.getStepName().equals("step1")) {
        +            Map<Metric.MetricType, Long> metricsMap = BatchTestHelper.getMetricsMap(stepExecution.getMetrics());
        +            assertEquals(10L, metricsMap.get(Metric.MetricType.READ_COUNT).longValue());
        +            assertEquals(10L / 2, metricsMap.get(Metric.MetricType.WRITE_COUNT).longValue());
        +            assertEquals(10L / 3 + (10L % 3 > 0 ? 1 : 0), metricsMap.get(Metric.MetricType.COMMIT_COUNT).longValue());
        +        }
        +    }
        +
        +    (1)
        +    assertEquals(2, stepExecutions.size());
        +    (2)
        +    assertArrayEquals(new String[]{"step1", "step2"}, executedSteps.toArray());
        +    (3)
        +    assertEquals(BatchStatus.COMPLETED, jobExecution.getBatchStatus());
        +}
        +
        +
        +
        +
          +
        1. +

          Make sure all the steps were executed.

          +
        2. +
        3. +

          Make sure all the steps were executed in order of declaration.

          +
        4. +
        5. +

          Job should be completed.

          +
        6. +
        +

        Share the Knowledge

        Find this sample useful? Share on

        There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

        Help Improve

        Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

        Recent Changelog

        • Dec 14, 2014: Switch from polling on jobexecution (for job completion) to polling with joboperator and executionid by Scott Kurz
        • Jul 05, 2014: Removed header license for batch xml files by Roberto Cortez
        • Jun 22, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
        • Jun 20, 2014: Added fqn to java ee api references to generate direct links to javadocs by radcortez
        • Jun 19, 2014: Documentation clarifications and typos by radcortez
        • May 30, 2014: Added documentation to multiple-steps project by Roberto Cortez
        • Dec 31, 2013: Code style issues by Roberto Cortez
        • Dec 31, 2013: Added test for multiple-steps project by Roberto Cortez
        • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
        • Sep 17, 2013: Forgot to include some files - improving output messages, adding copyrights and @author by Arun Gupta
        How to help improve this sample
        The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
        git clone git://github.com/javaee-samples/javaee7-samples.git
        cd javaee7-samples/batch/multiple-steps/

        Do the changes as you see fit and send a pull request!

        Good Luck!

        + \ No newline at end of file diff --git a/sample/batch-scheduling/index.html b/sample/batch-scheduling/index.html new file mode 100644 index 0000000..9668098 --- /dev/null +++ b/sample/batch-scheduling/index.html @@ -0,0 +1,208 @@ +JavaEE Sample::Batch::Batch Schedule

        Batch Schedule

        Run
        How to run the sample
        The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
        git clone git://github.com/javaee-samples/javaee7-samples.git
        cd javaee7-samples/batch/scheduling/
        Now we are ready to start testing. You can run all the tests in this sample by executing:
        mvn test
        Or you can run individual tests by executing one of the following:
        mvn test -Dtest=ManagedScheduledBatchTestmvn test -Dtest=TimerScheduleBatchTest

        Scheduling a Batch Job

        ManagedScheduledBatchTest

        +

        The Batch specification does not offer anything to schedule jobs. However, the Java EE plataform offer a few ways +that allow you to schedule Batch jobs.

        +
        +
        +

        Adding a Trigger to a ManagedScheduledExecutorService +is possible to trigger an execution of the batch job by specifying the next execution date of the job.

        +
        +
        +
        +
        @Stateless()
        +@Local(MyManagedScheduledBatch.class)
        +public class MyManagedScheduledBatchBean implements MyManagedScheduledBatch {
        +
        +    public MyManagedScheduledBatchBean();
        +    @Resource()
        +    private ManagedScheduledExecutorService executor;
        +
        +    @Override()
        +    public void runJob();
        +
        +    public void runJob2();
        +
        +    protected MyJob createJob();
        +}
        +
        +
        +

        We’re just going to deploy the application as a web archive. Note the inclusion of the following files:

        +
        +
        +
        +
        /META-INF/batch-jobs/myJob.xml
        +
        +
        +
        +

        The myJob.xml file is needed for running the batch definition. We are also adding an alternative bean to +override the created batch instance do we can track it’s status and the modified batch instance.

        +
        +
        + + + + + +
        +
        Warning
        +
        +MyJobAlternative not found +
        +
        +
        + + + + + +
        +
        Warning
        +
        +MyManagedScheduledBatchAlternative not found +
        +
        +
        +
        @Deployment
        +public static WebArchive createDeployment() {
        +    BeansDescriptor beansXml = Descriptors.create(BeansDescriptor.class);
        +
        +    WebArchive war = ShrinkWrap.create(WebArchive.class)
        +            .addClasses(
        +                    MyBatchlet.class,
        +                    MyJob.class,
        +                    MyJobAlternative.class,
        +                    MyManagedScheduledBatch.class,
        +                    MyManagedScheduledBatchBean.class,
        +                    MyManagedScheduledBatchAlternative.class)
        +            .addAsWebInfResource(
        +                    new StringAsset(beansXml.createAlternatives().clazz(
        +                            MyManagedScheduledBatchAlternative.class.getName()).up().exportAsString()),
        +                    beansXml.getDescriptorName())
        +            .addAsResource("META-INF/batch-jobs/myJob.xml");
        +    System.out.println(war.toString(true));
        +    return war;
        +}
        +
        +
        +

        The batch job is scheduled to execute each 15 seconds. We expect to run the batch instance exactly 3 times as +defined in the CountDownLatch object. To validate the test expected behaviour we just need to check the +Batch Status in the JobExecution object. We should get a +COMPLETED for every execution.

        +
        +
        +
        @Test
        +public void testTimeScheduleBatch() throws Exception {
        +    managedScheduledBatch.runJob();
        +
        +    MyJobAlternative.managedScheduledCountDownLatch.await(90, TimeUnit.SECONDS);
        +
        +    assertEquals(0, MyJobAlternative.managedScheduledCountDownLatch.getCount());
        +    assertEquals(3, MyJob.executedBatchs.size());
        +
        +    for (Long executedBatch : MyJob.executedBatchs) {
        +        assertEquals(BatchStatus.COMPLETED,
        +                BatchRuntime.getJobOperator().getJobExecution(executedBatch).getBatchStatus());
        +    }
        +}
        +
        +

        TimerScheduleBatchTest

        +

        The Batch specification does not offer anything to schedule jobs. However, the Java EE plataform offer a few ways +that allow you to schedule Batch jobs.

        +
        +
        +

        Annotating a method bean with Schedule, it’s possible to schedule an execution of a batch job by the +specified cron expression in the Schedule annotation.

        +
        +
        + + + + + +
        +
        Warning
        +
        +AbstractTimerBatch not found +
        +
        +
        +
        +
        @Startup()
        +@Singleton()
        +public class MyTimerScheduleBean extends AbstractTimerBatch {
        +
        +    public MyTimerScheduleBean();
        +}
        +
        +
        +

        We’re just going to deploy the application as a web archive. Note the inclusion of the following files:

        +
        +
        +
        +
        /META-INF/batch-jobs/myJob.xml
        +
        +
        +
        +

        The myJob.xml file is needed for running the batch definition. We are also adding an alternative bean to +override the batch schedule timeout and track the execution calls,

        +
        +
        + + + + + +
        +
        Warning
        +
        +MyTimerScheduleAlternative not found +
        +
        +
        +
        @Deployment
        +public static WebArchive createDeployment() {
        +    WebArchive war = ShrinkWrap.create(WebArchive.class)
        +            .addClasses(
        +                    MyBatchlet.class,
        +                    MyJob.class,
        +                    AbstractTimerBatch.class,
        +                    MyTimerScheduleAlternative.class)
        +            .addAsWebInfResource(EmptyAsset.INSTANCE, ArchivePaths.create("beans.xml"))
        +            .addAsResource("META-INF/batch-jobs/myJob.xml");
        +
        +    System.out.println(war.toString(true));
        +    return war;
        +}
        +
        +
        +

        The batch job is scheduled to execute each 15 seconds. We expect to run the batch instance exactly 3 times as +defined in the CountDownLatch object. To validate the test expected behaviour we just need to check the +Batch Status in the JobExecution object. We should get a +COMPLETED for every execution.

        +
        +
        +
        @Test
        +public void testTimeScheduleBatch() throws Exception {
        +    MyTimerScheduleAlternative.timerScheduleCountDownLatch.await(90, TimeUnit.SECONDS);
        +
        +    assertEquals(0, MyTimerScheduleAlternative.timerScheduleCountDownLatch.getCount());
        +    assertEquals(3, MyTimerScheduleAlternative.executedBatchs.size());
        +
        +    for (Long executedBatch : MyTimerScheduleAlternative.executedBatchs) {
        +        assertEquals(BatchStatus.COMPLETED,
        +                BatchRuntime.getJobOperator().getJobExecution(executedBatch).getBatchStatus());
        +    }
        +}
        +
        +

        Share the Knowledge

        Find this sample useful? Share on

        There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

        Help Improve

        Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

        Recent Changelog

        • Jul 09, 2014: Added tests to scheduling project by Roberto Cortez
        • Jul 08, 2014: Adding a new sample to schedule batch jobs by arun-gupta
        How to help improve this sample
        The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
        git clone git://github.com/javaee-samples/javaee7-samples.git
        cd javaee7-samples/batch/scheduling/

        Do the changes as you see fit and send a pull request!

        Good Luck!

        + \ No newline at end of file diff --git a/sample/batch-split/index.html b/sample/batch-split/index.html new file mode 100644 index 0000000..981decf --- /dev/null +++ b/sample/batch-split/index.html @@ -0,0 +1,119 @@ +JavaEE Sample::Batch::Batch Split

        Batch Split

        Run
        How to run the sample
        The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
        git clone git://github.com/javaee-samples/javaee7-samples.git
        cd javaee7-samples/batch/split/
        Now we are ready to start testing. You can run all the tests in this sample by executing:
        mvn test
        Or you can run individual tests by executing one of the following:
        mvn test -Dtest=BatchSplitTest

        Batch JSL - Splitting Steps

        BatchSplitTest

        +

        The Batch specification allows you to implement process workflow using a Job Specification Language (JSL). In this +sample, by using the split element, it’s possible to configure a job that runs parallel flows. A split can only +contain flow elements. These flow elements can be used to implement separate executions to be processed by the +job.

        +
        +
        +

        Three simple Batchlet’s are configured in the file myJob.xml. MyBatchlet1 and MyBatchlet2 are setted up to +execute in parallel by using the split and flow elements. MyBatchlet3 is only going to execute after +MyBatchlet1 and MyBatchlet2 are both done with their job.

        +
        +
        +
        +
        <?xml version="1.0" encoding="UTF-8"?>
        +<job id="myJob" xmlns="http://xmlns.jcp.org/xml/ns/javaee" version="1.0">
        +    <split id="split1" next="step3">
        +        <flow id="flow1">
        +            <step id="step1">
        +                <batchlet ref="myBatchlet1"/>
        +            </step>
        +        </flow>
        +        <flow id="flow2">
        +            <step id="step2">
        +                <batchlet ref="myBatchlet2"/>
        +            </step>
        +        </flow>
        +    </split>
        +    <step id="step3">
        +        <batchlet ref="myBatchlet3"/>
        +    </step>
        +</job>
        +
        +
        +

        We’re just going to deploy the application as a web archive. Note the inclusion of the following files:

        +
        +
        +
        +
        /META-INF/batch-jobs/myJob.xml
        +
        +
        +
        +

        The myJob.xml file is needed for running the batch definition.

        +
        +
        +
        @Deployment
        +public static WebArchive createDeployment() {
        +    WebArchive war = ShrinkWrap.create(WebArchive.class)
        +            .addClass(BatchTestHelper.class)
        +            .addPackage("org.javaee7.batch.split")
        +            .addAsWebInfResource(EmptyAsset.INSTANCE, ArchivePaths.create("beans.xml"))
        +            .addAsResource("META-INF/batch-jobs/myJob.xml");
        +    System.out.println(war.toString(true));
        +    return war;
        +}
        +
        +
        +

        In the test, we’re just going to invoke the batch execution and wait for completion. To validate the test +expected behaviour we need to query JobOperator#getStepExecutions.

        +
        +
        +
        @Test
        +public void testBatchSplit() throws Exception {
        +    JobOperator jobOperator = BatchRuntime.getJobOperator();
        +    Long executionId = jobOperator.start("myJob", new Properties());
        +    JobExecution jobExecution = jobOperator.getJobExecution(executionId);
        +
        +    jobExecution = BatchTestHelper.keepTestAlive(jobExecution);
        +
        +    List<StepExecution> stepExecutions = jobOperator.getStepExecutions(executionId);
        +    List<String> executedSteps = new ArrayList<>();
        +    for (StepExecution stepExecution : stepExecutions) {
        +        executedSteps.add(stepExecution.getStepName());
        +    }
        +
        +    (1)
        +    assertEquals(3, stepExecutions.size());
        +    assertTrue(executedSteps.contains("step1"));
        +    assertTrue(executedSteps.contains("step2"));
        +    assertTrue(executedSteps.contains("step3"));
        +
        +    (2)
        +    assertTrue(executedSteps.get(0).equals("step1") || executedSteps.get(0).equals("step2"));
        +    assertTrue(executedSteps.get(1).equals("step1") || executedSteps.get(1).equals("step2"));
        +    (3)
        +    assertTrue(executedSteps.get(2).equals("step3"));
        +
        +    (4)
        +    assertEquals(BatchStatus.COMPLETED, jobExecution.getBatchStatus());
        +}
        +
        +
        +
        +
          +
        1. +

          Make sure all the steps were executed.

          +
        2. +
        3. +

          Steps step1 and step2 can appear in any order, since they were executed in parallel.

          +
        4. +
        5. +

          Step step3 is always the last to be executed.

          +
        6. +
        7. +

          Job should be completed.

          +
        8. +
        +

        Share the Knowledge

        Find this sample useful? Share on

        There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

        Help Improve

        Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

        Recent Changelog

        • Dec 14, 2014: Switch from polling on jobexecution (for job completion) to polling with joboperator and executionid by Scott Kurz
        • Jul 05, 2014: Removed header license for batch xml files by Roberto Cortez
        • Jun 22, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
        • Jun 20, 2014: Added fqn to java ee api references to generate direct links to javadocs by radcortez
        • Jun 19, 2014: Documentation clarifications and typos by radcortez
        • May 30, 2014: Added documentation to split project by Roberto Cortez
        • Dec 31, 2013: Fixed test. assert steps order by Roberto Cortez
        • Dec 31, 2013: Added test for split project by Roberto Cortez
        • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
        • Sep 17, 2013: Improving output messages, adding copyrights and @author by Arun Gupta
        How to help improve this sample
        The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
        git clone git://github.com/javaee-samples/javaee7-samples.git
        cd javaee7-samples/batch/split/

        Do the changes as you see fit and send a pull request!

        Good Luck!

        + \ No newline at end of file diff --git a/sample/cdi-alternatives-priority/index.html b/sample/cdi-alternatives-priority/index.html new file mode 100644 index 0000000..582227d --- /dev/null +++ b/sample/cdi-alternatives-priority/index.html @@ -0,0 +1,78 @@ +JavaEE Sample::CDI::Alternatives priority

        Alternatives priority

        Run
        How to run the sample
        The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
        git clone git://github.com/javaee-samples/javaee7-samples.git
        cd javaee7-samples/cdi/alternatives-priority/
        Now we are ready to start testing. You can run all the tests in this sample by executing:
        mvn test
        Or you can run individual tests by executing one of the following:
        mvn test -Dtest=MixedGreetingTestmvn test -Dtest=GreetingTestmvn test -Dtest=ProducerMethodGreetingTest

        • Specifications in use:
          • CDI

          MixedGreetingTest

          Missing a description for the story. Add some javadoc to the TestClass. Show me how!
          Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
          +
          +
          @Deployment
          +public static Archive<?> deploy() {
          +	return ShrinkWrap.create(JavaArchive.class)
          +			.addClasses(Greeting.class, SimpleGreeting.class, FancyGreeting.class)
          +			.addAsManifestResource("beans-alternatives.xml", "beans.xml");
          +}
          +
          +
          Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
          +
          +
          @Test
          +public void should_be_ambiguous() throws Exception {
          +	Set<Bean<?>> beans = beanManager.getBeans(Greeting.class);
          +	assertTrue(beans.size() == 2);
          +}
          +
          +

          GreetingTest

          Missing a description for the story. Add some javadoc to the TestClass. Show me how!
          Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
          +
          +
          @Deployment
          +public static Archive<?> deploy() {
          +	return ShrinkWrap.create(JavaArchive.class)
          +			.addClasses(Greeting.class, SimpleGreeting.class, FancyGreeting.class, PriorityGreeting.class)
          +			.addAsManifestResource("beans-empty.xml", "beans.xml");
          +}
          +
          +
          Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
          +
          +
          @Test
          +public void should_bean_be_injected() throws Exception {
          +	assertThat(bean, is(notNullValue()));
          +}
          +
          +
          Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
          +
          +
          @Test
          +public void should_bean_be_priority() throws Exception {
          +	// because it has the highest priority from Priority annotated alternatives
          +	assertThat(bean, instanceOf(PriorityGreeting.class));
          +}
          +
          +

          ProducerMethodGreetingTest

          Missing a description for the story. Add some javadoc to the TestClass. Show me how!
          Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
          +
          +
          @Deployment
          +public static Archive<?> deploy() {
          +	return ShrinkWrap.create(JavaArchive.class)
          +			.addClasses(Greeting.class, SimpleGreeting.class, FancyGreeting.class, PriorityGreeting.class, ProducerMethodGreeting.class)
          +			.addAsManifestResource("beans-empty.xml", "beans.xml");
          +}
          +
          +
          Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
          +
          +
          @Test
          +public void should_bean_be_injected() throws Exception {
          +	assertThat(bean, is(notNullValue()));
          +}
          +
          +
          Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
          +
          +
          @Test
          +public void should_bean_be_simple() throws Exception {
          +	// because it has the highest priority from Priority annotated alternatives
          +	assertThat(bean, instanceOf(SimpleGreeting.class));
          +}
          +
          +

          Share the Knowledge

          Find this sample useful? Share on

          There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

          Help Improve

          Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

          Recent Changelog

          • Oct 05, 2014: #252 fixed arquillian configuration for the jobs by John D. Ament
          • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
          • Mar 20, 2014: Update arquillian.xml cr1 references to final by Aslak Knutsen
          • Dec 30, 2013: Added cdi/alternatives-priority, 3 tests available by Radim Hanus
          • Dec 30, 2013: Added cdi/alternatives-priority, 3 tests available by Radim Hanus
          How to help improve this sample
          The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
          git clone git://github.com/javaee-samples/javaee7-samples.git
          cd javaee7-samples/cdi/alternatives-priority/

          Do the changes as you see fit and send a pull request!

          Good Luck!

          + \ No newline at end of file diff --git a/sample/cdi-alternatives/index.html b/sample/cdi-alternatives/index.html new file mode 100644 index 0000000..0953bc6 --- /dev/null +++ b/sample/cdi-alternatives/index.html @@ -0,0 +1,37 @@ +JavaEE Sample::CDI::Alternatives

          Alternatives

          Run
          How to run the sample
          The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
          git clone git://github.com/javaee-samples/javaee7-samples.git
          cd javaee7-samples/cdi/alternatives/
          Now we are ready to start testing. You can run all the tests in this sample by executing:
          mvn test
          Or you can run individual tests by executing one of the following:
          mvn test -Dtest=GreetingTest

          • Specifications in use:
            • CDI

            GreetingTest

            Missing a description for the story. Add some javadoc to the TestClass. Show me how!
            Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
            +
            +
            @Deployment
            +public static Archive<?> deploy() {
            +    return ShrinkWrap.create(JavaArchive.class)
            +            .addClasses(Greeting.class, SimpleGreeting.class, FancyGreeting.class)
            +            .addAsManifestResource("beans.xml");
            +}
            +
            +
            Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
            +
            +
            @Test
            +public void should_bean_be_injected() throws Exception {
            +    assertThat(bean, is(notNullValue()));
            +}
            +
            +
            Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
            +
            +
            @Test
            +public void should_bean_be_fancy() throws Exception {
            +    // because it is declared as the alternative in beans.xml
            +    assertThat(bean, instanceOf(FancyGreeting.class));
            +}
            +
            +

            Share the Knowledge

            Find this sample useful? Share on

            There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

            Help Improve

            Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

            Recent Changelog

            • Oct 05, 2014: #252 fixed arquillian configuration for the jobs by John D. Ament
            • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
            • Mar 20, 2014: Update arquillian.xml cr1 references to final by Aslak Knutsen
            • Dec 24, 2013: Updated to wildfly 8.0.0.cr1 by Roberto Cortez
            • Dec 01, 2013: Adding arquillian tests to cdi/alternatives example by Alexis Hassler
            • Oct 18, 2013: Improved the output message by Arun Gupta
            • Oct 18, 2013: Removing @fancy qualifier and fixing the sample. thanks jj for helping me debug by Arun Gupta
            • Oct 08, 2013: Starting work on alternatives sample by Arun Gupta
            How to help improve this sample
            The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
            git clone git://github.com/javaee-samples/javaee7-samples.git
            cd javaee7-samples/cdi/alternatives/

            Do the changes as you see fit and send a pull request!

            Good Luck!

            + \ No newline at end of file diff --git a/sample/cdi-bean-discovery-all/index.html b/sample/cdi-bean-discovery-all/index.html new file mode 100644 index 0000000..097c247 --- /dev/null +++ b/sample/cdi-bean-discovery-all/index.html @@ -0,0 +1,30 @@ +JavaEE Sample::CDI::Bean discovery all

            Bean discovery all

            Run
            How to run the sample
            The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
            git clone git://github.com/javaee-samples/javaee7-samples.git
            cd javaee7-samples/cdi/bean-discovery-all/
            Now we are ready to start testing. You can run all the tests in this sample by executing:
            mvn test
            Or you can run individual tests by executing one of the following:
            mvn test -Dtest=GreetingTest

            • Specifications in use:
              • CDI

              GreetingTest

              Missing a description for the story. Add some javadoc to the TestClass. Show me how!
              Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
              +
              +
              @Deployment
              +public static Archive<?> deploy() {
              +    return ShrinkWrap.create(JavaArchive.class)
              +                     .addClasses(Greeting.class, SimpleGreeting.class)
              +                     .addAsManifestResource("beans.xml");
              +}
              +
              +
              Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
              +
              +
              @Test
              +public void should_bean_be_injected() throws Exception {
              +    assertThat(bean, is(notNullValue()));
              +    assertThat(bean, instanceOf(SimpleGreeting.class));
              +}
              +
              +

              Share the Knowledge

              Find this sample useful? Share on

              There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

              Help Improve

              Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

              Recent Changelog

              • Oct 05, 2014: #252 fixed arquillian configuration for the jobs by John D. Ament
              • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
              • Mar 20, 2014: Update arquillian.xml cr1 references to final by Aslak Knutsen
              • Dec 24, 2013: Updated to wildfly 8.0.0.cr1 by Roberto Cortez
              • Nov 13, 2013: Added arquillian test for the cdi/bean-discovery-all example by Alexis Hassler
              • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
              • Aug 28, 2013: Slightly more indicative headers by Arun Gupta
              • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
              How to help improve this sample
              The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
              git clone git://github.com/javaee-samples/javaee7-samples.git
              cd javaee7-samples/cdi/bean-discovery-all/

              Do the changes as you see fit and send a pull request!

              Good Luck!

              + \ No newline at end of file diff --git a/sample/cdi-bean-discovery-annotated/index.html b/sample/cdi-bean-discovery-annotated/index.html new file mode 100644 index 0000000..7032153 --- /dev/null +++ b/sample/cdi-bean-discovery-annotated/index.html @@ -0,0 +1,37 @@ +JavaEE Sample::CDI::Bean discovery annotated

              Bean discovery annotated

              Run
              How to run the sample
              The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
              git clone git://github.com/javaee-samples/javaee7-samples.git
              cd javaee7-samples/cdi/bean-discovery-annotated/
              Now we are ready to start testing. You can run all the tests in this sample by executing:
              mvn test
              Or you can run individual tests by executing one of the following:
              mvn test -Dtest=GreetingTest

              • Specifications in use:
                • CDI

                GreetingTest

                Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                +
                +
                @Deployment
                +public static Archive<?> deploy() {
                +    return ShrinkWrap.create(JavaArchive.class)
                +                     .addClasses(Greeting.class, SimpleGreeting.class, FancyGreeting.class)
                +                     .addAsManifestResource("beans.xml");
                +}
                +
                +
                Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                +
                +
                @Test
                +public void should_bean_be_injected() throws Exception {
                +    assertThat(bean, is(CoreMatchers.notNullValue()));
                +}
                +
                +
                Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                +
                +
                @Test
                +public void should_bean_be_simple() throws Exception {
                +    // because SimpleGreeting is annotated (scope)
                +    assertThat(bean, instanceOf(SimpleGreeting.class));
                +}
                +
                +

                Share the Knowledge

                Find this sample useful? Share on

                There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                Help Improve

                Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                Recent Changelog

                • Oct 05, 2014: #252 fixed arquillian configuration for the jobs by John D. Ament
                • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                • Mar 20, 2014: Update arquillian.xml cr1 references to final by Aslak Knutsen
                • Dec 24, 2013: Updated to wildfly 8.0.0.cr1 by Roberto Cortez
                • Dec 02, 2013: Adding arquillian tests to cdi/bean-discovery-none example by Alexis Hassler
                • Dec 01, 2013: Adding arquillian tests to cdi/bean-discovery-annotated example by Alexis Hassler
                • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                • Aug 28, 2013: More explanatory headers by Arun Gupta
                • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                How to help improve this sample
                The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                git clone git://github.com/javaee-samples/javaee7-samples.git
                cd javaee7-samples/cdi/bean-discovery-annotated/

                Do the changes as you see fit and send a pull request!

                Good Luck!

                + \ No newline at end of file diff --git a/sample/cdi-bean-discovery-none/index.html b/sample/cdi-bean-discovery-none/index.html new file mode 100644 index 0000000..f7f39c0 --- /dev/null +++ b/sample/cdi-bean-discovery-none/index.html @@ -0,0 +1,31 @@ +JavaEE Sample::CDI::Bean discovery none

                Bean discovery none

                Run
                How to run the sample
                The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                git clone git://github.com/javaee-samples/javaee7-samples.git
                cd javaee7-samples/cdi/bean-discovery-none/
                Now we are ready to start testing. You can run all the tests in this sample by executing:
                mvn test
                Or you can run individual tests by executing one of the following:
                mvn test -Dtest=GreetingTest

                • Specifications in use:
                  • CDI

                  GreetingTest

                  Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                  Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                  +
                  +
                  @Deployment
                  +public static Archive<?> deploy() {
                  +    return ShrinkWrap.create(JavaArchive.class)
                  +            .addClasses(Greeting.class, FancyGreeting.class)
                  +            .addAsManifestResource("beans.xml");
                  +}
                  +
                  +
                  Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                  +
                  +
                  @Test
                  +public void should_bean_be_injected() throws Exception {
                  +    // Cannot try to inject the bean because it would fail at deployment time (in WildFly 8)
                  +    Set<Bean<?>> beans = beanManager.getBeans(Greeting.class);
                  +    assertThat(beans, is(empty()));
                  +}
                  +
                  +

                  Share the Knowledge

                  Find this sample useful? Share on

                  There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                  Help Improve

                  Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                  Recent Changelog

                  • Oct 05, 2014: #252 fixed arquillian configuration for the jobs by John D. Ament
                  • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                  • Mar 20, 2014: Update arquillian.xml cr1 references to final by Aslak Knutsen
                  • Dec 24, 2013: Updated to wildfly 8.0.0.cr1 by Roberto Cortez
                  • Dec 02, 2013: Adding arquillian tests to cdi/bean-discovery-none example by Alexis Hassler
                  • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                  • Aug 28, 2013: More explanatory headers by Arun Gupta
                  • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                  How to help improve this sample
                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                  git clone git://github.com/javaee-samples/javaee7-samples.git
                  cd javaee7-samples/cdi/bean-discovery-none/

                  Do the changes as you see fit and send a pull request!

                  Good Luck!

                  + \ No newline at end of file diff --git a/sample/cdi-beanmanager/index.html b/sample/cdi-beanmanager/index.html new file mode 100644 index 0000000..9ea04df --- /dev/null +++ b/sample/cdi-beanmanager/index.html @@ -0,0 +1,13 @@ +JavaEE Sample::CDI::Beanmanager

                  Beanmanager

                  Run
                  How to run the sample
                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                  git clone git://github.com/javaee-samples/javaee7-samples.git
                  cd javaee7-samples/cdi/beanmanager/
                  Now we are ready to start testing. You can run all the tests in this sample by executing:
                  mvn test
                  Or you can run individual tests by executing one of the following:

                  Missing a story. Add a test case.Show me how!

                  Share the Knowledge

                  Find this sample useful? Share on

                  There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                  Help Improve

                  Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                  Recent Changelog

                  • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                  • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                  • Aug 28, 2013: Splitting the sample in three different ways to acquire beanmanager by Arun Gupta
                  • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                  How to help improve this sample
                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                  git clone git://github.com/javaee-samples/javaee7-samples.git
                  cd javaee7-samples/cdi/beanmanager/

                  Do the changes as you see fit and send a pull request!

                  Good Luck!

                  + \ No newline at end of file diff --git a/sample/cdi-beansxml-noversion/index.html b/sample/cdi-beansxml-noversion/index.html new file mode 100644 index 0000000..b74b4f4 --- /dev/null +++ b/sample/cdi-beansxml-noversion/index.html @@ -0,0 +1,32 @@ +JavaEE Sample::CDI::Beansxml noversion

                  Beansxml noversion

                  Run
                  How to run the sample
                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                  git clone git://github.com/javaee-samples/javaee7-samples.git
                  cd javaee7-samples/cdi/beansxml-noversion/
                  Now we are ready to start testing. You can run all the tests in this sample by executing:
                  mvn test
                  Or you can run individual tests by executing one of the following:
                  mvn test -Dtest=GreetingTest

                  • Specifications in use:
                    • CDI

                    GreetingTest

                    Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                    Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                    +
                    +
                    @Deployment
                    +public static Archive<?> deploy() {
                    +    return ShrinkWrap.create(JavaArchive.class)
                    +            .addClasses(AnnotatedBean.class, NotAnnotatedBean.class)
                    +            .addAsManifestResource("beans.xml");
                    +}
                    +
                    +
                    Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                    +
                    +
                    @Test
                    +public void should_bean_be_injected() throws Exception {
                    +    assertThat(annotatedBean, is(notNullValue()));
                    +
                    +    // notAnnotatedBean is injected because CDI acts as version 1.0 if version is not explicit
                    +    assertThat(notAnnotatedBean, is(notNullValue()));
                    +}
                    +
                    +

                    Share the Knowledge

                    Find this sample useful? Share on

                    There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                    Help Improve

                    Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                    Recent Changelog

                    • Oct 05, 2014: #252 fixed arquillian configuration for the jobs by John D. Ament
                    • Mar 20, 2014: Update arquillian.xml cr1 references to final by Aslak Knutsen
                    • Dec 24, 2013: Updated to wildfly 8.0.0.cr1 by Roberto Cortez
                    • Dec 03, 2013: Adding arquillian tests to cdi/beansxml-noversion example by Alexis Hassler
                    • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                    • Aug 28, 2013: Better explanatory headers by Arun Gupta
                    • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                    How to help improve this sample
                    The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                    git clone git://github.com/javaee-samples/javaee7-samples.git
                    cd javaee7-samples/cdi/beansxml-noversion/

                    Do the changes as you see fit and send a pull request!

                    Good Luck!

                    + \ No newline at end of file diff --git a/sample/cdi-built-in/index.html b/sample/cdi-built-in/index.html new file mode 100644 index 0000000..4efdbba --- /dev/null +++ b/sample/cdi-built-in/index.html @@ -0,0 +1,13 @@ +JavaEE Sample::CDI::Built in

                    Built in

                    Run
                    How to run the sample
                    The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                    git clone git://github.com/javaee-samples/javaee7-samples.git
                    cd javaee7-samples/cdi/built-in/
                    Now we are ready to start testing. You can run all the tests in this sample by executing:
                    mvn test
                    Or you can run individual tests by executing one of the following:

                    Missing a story. Add a test case.Show me how!

                    Share the Knowledge

                    Find this sample useful? Share on

                    There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                    Help Improve

                    Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                    Recent Changelog

                    • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                    • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                    • Sep 11, 2013: Adding netbeans configuration file by Arun Gupta
                    • Aug 28, 2013: Better explanatory headers by Arun Gupta
                    • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                    How to help improve this sample
                    The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                    git clone git://github.com/javaee-samples/javaee7-samples.git
                    cd javaee7-samples/cdi/built-in/

                    Do the changes as you see fit and send a pull request!

                    Good Luck!

                    + \ No newline at end of file diff --git a/sample/cdi-decorators/index.html b/sample/cdi-decorators/index.html new file mode 100644 index 0000000..ae0beb9 --- /dev/null +++ b/sample/cdi-decorators/index.html @@ -0,0 +1,29 @@ +JavaEE Sample::CDI::Decorators

                    Decorators

                    Run
                    How to run the sample
                    The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                    git clone git://github.com/javaee-samples/javaee7-samples.git
                    cd javaee7-samples/cdi/decorators/
                    Now we are ready to start testing. You can run all the tests in this sample by executing:
                    mvn test
                    Or you can run individual tests by executing one of the following:
                    mvn test -Dtest=DecoratorTest

                    • Specifications in use:
                      • CDI

                      DecoratorTest

                      Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                      Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                      +
                      +
                      @Deployment
                      +public static Archive<?> deploy() throws URISyntaxException {
                      +    return ShrinkWrap.create(JavaArchive.class)
                      +            .addAsManifestResource(new File("src/main/webapp/WEB-INF/beans.xml"), "beans.xml")
                      +            .addPackage(SimpleGreeting.class.getPackage());
                      +}
                      +
                      +
                      Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                      +
                      +
                      @Test
                      +public void test() {
                      +    assertThat(greeting.greet("Duke"), is("Hello Duke very much!"));
                      +}
                      +
                      +

                      Share the Knowledge

                      Find this sample useful? Share on

                      There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                      Help Improve

                      Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                      Recent Changelog

                      • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                      • Dec 03, 2013: Arquillian test for cdi/decorators by nikom
                      • Oct 27, 2013: Adding more descriptive output statement by Arun Gupta
                      • Oct 27, 2013: Changing the greeting part from decorator to be bold by Arun Gupta
                      • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                      • Sep 12, 2013: Using cdi 1.1 "all" style beans.xml by Arun Gupta
                      • Sep 12, 2013: Better headings by Arun Gupta
                      • Aug 28, 2013: Slightly more indicative titles by Arun Gupta
                      • Aug 28, 2013: Made the decorator slightly more meaningful by Arun Gupta
                      • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                      How to help improve this sample
                      The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                      git clone git://github.com/javaee-samples/javaee7-samples.git
                      cd javaee7-samples/cdi/decorators/

                      Do the changes as you see fit and send a pull request!

                      Good Luck!

                      + \ No newline at end of file diff --git a/sample/cdi-events/index.html b/sample/cdi-events/index.html new file mode 100644 index 0000000..bbdabb7 --- /dev/null +++ b/sample/cdi-events/index.html @@ -0,0 +1,40 @@ +JavaEE Sample::CDI::Events

                      Events

                      Run
                      How to run the sample
                      The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                      git clone git://github.com/javaee-samples/javaee7-samples.git
                      cd javaee7-samples/cdi/events/
                      Now we are ready to start testing. You can run all the tests in this sample by executing:
                      mvn test
                      Or you can run individual tests by executing one of the following:
                      mvn test -Dtest=GreetingTest

                      • Specifications in use:
                        • CDI

                        GreetingTest

                        Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                        Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                        +
                        +
                        @Deployment
                        +public static Archive<?> deploy() {
                        +	return ShrinkWrap.create(JavaArchive.class)
                        +			.addClasses(EventReceiver.class, EventSender.class, GreetingReceiver.class, GreetingSender.class)
                        +			.addAsManifestResource("beans.xml");
                        +}
                        +
                        +
                        Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                        +
                        +
                        @Test
                        +public void test() throws Exception {
                        +	assertThat(sender, is(notNullValue()));
                        +	assertThat(sender, instanceOf(GreetingSender.class));
                        +
                        +	assertThat(receiver, is(notNullValue()));
                        +	assertThat(receiver, instanceOf(GreetingReceiver.class));
                        +
                        +	// default greet
                        +	assertEquals("Willkommen", receiver.getGreet());
                        +	// send a new greet
                        +	sender.send("Welcome");
                        +	// receiver must not belongs to the dependent pseudo-scope since we are checking the result
                        +	assertEquals("Welcome", receiver.getGreet());
                        +}
                        +
                        +

                        Share the Knowledge

                        Find this sample useful? Share on

                        There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                        Help Improve

                        Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                        Recent Changelog

                        • Oct 05, 2014: #252 fixed arquillian configuration for the jobs by John D. Ament
                        • Mar 20, 2014: Update arquillian.xml cr1 references to final by Aslak Knutsen
                        • Jan 05, 2014: Added simple event/observer test by Radim Hanus
                        How to help improve this sample
                        The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                        git clone git://github.com/javaee-samples/javaee7-samples.git
                        cd javaee7-samples/cdi/events/

                        Do the changes as you see fit and send a pull request!

                        Good Luck!

                        + \ No newline at end of file diff --git a/sample/cdi-exclude-filter/index.html b/sample/cdi-exclude-filter/index.html new file mode 100644 index 0000000..c1e619e --- /dev/null +++ b/sample/cdi-exclude-filter/index.html @@ -0,0 +1,13 @@ +JavaEE Sample::CDI::Exclude filter

                        Exclude filter

                        Run
                        How to run the sample
                        The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                        git clone git://github.com/javaee-samples/javaee7-samples.git
                        cd javaee7-samples/cdi/exclude-filter/
                        Now we are ready to start testing. You can run all the tests in this sample by executing:
                        mvn test
                        Or you can run individual tests by executing one of the following:

                        Missing a story. Add a test case.Show me how!

                        Share the Knowledge

                        Find this sample useful? Share on

                        There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                        Help Improve

                        Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                        Recent Changelog

                        • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                        • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                        • Aug 28, 2013: More explanatory headers by Arun Gupta
                        • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                        How to help improve this sample
                        The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                        git clone git://github.com/javaee-samples/javaee7-samples.git
                        cd javaee7-samples/cdi/exclude-filter/

                        Do the changes as you see fit and send a pull request!

                        Good Luck!

                        + \ No newline at end of file diff --git a/sample/cdi-extension/index.html b/sample/cdi-extension/index.html new file mode 100644 index 0000000..c65ce00 --- /dev/null +++ b/sample/cdi-extension/index.html @@ -0,0 +1,13 @@ +JavaEE Sample::CDI::Extension

                        Extension

                        Run
                        How to run the sample
                        The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                        git clone git://github.com/javaee-samples/javaee7-samples.git
                        cd javaee7-samples/cdi/extension/
                        Now we are ready to start testing. You can run all the tests in this sample by executing:
                        mvn test
                        Or you can run individual tests by executing one of the following:

                        Missing a story. Add a test case.Show me how!

                        Share the Knowledge

                        Find this sample useful? Share on

                        There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                        Help Improve

                        Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                        Recent Changelog

                        • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                        • Oct 27, 2013: Adding more descriptive output statement by Arun Gupta
                        • Oct 27, 2013: Adding more descriptive output statement by Arun Gupta
                        • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                        • Sep 11, 2013: Updating the extension implementation to show better message by Arun Gupta
                        • Sep 11, 2013: Improving the message by Arun Gupta
                        • Sep 11, 2013: Starting work on cdi extension sample by Arun Gupta
                        How to help improve this sample
                        The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                        git clone git://github.com/javaee-samples/javaee7-samples.git
                        cd javaee7-samples/cdi/extension/

                        Do the changes as you see fit and send a pull request!

                        Good Luck!

                        + \ No newline at end of file diff --git a/sample/cdi-interceptors-priority/index.html b/sample/cdi-interceptors-priority/index.html new file mode 100644 index 0000000..5b57d5d --- /dev/null +++ b/sample/cdi-interceptors-priority/index.html @@ -0,0 +1,36 @@ +JavaEE Sample::CDI::Interceptors priority

                        Interceptors priority

                        Run
                        How to run the sample
                        The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                        git clone git://github.com/javaee-samples/javaee7-samples.git
                        cd javaee7-samples/cdi/interceptors-priority/
                        Now we are ready to start testing. You can run all the tests in this sample by executing:
                        mvn test
                        Or you can run individual tests by executing one of the following:
                        mvn test -Dtest=GreetingTest

                        • Specifications in use:
                          • CDI

                          GreetingTest

                          +

                          Note that beans.xml doesn’t define any interceptor. Interceptors declared using interceptor bindings +are enabled for the entire application and ordered using the Priority annotation.

                          +
                          Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                          +
                          +
                          @Deployment
                          +public static Archive<?> deploy() {
                          +	return ShrinkWrap.create(JavaArchive.class)
                          +			.addClasses(Greeting.class, SimpleGreeting.class, MyInterceptorBinding.class, LowPriorityInterceptor.class, HighPriorityInterceptor.class)
                          +			.addAsManifestResource("beans.xml");
                          +}
                          +
                          +
                          Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                          +
                          +
                          @Test
                          +public void test() throws Exception {
                          +	assertThat(bean, is(notNullValue()));
                          +	assertThat(bean, instanceOf(SimpleGreeting.class));
                          +
                          +	bean.setGreet("Arun");
                          +	assertEquals(bean.getGreet(), "Hi Arun ! Nice to meet you.");
                          +}
                          +
                          +

                          Share the Knowledge

                          Find this sample useful? Share on

                          There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                          Help Improve

                          Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                          Recent Changelog

                          • Oct 05, 2014: #252 fixed arquillian configuration for the jobs by John D. Ament
                          • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                          • Mar 20, 2014: Update arquillian.xml cr1 references to final by Aslak Knutsen
                          • Jan 04, 2014: Fixed pom references to interceptors-priority by Radim Hanus
                          • Jan 03, 2014: Fixed module name to interceptors-priority, removed oracle copyright by Radim Hanus
                          How to help improve this sample
                          The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                          git clone git://github.com/javaee-samples/javaee7-samples.git
                          cd javaee7-samples/cdi/interceptors-priority/

                          Do the changes as you see fit and send a pull request!

                          Good Luck!

                          + \ No newline at end of file diff --git a/sample/cdi-interceptors/index.html b/sample/cdi-interceptors/index.html new file mode 100644 index 0000000..d9b04dc --- /dev/null +++ b/sample/cdi-interceptors/index.html @@ -0,0 +1,33 @@ +JavaEE Sample::CDI::Interceptors

                          Interceptors

                          Run
                          How to run the sample
                          The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                          git clone git://github.com/javaee-samples/javaee7-samples.git
                          cd javaee7-samples/cdi/interceptors/
                          Now we are ready to start testing. You can run all the tests in this sample by executing:
                          mvn test
                          Or you can run individual tests by executing one of the following:
                          mvn test -Dtest=GreetingTest

                          • Specifications in use:
                            • CDI

                            GreetingTest

                            Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                            Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                            +
                            +
                            @Deployment
                            +public static Archive<?> deploy() {
                            +	return ShrinkWrap.create(JavaArchive.class)
                            +			.addClasses(Greeting.class, SimpleGreeting.class, MyInterceptorBinding.class, MyInterceptor.class)
                            +			.addAsManifestResource("beans.xml");
                            +}
                            +
                            +
                            Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                            +
                            +
                            @Test
                            +public void test() throws Exception {
                            +	assertThat(bean, is(notNullValue()));
                            +	assertThat(bean, instanceOf(SimpleGreeting.class));
                            +
                            +	bean.setGreet("Arun");
                            +	assertEquals(bean.getGreet(), "Hi Arun !");
                            +}
                            +
                            +

                            Share the Knowledge

                            Find this sample useful? Share on

                            There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                            Help Improve

                            Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                            Recent Changelog

                            • Oct 05, 2014: #252 fixed arquillian configuration for the jobs by John D. Ament
                            • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                            • Mar 20, 2014: Update arquillian.xml cr1 references to final by Aslak Knutsen
                            • Jan 02, 2014: Converted cdi/interceptors sample to junit&arquillian style by Radim Hanus
                            • Oct 27, 2013: Adding more descriptive output statement by Arun Gupta
                            • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                            • Sep 17, 2013: Cleaning up output messages by Arun Gupta
                            • Aug 28, 2013: Better explanatory headers by Arun Gupta
                            • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                            How to help improve this sample
                            The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                            git clone git://github.com/javaee-samples/javaee7-samples.git
                            cd javaee7-samples/cdi/interceptors/

                            Do the changes as you see fit and send a pull request!

                            Good Luck!

                            + \ No newline at end of file diff --git a/sample/cdi-nobeans-el-injection-flowscoped/index.html b/sample/cdi-nobeans-el-injection-flowscoped/index.html new file mode 100644 index 0000000..42e6ce5 --- /dev/null +++ b/sample/cdi-nobeans-el-injection-flowscoped/index.html @@ -0,0 +1,34 @@ +JavaEE Sample::CDI::Nobeans el injection flowscoped

                            Nobeans el injection flowscoped

                            Run
                            How to run the sample
                            The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                            git clone git://github.com/javaee-samples/javaee7-samples.git
                            cd javaee7-samples/cdi/nobeans-el-injection-flowscoped/
                            Now we are ready to start testing. You can run all the tests in this sample by executing:
                            mvn test
                            Or you can run individual tests by executing one of the following:
                            mvn test -Dtest=FlowScopedBeanTest

                            • Specifications in use:
                              • CDI

                              FlowScopedBeanTest

                              Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                              Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                              +
                              +
                              @Deployment(testable=false)
                              +public static WebArchive deploy() {
                              +    return ShrinkWrap.create(WebArchive.class)
                              +                     .addClass(FlowScopedBean.class)
                              +            .addAsWebInfResource((new File(WEBAPP_SRC + "/WEB-INF", "web.xml")))
                              +            .addAsWebResource((new File(WEBAPP_SRC, "myflow/myflow-flow.xml")), "myflow/myflow-flow.xml")
                              +            .addAsWebResource((new File(WEBAPP_SRC, "myflow/index.xhtml")), "myflow/index.xhtml");
                              +}
                              +
                              +
                              Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                              +
                              +
                              @Test
                              +public void checkRenderedPage() throws Exception {
                              +    WebClient webClient = new WebClient();
                              +    HtmlPage page = webClient.getPage(base + "/faces/myflow/index.xhtml");
                              +    assertNotNull(page);
                              +    assert(page.asText().contains("Hello there!"));
                              +}
                              +
                              +

                              Share the Knowledge

                              Find this sample useful? Share on

                              There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                              Help Improve

                              Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                              Recent Changelog

                              • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                              • Dec 13, 2013: Using htmlunit instead of httpunit by arun-gupta
                              • Dec 12, 2013: Cleaning up imports by arun-gupta
                              • Dec 12, 2013: Added a new test for @flowscoped bean and el injection by arun-gupta
                              How to help improve this sample
                              The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                              git clone git://github.com/javaee-samples/javaee7-samples.git
                              cd javaee7-samples/cdi/nobeans-el-injection-flowscoped/

                              Do the changes as you see fit and send a pull request!

                              Good Luck!

                              + \ No newline at end of file diff --git a/sample/cdi-nobeans-el-injection/index.html b/sample/cdi-nobeans-el-injection/index.html new file mode 100644 index 0000000..23a9e62 --- /dev/null +++ b/sample/cdi-nobeans-el-injection/index.html @@ -0,0 +1,33 @@ +JavaEE Sample::CDI::Nobeans el injection

                              Nobeans el injection

                              Run
                              How to run the sample
                              The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                              git clone git://github.com/javaee-samples/javaee7-samples.git
                              cd javaee7-samples/cdi/nobeans-el-injection/
                              Now we are ready to start testing. You can run all the tests in this sample by executing:
                              mvn test
                              Or you can run individual tests by executing one of the following:
                              mvn test -Dtest=ScopedBeanTest

                              • Specifications in use:
                                • CDI

                                ScopedBeanTest

                                Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                +
                                +
                                @Deployment(testable=false)
                                +public static WebArchive deploy() {
                                +    return ShrinkWrap.create(WebArchive.class)
                                +                     .addClass(ScopedBean.class)
                                +            .addAsWebInfResource((new File(WEBAPP_SRC + "/WEB-INF", "web.xml")))
                                +            .addAsWebResource((new File(WEBAPP_SRC, "index.xhtml")));
                                +}
                                +
                                +
                                Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                +
                                +
                                @Test
                                +public void checkRenderedPage() throws Exception {
                                +    WebConversation conv = new WebConversation();
                                +    GetMethodWebRequest getRequest = new GetMethodWebRequest(base + "/faces/index.xhtml");
                                +    String responseText = conv.getResponse(getRequest).getText();
                                +    assert(responseText.contains("Hello there!"));
                                +}
                                +
                                +

                                Share the Knowledge

                                Find this sample useful? Share on

                                There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                Help Improve

                                Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                Recent Changelog

                                • Dec 11, 2013: Adding a new sample/test to check for el injection without beans.xml by arun-gupta
                                How to help improve this sample
                                The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                git clone git://github.com/javaee-samples/javaee7-samples.git
                                cd javaee7-samples/cdi/nobeans-el-injection/

                                Do the changes as you see fit and send a pull request!

                                Good Luck!

                                + \ No newline at end of file diff --git a/sample/cdi-nobeans-xml/index.html b/sample/cdi-nobeans-xml/index.html new file mode 100644 index 0000000..e46e012 --- /dev/null +++ b/sample/cdi-nobeans-xml/index.html @@ -0,0 +1,28 @@ +JavaEE Sample::CDI::Nobeans xml

                                Nobeans xml

                                Run
                                How to run the sample
                                The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                git clone git://github.com/javaee-samples/javaee7-samples.git
                                cd javaee7-samples/cdi/nobeans-xml/
                                Now we are ready to start testing. You can run all the tests in this sample by executing:
                                mvn test
                                Or you can run individual tests by executing one of the following:
                                mvn test -Dtest=ScopedBeanTest

                                • Specifications in use:
                                  • CDI

                                  ScopedBeanTest

                                  Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                  Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                  +
                                  +
                                  @Deployment
                                  +public static Archive<?> deploy() {
                                  +    return ShrinkWrap.create(JavaArchive.class)
                                  +                     .addClass(ScopedBean.class);
                                  +}
                                  +
                                  +
                                  Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                  +
                                  +
                                  @Test
                                  +public void should_scope_bean_be_injected() throws Exception {
                                  +    assertThat(bean, is(notNullValue()));
                                  +}
                                  +
                                  +

                                  Share the Knowledge

                                  Find this sample useful? Share on

                                  There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                  Help Improve

                                  Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                  Recent Changelog

                                  • Oct 05, 2014: #252 fixed arquillian configuration for the jobs by John D. Ament
                                  • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                  • Mar 20, 2014: Update arquillian.xml cr1 references to final by Aslak Knutsen
                                  • Dec 24, 2013: Updated to wildfly 8.0.0.cr1 by Roberto Cortez
                                  • Nov 13, 2013: Added arquillian test for the cdi/nobeans-xml example by Alexis Hassler
                                  • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                  • Aug 28, 2013: Better explanatory headers by Arun Gupta
                                  • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                  How to help improve this sample
                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                  cd javaee7-samples/cdi/nobeans-xml/

                                  Do the changes as you see fit and send a pull request!

                                  Good Luck!

                                  + \ No newline at end of file diff --git a/sample/cdi-pkg-level/index.html b/sample/cdi-pkg-level/index.html new file mode 100644 index 0000000..cbd859d --- /dev/null +++ b/sample/cdi-pkg-level/index.html @@ -0,0 +1,13 @@ +JavaEE Sample::CDI::Pkg level

                                  Pkg level

                                  Run
                                  How to run the sample
                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                  cd javaee7-samples/cdi/pkg-level/
                                  Now we are ready to start testing. You can run all the tests in this sample by executing:
                                  mvn test
                                  Or you can run individual tests by executing one of the following:

                                  Missing a story. Add a test case.Show me how!

                                  Share the Knowledge

                                  Find this sample useful? Share on

                                  There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                  Help Improve

                                  Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                  Recent Changelog

                                  • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                  • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                  • Sep 12, 2013: Using cdi 1.1 "all" style beans.xml by Arun Gupta
                                  • Sep 12, 2013: Better headings by Arun Gupta
                                  • Aug 28, 2013: Slightly more indicative titles by Arun Gupta
                                  • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                  How to help improve this sample
                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                  cd javaee7-samples/cdi/pkg-level/

                                  Do the changes as you see fit and send a pull request!

                                  Good Luck!

                                  + \ No newline at end of file diff --git a/sample/cdi-scopes/index.html b/sample/cdi-scopes/index.html new file mode 100644 index 0000000..ede2781 --- /dev/null +++ b/sample/cdi-scopes/index.html @@ -0,0 +1,13 @@ +JavaEE Sample::CDI::scopes

                                  scopes

                                  Run
                                  How to run the sample
                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                  cd javaee7-samples/cdi/scopes/
                                  Now we are ready to start testing. You can run all the tests in this sample by executing:
                                  mvn test
                                  Or you can run individual tests by executing one of the following:

                                  Missing a story. Add a test case.Show me how!

                                  Share the Knowledge

                                  Find this sample useful? Share on

                                  There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                  Help Improve

                                  Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                  Recent Changelog

                                  • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                  • Jul 03, 2014: Fixed scope of mysingletonscopedbean to really be @singelton by Arend.von.Reinersdorff
                                  • Apr 06, 2014: Added correct scope annotation by abhirockzz
                                  • Apr 06, 2014: Added correct scope annotation by abhirockzz
                                  • Sep 20, 2013: Starting work on a new sample to show cdi scopes by Arun Gupta
                                  How to help improve this sample
                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                  cd javaee7-samples/cdi/scopes/

                                  Do the changes as you see fit and send a pull request!

                                  Good Luck!

                                  + \ No newline at end of file diff --git a/sample/cdi-vetoed/index.html b/sample/cdi-vetoed/index.html new file mode 100644 index 0000000..5c84562 --- /dev/null +++ b/sample/cdi-vetoed/index.html @@ -0,0 +1,13 @@ +JavaEE Sample::CDI::Vetoed

                                  Vetoed

                                  Run
                                  How to run the sample
                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                  cd javaee7-samples/cdi/vetoed/
                                  Now we are ready to start testing. You can run all the tests in this sample by executing:
                                  mvn test
                                  Or you can run individual tests by executing one of the following:

                                  Missing a story. Add a test case.Show me how!

                                  Share the Knowledge

                                  Find this sample useful? Share on

                                  There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                  Help Improve

                                  Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                  Recent Changelog

                                  • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                  • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                  • Aug 28, 2013: Slightly more indicative titles by Arun Gupta
                                  • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                  How to help improve this sample
                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                  cd javaee7-samples/cdi/vetoed/

                                  Do the changes as you see fit and send a pull request!

                                  Good Luck!

                                  + \ No newline at end of file diff --git a/sample/concurrency-dynamicproxy/index.html b/sample/concurrency-dynamicproxy/index.html new file mode 100644 index 0000000..d6b7550 --- /dev/null +++ b/sample/concurrency-dynamicproxy/index.html @@ -0,0 +1,13 @@ +JavaEE Sample::Concurrency::Dynamicproxy

                                  Dynamicproxy

                                  Run
                                  How to run the sample
                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                  cd javaee7-samples/concurrency/dynamicproxy/
                                  Now we are ready to start testing. You can run all the tests in this sample by executing:
                                  mvn test
                                  Or you can run individual tests by executing one of the following:

                                  Missing a story. Add a test case.Show me how!

                                  Share the Knowledge

                                  Find this sample useful? Share on

                                  There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                  Help Improve

                                  Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                  Recent Changelog

                                  • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                  • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                  • Aug 28, 2013: Using more meaningful titles by Arun Gupta
                                  • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                  How to help improve this sample
                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                  cd javaee7-samples/concurrency/dynamicproxy/

                                  Do the changes as you see fit and send a pull request!

                                  Good Luck!

                                  + \ No newline at end of file diff --git a/sample/concurrency-managedexecutor/index.html b/sample/concurrency-managedexecutor/index.html new file mode 100644 index 0000000..2a53509 --- /dev/null +++ b/sample/concurrency-managedexecutor/index.html @@ -0,0 +1,223 @@ +JavaEE Sample::Concurrency::Managedexecutor

                                  Managedexecutor

                                  Run
                                  How to run the sample
                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                  cd javaee7-samples/concurrency/managedexecutor/
                                  Now we are ready to start testing. You can run all the tests in this sample by executing:
                                  mvn test
                                  Or you can run individual tests by executing one of the following:
                                  mvn test -Dtest=ExecutorJNDITestmvn test -Dtest=ExecutorInjectTest

                                  ExecutorJNDITest

                                  Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                  Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                  +
                                  +
                                  @Deployment
                                  +public static WebArchive createDeployment() {
                                  +    return ShrinkWrap.create(WebArchive.class).
                                  +            addClasses(MyRunnableTask.class,
                                  +                    MyCallableTask.class,
                                  +                    Product.class,
                                  +                    TestStatus.class);
                                  +}
                                  +
                                  +
                                  Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                  +
                                  +
                                  @Test
                                  +public void testSubmitWithRunnableDefault() throws Exception {
                                  +    TestStatus.latch = new CountDownLatch(1);
                                  +    defaultExecutor.submit(runnableTask);
                                  +    assertTrue(TestStatus.latch.await(2000, TimeUnit.MILLISECONDS));
                                  +}
                                  +
                                  +
                                  Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                  +
                                  +
                                  @Test
                                  +public void testSubmitWithCallableDefault() throws Exception {
                                  +    TestStatus.latch = new CountDownLatch(1);
                                  +    Future<Product> future = defaultExecutor.submit(callableTask);
                                  +    assertTrue(TestStatus.latch.await(2000, TimeUnit.MILLISECONDS));
                                  +    assertEquals(1, future.get().getId());
                                  +}
                                  +
                                  +
                                  Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                  +
                                  +
                                  @Test
                                  +public void testInvokeAllWithCallableDefault() throws Exception {
                                  +    List<Future<Product>> results = defaultExecutor.invokeAll(callableTasks);
                                  +    int count = 0;
                                  +    for (Future<Product> f : results) {
                                  +        assertEquals(count++, f.get().getId());
                                  +    }
                                  +}
                                  +
                                  +
                                  Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                  +
                                  +
                                  @Test
                                  +public void testInvokeAnyWithCallableDefault() throws Exception {
                                  +    Product results = defaultExecutor.invokeAny(callableTasks);
                                  +    assertTrue(results.getId() >= 0);
                                  +    assertTrue(results.getId() <= 5);
                                  +}
                                  +
                                  +

                                  ExecutorInjectTest

                                  Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                  Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                  +
                                  +
                                  @Deployment
                                  +public static WebArchive createDeployment() {
                                  +    return ShrinkWrap.create(WebArchive.class).
                                  +            addClasses(MyRunnableTask.class,
                                  +                    MyCallableTask.class,
                                  +                    Product.class,
                                  +                    TestStatus.class,
                                  +                    MyTaskWithListener.class,
                                  +                    MyTaskWithTransaction.class,
                                  +                    MyTransactionScopedBean.class,
                                  +                    TestBean.class).
                                  +            setWebXML(new FileAsset(new File("src/main/webapp/WEB-INF/web.xml"))).
                                  +            addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml"); // Adding beans.xml shouldn't be required? WildFly Beta1
                                  +}
                                  +
                                  +
                                  Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                  +
                                  +
                                  @Test
                                  +public void testSubmitWithRunnableDefault() throws Exception {
                                  +    TestStatus.latch = new CountDownLatch(1);
                                  +    defaultExecutor.submit(runnableTask);
                                  +    assertTrue(TestStatus.latch.await(2000, TimeUnit.MILLISECONDS));
                                  +}
                                  +
                                  +
                                  Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                  +
                                  +
                                  @Test
                                  +public void testSubmitWithCallableDefault() throws Exception {
                                  +    TestStatus.latch = new CountDownLatch(1);
                                  +    Future<Product> future = defaultExecutor.submit(callableTask);
                                  +    assertTrue(TestStatus.latch.await(2000, TimeUnit.MILLISECONDS));
                                  +    assertEquals(1, future.get().getId());
                                  +}
                                  +
                                  +
                                  Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                  +
                                  +
                                  @Test
                                  +public void testInvokeAllWithCallableDefault() throws Exception {
                                  +    List<Future<Product>> results = defaultExecutor.invokeAll(callableTasks);
                                  +    int count = 0;
                                  +    for (Future<Product> f : results) {
                                  +        assertEquals(count++, f.get().getId());
                                  +    }
                                  +}
                                  +
                                  +
                                  Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                  +
                                  +
                                  @Test
                                  +public void testInvokeAnyWithCallableDefault() throws Exception {
                                  +    Product results = defaultExecutor.invokeAny(callableTasks);
                                  +    assertTrue(results.getId() >= 0);
                                  +    assertTrue(results.getId() <= 5);
                                  +}
                                  +
                                  +
                                  Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                  +
                                  +
                                  @Test
                                  +public void testSubmitWithRunnableNoName() throws Exception {
                                  +    TestStatus.latch = new CountDownLatch(1);
                                  +    executorNoName.submit(runnableTask);
                                  +    assertTrue(TestStatus.latch.await(2000, TimeUnit.MILLISECONDS));
                                  +}
                                  +
                                  +
                                  Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                  +
                                  +
                                  @Test
                                  +public void testSubmitWithCallableNoName() throws Exception {
                                  +    TestStatus.latch = new CountDownLatch(1);
                                  +    Future<Product> future = executorNoName.submit(callableTask);
                                  +    assertTrue(TestStatus.latch.await(2000, TimeUnit.MILLISECONDS));
                                  +    assertEquals(1, future.get().getId());
                                  +}
                                  +
                                  +
                                  Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                  +
                                  +
                                  @Test
                                  +public void testInvokeAllWithCallableNoName() throws Exception {
                                  +    List<Future<Product>> results = executorNoName.invokeAll(callableTasks);
                                  +    int count = 0;
                                  +    for (Future<Product> f : results) {
                                  +        assertEquals(count++, f.get().getId());
                                  +    }
                                  +}
                                  +
                                  +
                                  Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                  +
                                  +
                                  @Test
                                  +public void testInvokeAnyWithCallableNoName() throws Exception {
                                  +    Product results = executorNoName.invokeAny(callableTasks);
                                  +    assertTrue(results.getId() >= 0);
                                  +    assertTrue(results.getId() <= 5);
                                  +}
                                  +
                                  +
                                  Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                  +
                                  +
                                  @Test
                                  +public void testSubmitWithRunnableFromWebXML() throws Exception {
                                  +    TestStatus.latch = new CountDownLatch(1);
                                  +    executorFromWebXml.submit(new MyRunnableTask());
                                  +    assertTrue(TestStatus.latch.await(2000, TimeUnit.MILLISECONDS));
                                  +}
                                  +
                                  +
                                  Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                  +
                                  +
                                  @Test
                                  +public void testSubmitWithCallableFromWebXML() throws Exception {
                                  +    TestStatus.latch = new CountDownLatch(1);
                                  +    Future<Product> future = executorFromWebXml.submit(new MyCallableTask(1));
                                  +    assertTrue(TestStatus.latch.await(2000, TimeUnit.MILLISECONDS));
                                  +    assertEquals(1, future.get().getId());
                                  +}
                                  +
                                  +
                                  Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                  +
                                  +
                                  @Test
                                  +public void testInvokeAllWithCallableFromWebXML() throws Exception {
                                  +    List<Future<Product>> results = executorFromWebXml.invokeAll(callableTasks);
                                  +    int count = 0;
                                  +    for (Future<Product> f : results) {
                                  +        assertEquals(count++, f.get().getId());
                                  +    }
                                  +}
                                  +
                                  +
                                  Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                  +
                                  +
                                  @Test
                                  +public void testInvokeAnyWithCallableFromWebXML() throws Exception {
                                  +    Product results = executorFromWebXml.invokeAny(callableTasks);
                                  +    assertTrue(results.getId() >= 0);
                                  +    assertTrue(results.getId() <= 5);
                                  +}
                                  +
                                  +
                                  Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                  +
                                  +
                                  @Test
                                  +public void testSubmitWithListener() throws Exception {
                                  +    TestStatus.latch = new CountDownLatch(1);
                                  +    defaultExecutor.submit(taskWithListener);
                                  +    assertTrue(TestStatus.latch.await(2000, TimeUnit.MILLISECONDS));
                                  +}
                                  +
                                  +
                                  Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                  +
                                  +
                                  @Test
                                  +public void testSubmitWithTransaction() throws Exception {
                                  +    TestStatus.latch = new CountDownLatch(1);
                                  +    defaultExecutor.submit(taskWithTransaction);
                                  +    assertTrue(TestStatus.latch.await(2000, TimeUnit.MILLISECONDS));
                                  +    assertTrue(TestStatus.foundTransactionScopedBean);
                                  +}
                                  +
                                  +
                                  Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                  +
                                  +
                                  @Test
                                  +public void testSubmitWithEJB() throws Exception {
                                  +    assertTrue(ejb.doSomething());
                                  +}
                                  +
                                  +

                                  Share the Knowledge

                                  Find this sample useful? Share on

                                  There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                  Help Improve

                                  Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                  Recent Changelog

                                  • Oct 05, 2014: #252 fixed arquillian configuration for the jobs by John D. Ament
                                  • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                  • Mar 20, 2014: Update arquillian.xml cr1 references to final by Aslak Knutsen
                                  • Dec 24, 2013: Updated to wildfly 8.0.0.cr1 by Roberto Cortez
                                  • Nov 28, 2013: Inject mytaskwithtransaction to use managed tx by Aslak Knutsen
                                  • Nov 28, 2013: Using countdownlatch for more accurate test result calculation and adding some more tests by arun-gupta
                                  • Nov 27, 2013: Fixed the test by arun-gupta
                                  • Nov 27, 2013: Use servlet 3.0 protocol for concurrent tests by Aslak Knutsen
                                  • Nov 27, 2013: Missed a file by arun-gupta
                                  • Nov 27, 2013: Adding new unit tests, arquillian-enabling them by arun-gupta
                                  How to help improve this sample
                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                  cd javaee7-samples/concurrency/managedexecutor/

                                  Do the changes as you see fit and send a pull request!

                                  Good Luck!

                                  + \ No newline at end of file diff --git a/sample/concurrency-managedscheduledexecutor/index.html b/sample/concurrency-managedscheduledexecutor/index.html new file mode 100644 index 0000000..df8cc70 --- /dev/null +++ b/sample/concurrency-managedscheduledexecutor/index.html @@ -0,0 +1,13 @@ +JavaEE Sample::Concurrency::managedscheduledexecutor

                                  managedscheduledexecutor

                                  Run
                                  How to run the sample
                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                  cd javaee7-samples/concurrency/managedscheduledexecutor/
                                  Now we are ready to start testing. You can run all the tests in this sample by executing:
                                  mvn test
                                  Or you can run individual tests by executing one of the following:

                                  Missing a story. Add a test case.Show me how!

                                  Share the Knowledge

                                  Find this sample useful? Share on

                                  There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                  Help Improve

                                  Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                  Recent Changelog

                                  • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                  • Mar 25, 2014: Simple implementation of mytrigger by Alexander Heusingfeld
                                  • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                  • Sep 15, 2013: Changing to scheduleatfixedrate by Arun Gupta
                                  • Sep 14, 2013: Changing schedule to managedscheduledexecutor, also changed the servlet names to be more intuitive by Arun Gupta
                                  How to help improve this sample
                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                  cd javaee7-samples/concurrency/managedscheduledexecutor/

                                  Do the changes as you see fit and send a pull request!

                                  Good Luck!

                                  + \ No newline at end of file diff --git a/sample/concurrency-managedthreadfactory/index.html b/sample/concurrency-managedthreadfactory/index.html new file mode 100644 index 0000000..d40a05c --- /dev/null +++ b/sample/concurrency-managedthreadfactory/index.html @@ -0,0 +1,13 @@ +JavaEE Sample::Concurrency::managedthreadfactory

                                  managedthreadfactory

                                  Run
                                  How to run the sample
                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                  cd javaee7-samples/concurrency/managedthreadfactory/
                                  Now we are ready to start testing. You can run all the tests in this sample by executing:
                                  mvn test
                                  Or you can run individual tests by executing one of the following:
                                  mvn test -Dtest=MyTaskTest

                                  MyTaskTest

                                  Missing a description for the story. Add some javadoc to the TestClass. Show me how!

                                  Share the Knowledge

                                  Find this sample useful? Share on

                                  There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                  Help Improve

                                  Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                  Recent Changelog

                                  • Jul 15, 2014: Removed default header by Roberto Cortez
                                  • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                  • Nov 08, 2013: Commenting the test for now until jndi lookup is figured out correctly by Arun Gupta
                                  • Nov 07, 2013: Refactored the package name to match the project name by Arun Gupta
                                  • Nov 07, 2013: Changed manageablethread to managedthreadfactory - better/intuitive name for the module by Arun Gupta
                                  How to help improve this sample
                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                  cd javaee7-samples/concurrency/managedthreadfactory/

                                  Do the changes as you see fit and send a pull request!

                                  Good Luck!

                                  + \ No newline at end of file diff --git a/sample/ejb-async-ejb/index.html b/sample/ejb-async-ejb/index.html new file mode 100644 index 0000000..210cd32 --- /dev/null +++ b/sample/ejb-async-ejb/index.html @@ -0,0 +1,89 @@ +JavaEE Sample::EJB::Async ejb

                                  Async ejb

                                  Run
                                  How to run the sample
                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                  cd javaee7-samples/ejb/async-ejb/
                                  Now we are ready to start testing. You can run all the tests in this sample by executing:
                                  mvn test
                                  Or you can run individual tests by executing one of the following:
                                  mvn test -Dtest=AsyncClassBeanTestmvn test -Dtest=AsyncMethodBeanTest

                                  AsyncClassBeanTest

                                  Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                  Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                  +
                                  +
                                  @Deployment
                                  +public static WebArchive createDeployment() {
                                  +    File[] jars = Maven.resolver().loadPomFromFile("pom.xml")
                                  +            .resolve("com.jayway.awaitility:awaitility")
                                  +            .withTransitivity().asFile();
                                  +
                                  +    return ShrinkWrap.create(WebArchive.class)
                                  +            .addAsLibraries(jars)
                                  +            .addClasses(MyAsyncBeanClassLevel.class)
                                  +            .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
                                  +}
                                  +
                                  +
                                  Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                  +
                                  +
                                  @Test
                                  +public void should_return_async_sum() throws ExecutionException, InterruptedException {
                                  +    final Integer numberOne = 5;
                                  +    final Integer numberTwo = 10;
                                  +
                                  +
                                  +    long start = System.currentTimeMillis();
                                  +    final Future<Integer> resultFuture = bean.addNumbers(numberOne, numberTwo);
                                  +
                                  +    assertThat(resultFuture.isDone(), is(equalTo(false)));
                                  +    assertThat(System.currentTimeMillis() - start, is(lessThan(MyAsyncBeanMethodLevel.AWAIT)));
                                  +
                                  +    await().until(new Callable<Boolean>() {
                                  +        @Override
                                  +        public Boolean call() throws Exception {
                                  +            return resultFuture.isDone();
                                  +        }
                                  +    });
                                  +
                                  +    assertThat(resultFuture.get(), is(equalTo(numberOne + numberTwo)));
                                  +}
                                  +
                                  +

                                  AsyncMethodBeanTest

                                  Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                  Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                  +
                                  +
                                  @Deployment
                                  +public static WebArchive createDeployment() {
                                  +    File[] jars = Maven.resolver().loadPomFromFile("pom.xml")
                                  +            .resolve("com.jayway.awaitility:awaitility")
                                  +            .withTransitivity().asFile();
                                  +
                                  +    return ShrinkWrap.create(WebArchive.class)
                                  +            .addAsLibraries(jars)
                                  +            .addClasses(MyAsyncBeanMethodLevel.class)
                                  +            .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
                                  +}
                                  +
                                  +
                                  Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                  +
                                  +
                                  @Test
                                  +public void should_return_async_sum() throws ExecutionException, InterruptedException {
                                  +    final Integer numberOne = 5;
                                  +    final Integer numberTwo = 10;
                                  +
                                  +
                                  +    long start = System.currentTimeMillis();
                                  +    final Future<Integer> resultFuture = bean.addNumbers(numberOne, numberTwo);
                                  +
                                  +    assertThat(resultFuture.isDone(), is(equalTo(false)));
                                  +    assertThat(System.currentTimeMillis() - start, is(lessThan(MyAsyncBeanMethodLevel.AWAIT)));
                                  +
                                  +    await().until(new Callable<Boolean>() {
                                  +        @Override
                                  +        public Boolean call() throws Exception {
                                  +            return resultFuture.isDone();
                                  +        }
                                  +    });
                                  +
                                  +    assertThat(resultFuture.get(), is(equalTo(numberOne + numberTwo)));
                                  +}
                                  +
                                  +

                                  Share the Knowledge

                                  Find this sample useful? Share on

                                  There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                  Help Improve

                                  Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                  Recent Changelog

                                  • Jul 15, 2014: Removed default header by Roberto Cortez
                                  • Dec 07, 2013: Wrong class name by kubamarchwicki
                                  • Dec 07, 2013: #75 asynchronous ejb test by kubamarchwicki
                                  • Nov 09, 2013: Adding class-level and method-level annotations by Arun Gupta
                                  • Nov 09, 2013: Adding @asynchronous on method - works on both wildfly and glassfish by Arun Gupta
                                  • Nov 09, 2013: New sample for asynchronous ejb - need to add different use cases by Arun Gupta
                                  How to help improve this sample
                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                  cd javaee7-samples/ejb/async-ejb/

                                  Do the changes as you see fit and send a pull request!

                                  Good Luck!

                                  + \ No newline at end of file diff --git a/sample/ejb-embeddable/index.html b/sample/ejb-embeddable/index.html new file mode 100644 index 0000000..ea2f431 --- /dev/null +++ b/sample/ejb-embeddable/index.html @@ -0,0 +1,13 @@ +JavaEE Sample::EJB::Embeddable

                                  Embeddable

                                  Run
                                  How to run the sample
                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                  cd javaee7-samples/ejb/embeddable/
                                  Now we are ready to start testing. You can run all the tests in this sample by executing:
                                  mvn test
                                  Or you can run individual tests by executing one of the following:
                                  mvn test -Dtest=MyBeanTest

                                  • Specifications in use:
                                    • EJB

                                    MyBeanTest

                                    Missing a description for the story. Add some javadoc to the TestClass. Show me how!

                                    Share the Knowledge

                                    Find this sample useful? Share on

                                    There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                    Help Improve

                                    Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                    Recent Changelog

                                    • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                    • Nov 08, 2013: Cleaning up the test and commented as support for this api is optional by Arun Gupta
                                    • Oct 31, 2013: Enabled the test by Arun Gupta
                                    • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                    How to help improve this sample
                                    The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                    git clone git://github.com/javaee-samples/javaee7-samples.git
                                    cd javaee7-samples/ejb/embeddable/

                                    Do the changes as you see fit and send a pull request!

                                    Good Luck!

                                    + \ No newline at end of file diff --git a/sample/ejb-lifecycle/index.html b/sample/ejb-lifecycle/index.html new file mode 100644 index 0000000..e0573c7 --- /dev/null +++ b/sample/ejb-lifecycle/index.html @@ -0,0 +1,13 @@ +JavaEE Sample::EJB::Lifecycle

                                    Lifecycle

                                    Run
                                    How to run the sample
                                    The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                    git clone git://github.com/javaee-samples/javaee7-samples.git
                                    cd javaee7-samples/ejb/lifecycle/
                                    Now we are ready to start testing. You can run all the tests in this sample by executing:
                                    mvn test
                                    Or you can run individual tests by executing one of the following:

                                    Missing a story. Add a test case.Show me how!

                                    Share the Knowledge

                                    Find this sample useful? Share on

                                    There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                    Help Improve

                                    Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                    Recent Changelog

                                    • Oct 30, 2014: Remove extra lifecycle callback param by Andrew Guibert
                                    • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                    • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                    • Aug 29, 2013: Better messages by Arun Gupta
                                    • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                    How to help improve this sample
                                    The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                    git clone git://github.com/javaee-samples/javaee7-samples.git
                                    cd javaee7-samples/ejb/lifecycle/

                                    Do the changes as you see fit and send a pull request!

                                    Good Luck!

                                    + \ No newline at end of file diff --git a/sample/ejb-singleton/index.html b/sample/ejb-singleton/index.html new file mode 100644 index 0000000..c8363b4 --- /dev/null +++ b/sample/ejb-singleton/index.html @@ -0,0 +1,13 @@ +JavaEE Sample::EJB::Singleton

                                    Singleton

                                    Run
                                    How to run the sample
                                    The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                    git clone git://github.com/javaee-samples/javaee7-samples.git
                                    cd javaee7-samples/ejb/singleton/
                                    Now we are ready to start testing. You can run all the tests in this sample by executing:
                                    mvn test
                                    Or you can run individual tests by executing one of the following:

                                    Missing a story. Add a test case.Show me how!

                                    Share the Knowledge

                                    Find this sample useful? Share on

                                    There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                    Help Improve

                                    Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                    Recent Changelog

                                    • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                    • Feb 08, 2014: Fix package name :) by OndraZizka
                                    • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                    • Aug 29, 2013: Cleaner output messages by Arun Gupta
                                    • Aug 29, 2013: New sample to show singleton session bean - both container-managed and application-managed concurrency by Arun Gupta
                                    How to help improve this sample
                                    The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                    git clone git://github.com/javaee-samples/javaee7-samples.git
                                    cd javaee7-samples/ejb/singleton/

                                    Do the changes as you see fit and send a pull request!

                                    Good Luck!

                                    + \ No newline at end of file diff --git a/sample/ejb-stateful/index.html b/sample/ejb-stateful/index.html new file mode 100644 index 0000000..e2f4a8c --- /dev/null +++ b/sample/ejb-stateful/index.html @@ -0,0 +1,233 @@ +JavaEE Sample::EJB::Stateful

                                    Stateful

                                    Run
                                    How to run the sample
                                    The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                    git clone git://github.com/javaee-samples/javaee7-samples.git
                                    cd javaee7-samples/ejb/stateful/
                                    Now we are ready to start testing. You can run all the tests in this sample by executing:
                                    mvn test
                                    Or you can run individual tests by executing one of the following:
                                    mvn test -Dtest=CartBeanWithInterfaceTestmvn test -Dtest=CartBeanStatefulnessTestmvn test -Dtest=ReentrantCallTestmvn test -Dtest=CartBeanTest

                                    CartBeanWithInterfaceTest

                                    Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                    Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                    +
                                    +
                                    @Deployment
                                    +public static Archive<?> deployment() {
                                    +	return ShrinkWrap.create(JavaArchive.class)
                                    +			.addClass(Cart.class)
                                    +			.addClass(CartBeanWithInterface.class)
                                    +			.addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
                                    +}
                                    +
                                    +
                                    +

                                    Test of addItem method, of class CartBean

                                    +
                                    +
                                    +
                                    @Test
                                    +public void shouldAddOneItem() throws Exception {
                                    +	// given
                                    +
                                    +	// when
                                    +	sut.addItem("apple");
                                    +
                                    +	// then
                                    +	assertThat(sut.getItems(), hasItem("apple"));
                                    +}
                                    +
                                    +
                                    +

                                    Test of addItem method, of class CartBean

                                    +
                                    +
                                    +
                                    @Test
                                    +public void shouldAddManyItems() throws Exception {
                                    +	// given
                                    +	final List<String> items = Arrays.asList("apple", "banana", "mango", "kiwi", "passion fruit");
                                    +
                                    +	// when
                                    +	for (final String item : items) {
                                    +		sut.addItem(item);
                                    +	}
                                    +
                                    +	// then
                                    +	assertThat(sut.getItems(), is(items));
                                    +}
                                    +
                                    +
                                    +

                                    Test of removeItem method, of class CartBean

                                    +
                                    +
                                    +
                                    @Test
                                    +public void shouldRemoveOneItem() throws Exception {
                                    +	// given
                                    +	final List<String> items = Arrays.asList("apple", "banana", "mango", "kiwi", "passion fruit");
                                    +	for (final String item : items) {
                                    +		sut.addItem(item);
                                    +	}
                                    +
                                    +	// when
                                    +	sut.removeItem("banana");
                                    +
                                    +	// then
                                    +	assertThat(sut.getItems(), not(hasItem("banana")));
                                    +}
                                    +
                                    +
                                    +

                                    Test of getItems method, of class CartBean

                                    +
                                    +
                                    +
                                    @Test
                                    +public void shouldBeEmpty() throws Exception {
                                    +	// given
                                    +
                                    +	// when
                                    +	final List<String> actual = sut.getItems();
                                    +
                                    +	// then
                                    +	assertThat(actual.isEmpty(), is(true));
                                    +}
                                    +
                                    +

                                    CartBeanStatefulnessTest

                                    Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                    Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                    +
                                    +
                                    @Deployment
                                    +public static Archive<?> deployment() {
                                    +	return ShrinkWrap.create(JavaArchive.class, "test.jar")
                                    +			.addClass(CartBean.class)
                                    +			.addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
                                    +}
                                    +
                                    +
                                    +

                                    JSR 318: Enterprise JavaBeans, Version 3.1 +3.4.7.1 Session Object Identity / Stateful Session Beans

                                    +
                                    +
                                    +

                                    A stateful session object has a unique identity that is assigned by +the container at the time the object is created. A client of the stateful +session bean business interface can determine if two business interface +or no-interface view references refer to the same session object +by use of the equals method

                                    +
                                    +
                                    +
                                    @Test
                                    +@InSequence(1)
                                    +public void should_not_be_identical_beans() {
                                    +    assertThat("Expect different instances", bean1, is(not(bean2)));
                                    +}
                                    +
                                    +
                                    Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                    +
                                    +
                                    @Test
                                    +   @InSequence(2)
                                    +public void should_add_items_to_first_cart() {
                                    +	// when
                                    +	bean1.addItem(item_to_add);
                                    +
                                    +	// then
                                    +	assertThat(bean1.getItems(), hasItem(item_to_add));
                                    +}
                                    +
                                    +
                                    Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                    +
                                    +
                                    @Test
                                    +   @InSequence(3)
                                    +public void should_not_contain_any_items_in_second_cart() {
                                    +	assertThat(bean2.getItems().isEmpty(), is(true));
                                    +}
                                    +
                                    +

                                    ReentrantCallTest

                                    +

                                    This tests that a stateful bean is capable of calling a method via +a business proxy on itself.

                                    +
                                    Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                    +
                                    +
                                    @Deployment
                                    +public static Archive<?> deployment() {
                                    +    return ShrinkWrap.create(WebArchive.class)
                                    +                     .addClass(ReentrantStatefulBean.class);
                                    +}
                                    +
                                    +
                                    Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                    +
                                    +
                                    @Test
                                    +public void doReentrantCall() {
                                    +    // initialMethod() will internally call another method on itself.
                                    +    // This should not throw an exception. See e.g. https://issues.apache.org/jira/browse/OPENEJB-1099
                                    +    reentrantStatefulBean.initialMethod();
                                    +}
                                    +
                                    +

                                    CartBeanTest

                                    Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                    Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                    +
                                    +
                                    @Deployment
                                    +public static Archive<?> deployment() {
                                    +	return ShrinkWrap.create(JavaArchive.class)
                                    +			.addClass(CartBean.class)
                                    +			.addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
                                    +}
                                    +
                                    +
                                    +

                                    Test of addItem method, of class CartBean

                                    +
                                    +
                                    +
                                    @Test
                                    +public void shouldAddOneItem() throws Exception {
                                    +	// given
                                    +
                                    +	// when
                                    +	sut.addItem("apple");
                                    +
                                    +	// then
                                    +	assertThat(sut.getItems(), hasItem("apple"));
                                    +}
                                    +
                                    +
                                    +

                                    Test of addItem method, of class CartBean

                                    +
                                    +
                                    +
                                    @Test
                                    +public void shouldAddManyItems() throws Exception {
                                    +	// given
                                    +	final List<String> items = Arrays.asList("apple", "banana", "mango", "kiwi", "passion fruit");
                                    +
                                    +	// when
                                    +	for (final String item : items) {
                                    +		sut.addItem(item);
                                    +	}
                                    +
                                    +	// then
                                    +	assertThat(sut.getItems(), is(items));
                                    +}
                                    +
                                    +
                                    +

                                    Test of removeItem method, of class CartBean

                                    +
                                    +
                                    +
                                    @Test
                                    +public void shouldRemoveOneItem() throws Exception {
                                    +	// given
                                    +	final List<String> items = Arrays.asList("apple", "banana", "mango", "kiwi", "passion fruit");
                                    +	for (final String item : items) {
                                    +		sut.addItem(item);
                                    +	}
                                    +
                                    +	// when
                                    +	sut.removeItem("banana");
                                    +
                                    +	// then
                                    +	assertThat(sut.getItems(), not(hasItem("banana")));
                                    +}
                                    +
                                    +
                                    +

                                    Test of getItems method, of class CartBean

                                    +
                                    +
                                    +
                                    @Test
                                    +public void shouldBeEmpty() throws Exception {
                                    +	// given
                                    +
                                    +	// when
                                    +	final List<String> actual = sut.getItems();
                                    +
                                    +	// then
                                    +	assertThat(actual.isEmpty(), is(true));
                                    +}
                                    +
                                    +

                                    Share the Knowledge

                                    Find this sample useful? Share on

                                    There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                    Help Improve

                                    Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                    Recent Changelog

                                    • Oct 06, 2014: Fixed formatting by arjan tijms
                                    • Oct 06, 2014: Test that stateful session bean is capable of calling a method on itself by arjan tijms
                                    • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                    • Dec 09, 2013: Favouring injection over initialcontext for #75 ejb stateless and statefull tests by kubamarchwicki
                                    • Dec 08, 2013: Test new stateful bean on every ctx lookup by kubamarchwicki
                                    • Dec 08, 2013: Removing obsolete servlets and index.jsp files by kubamarchwicki
                                    • Dec 02, 2013: Tests for ejb/stateless & ejb/stateful by Rafał Roppel
                                    • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                    • Sep 05, 2013: Removing redundant files by Arun Gupta
                                    • Aug 29, 2013: Adding copyright by Arun Gupta
                                    How to help improve this sample
                                    The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                    git clone git://github.com/javaee-samples/javaee7-samples.git
                                    cd javaee7-samples/ejb/stateful/

                                    Do the changes as you see fit and send a pull request!

                                    Good Luck!

                                    + \ No newline at end of file diff --git a/sample/ejb-stateless/index.html b/sample/ejb-stateless/index.html new file mode 100644 index 0000000..a9abbd3 --- /dev/null +++ b/sample/ejb-stateless/index.html @@ -0,0 +1,127 @@ +JavaEE Sample::EJB::Stateless

                                    Stateless

                                    Run
                                    How to run the sample
                                    The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                    git clone git://github.com/javaee-samples/javaee7-samples.git
                                    cd javaee7-samples/ejb/stateless/
                                    Now we are ready to start testing. You can run all the tests in this sample by executing:
                                    mvn test
                                    Or you can run individual tests by executing one of the following:
                                    mvn test -Dtest=AccountSessionStatelessnessTestmvn test -Dtest=AccountSessionBeanWithInterfaceTestmvn test -Dtest=AccountSessionBeanTest

                                    AccountSessionStatelessnessTest

                                    Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                    Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                    +
                                    +
                                    @Deployment
                                    +public static Archive<?> deployment() {
                                    +	return ShrinkWrap.create(JavaArchive.class, "test.jar")
                                    +			.addClass(AccountSessionBean.class)
                                    +			.addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
                                    +}
                                    +
                                    +
                                    +

                                    JSR 318: Enterprise JavaBeans, Version 3.1 +3.4.7.2 Session Object Identity / Stateless Session Beans

                                    +
                                    +
                                    +

                                    All business object references of the same interface type for the same +stateless session bean have the same object identity, which is assigned +by the container. All references to the no-interface view of the same +stateless session bean have the same object identity.

                                    +
                                    +
                                    +
                                    @Test
                                    +public void should_be_identical_beans() {
                                    +    assertThat("Expect same instances", account1, is(account2));
                                    +}
                                    +
                                    +

                                    AccountSessionBeanWithInterfaceTest

                                    Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                    +

                                    Arquillian specific method for creating a file which can be deployed +while executing the test.

                                    +
                                    +
                                    +
                                    @Deployment
                                    +public static Archive<?> deployment() {
                                    +	return ShrinkWrap.create(JavaArchive.class)
                                    +			.addClass(AccountSessionBeanWithInterface.class)
                                    +			.addClass(Account.class)
                                    +			.addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
                                    +}
                                    +
                                    +
                                    +

                                    Test of withdraw method, of class AccountSessionBean.

                                    +
                                    +
                                    +
                                    @Test
                                    +public void shouldWithdrawGivenAmount() {
                                    +	// given
                                    +	final float amount = 5.0F;
                                    +
                                    +	// when
                                    +	final String actual = sut.withdraw(amount);
                                    +
                                    +	// then
                                    +	assertThat(actual, is(equalTo("Withdrawn: " + amount)));
                                    +}
                                    +
                                    +
                                    +

                                    Test of deposit method, of class AccountSessionBean.

                                    +
                                    +
                                    +
                                    @Test
                                    +public void shouldDepositGivenAmount() {
                                    +	// given
                                    +	final float amount = 10.0F;
                                    +
                                    +	// when
                                    +	final String actual = sut.deposit(amount);
                                    +
                                    +	// then
                                    +	assertThat(actual, is(equalTo("Deposited: " + amount)));
                                    +}
                                    +
                                    +

                                    AccountSessionBeanTest

                                    Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                    +

                                    Arquillian specific method for creating a file which can be deployed +while executing the test.

                                    +
                                    +
                                    +
                                    @Deployment
                                    +public static Archive<?> deployment() {
                                    +	return ShrinkWrap.create(JavaArchive.class)
                                    +			.addClass(AccountSessionBean.class)
                                    +			.addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
                                    +}
                                    +
                                    +
                                    +

                                    Test of withdraw method, of class AccountSessionBean.

                                    +
                                    +
                                    +
                                    @Test
                                    +public void shouldWithdrawGivenAmount() {
                                    +	// given
                                    +	final float amount = 5.0F;
                                    +
                                    +	// when
                                    +	final String actual = sut.withdraw(amount);
                                    +
                                    +	// then
                                    +	assertThat(actual, is(equalTo("Withdrawn: " + amount)));
                                    +}
                                    +
                                    +
                                    +

                                    Test of deposit method, of class AccountSessionBean.

                                    +
                                    +
                                    +
                                    @Test
                                    +public void shouldDepositGivenAmount() {
                                    +	// given
                                    +	final float amount = 10.0F;
                                    +
                                    +	// when
                                    +	final String actual = sut.deposit(amount);
                                    +
                                    +	// then
                                    +	assertThat(actual, is(equalTo("Deposited: " + amount)));
                                    +}
                                    +
                                    +

                                    Share the Knowledge

                                    Find this sample useful? Share on

                                    There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                    Help Improve

                                    Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                    Recent Changelog

                                    • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                    • Mar 26, 2014: Fixing #205. removing spec not compliant assertions by kubamarchwicki
                                    • Mar 25, 2014: Suggestion howto fix #205 by Alexander Heusingfeld
                                    • Dec 09, 2013: Favouring injection over initialcontext for #75 ejb stateless and statefull tests by kubamarchwicki
                                    • Dec 08, 2013: Test same stateless bean on every ctx lookup by kubamarchwicki
                                    • Dec 08, 2013: Removing obsolete servlets and index.jsp files by kubamarchwicki
                                    • Dec 02, 2013: Tests for ejb/stateless & ejb/stateful by Rafał Roppel
                                    • Nov 08, 2013: Cocommenting the test for now until ejb injection is identified by Arun Gupta
                                    • Nov 08, 2013: Cocommenting the test for now until ejb injection is identified by Arun Gupta
                                    • Nov 07, 2013: Commenting arquillian dependencies till it is sorted out by Arun Gupta
                                    How to help improve this sample
                                    The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                    git clone git://github.com/javaee-samples/javaee7-samples.git
                                    cd javaee7-samples/ejb/stateless/

                                    Do the changes as you see fit and send a pull request!

                                    Good Luck!

                                    + \ No newline at end of file diff --git a/sample/ejb-timer/index.html b/sample/ejb-timer/index.html new file mode 100644 index 0000000..50fdfe5 --- /dev/null +++ b/sample/ejb-timer/index.html @@ -0,0 +1,42 @@ +JavaEE Sample::EJB::Timer

                                    Timer

                                    Run
                                    How to run the sample
                                    The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                    git clone git://github.com/javaee-samples/javaee7-samples.git
                                    cd javaee7-samples/ejb/timer/
                                    Now we are ready to start testing. You can run all the tests in this sample by executing:
                                    mvn test
                                    Or you can run individual tests by executing one of the following:
                                    mvn test -Dtest=TimerSessionBeanTest

                                    TimerSessionBeanTest

                                    +

                                    author: Jakub Marchwicki

                                    +
                                    Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                    +
                                    +
                                    @Deployment
                                    +public static WebArchive deploy() {
                                    +    File[] jars = Maven.resolver().loadPomFromFile("pom.xml")
                                    +            .resolve("com.jayway.awaitility:awaitility")
                                    +            .withTransitivity().asFile();
                                    +
                                    +    return ShrinkWrap.create(WebArchive.class)
                                    +            .addAsLibraries(jars)
                                    +            .addClasses(Ping.class, PingsListener.class, TimerSessionBean.class);
                                    +}
                                    +
                                    +
                                    Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                    +
                                    +
                                    @Test
                                    +public void should_receive_two_pings() {
                                    +    await().untilCall(to(pings.getPings()).size(), equalTo(2));
                                    +
                                    +    Ping firstPing = pings.getPings().get(0);
                                    +    Ping secondPing = pings.getPings().get(1);
                                    +
                                    +    long delay = secondPing.getTime() - firstPing.getTime();
                                    +    System.out.println("Actual timeout = " + delay);
                                    +    assertThat(delay, is(withinWindow(TIMEOUT, TOLERANCE)));
                                    +}
                                    +
                                    +

                                    Share the Knowledge

                                    Find this sample useful? Share on

                                    There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                    Help Improve

                                    Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                    Recent Changelog

                                    • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                    • Dec 07, 2013: #75 wildfly ejb timer tests by kubamarchwicki
                                    • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                    • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                    How to help improve this sample
                                    The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                    git clone git://github.com/javaee-samples/javaee7-samples.git
                                    cd javaee7-samples/ejb/timer/

                                    Do the changes as you see fit and send a pull request!

                                    Good Luck!

                                    + \ No newline at end of file diff --git a/sample/el-standalone/index.html b/sample/el-standalone/index.html new file mode 100644 index 0000000..0c0faa8 --- /dev/null +++ b/sample/el-standalone/index.html @@ -0,0 +1,36 @@ +JavaEE Sample::EL::Standalone

                                    Standalone

                                    Run
                                    How to run the sample
                                    The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                    git clone git://github.com/javaee-samples/javaee7-samples.git
                                    cd javaee7-samples/el/standalone/
                                    Now we are ready to start testing. You can run all the tests in this sample by executing:
                                    mvn test
                                    Or you can run individual tests by executing one of the following:
                                    mvn test -Dtest=ELResolverTest

                                    • Specifications in use:
                                      • EL

                                      ELResolverTest

                                      Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                      Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                      +
                                      +
                                      @Deployment
                                      +public static Archive<?> deploy() {
                                      +    return ShrinkWrap.create(JavaArchive.class);
                                      +}
                                      +
                                      +
                                      Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                      +
                                      +
                                      @Test
                                      +public void should_pick_in_the_array() {
                                      +    Object result = elProcessor.eval("a = [1, 2, 3]; a[1]");
                                      +    assertEquals(2L, result);
                                      +}
                                      +
                                      +
                                      Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                      +
                                      +
                                      @Test
                                      +public void should_add() {
                                      +    Object result = elProcessor.eval("((x,y) -> x+y)(4, 5)");
                                      +    assertEquals(9L, result);
                                      +}
                                      +
                                      +

                                      Share the Knowledge

                                      Find this sample useful? Share on

                                      There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                      Help Improve

                                      Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                      Recent Changelog

                                      • Oct 05, 2014: #252 fixed arquillian configuration for the jobs by John D. Ament
                                      • Mar 20, 2014: Update arquillian.xml cr1 references to final by Aslak Knutsen
                                      • Dec 24, 2013: Updated to wildfly 8.0.0.cr1 by Roberto Cortez
                                      • Nov 12, 2013: Dropped servlet and jsp by Alexis Hassler
                                      • Nov 12, 2013: Added arquillian test for the el/standalone example. and it's cool !!! by Alexis Hassler
                                      • Oct 27, 2013: Fixing a typo by Arun Gupta
                                      • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                      • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                      How to help improve this sample
                                      The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                      git clone git://github.com/javaee-samples/javaee7-samples.git
                                      cd javaee7-samples/el/standalone/

                                      Do the changes as you see fit and send a pull request!

                                      Good Luck!

                                      + \ No newline at end of file diff --git a/sample/index.html b/sample/index.html new file mode 100644 index 0000000..884c7b2 --- /dev/null +++ b/sample/index.html @@ -0,0 +1,11 @@ +Showcase
                                      + \ No newline at end of file diff --git a/sample/index.html.slim b/sample/index.html.slim deleted file mode 100644 index 667a088..0000000 --- a/sample/index.html.slim +++ /dev/null @@ -1,23 +0,0 @@ ---- -layout: default -title: Showcase ---- -- techs = Set.new -- for sc in site.showcases - - if !sc.showcase.technologies.nil? - - techs.merge sc.showcase.technologies --techs=techs.to_a.sort - -#content - - for tech in techs - .row style='margin-bottom:10px' - .span12 - a name="#{tech.gsub(/\W/, '')}" - h3=tech - - for sc in site.showcases - - if !sc.showcase.technologies.nil? - - if sc.showcase.technologies.include? tech - .span3 style='margin-bottom:10px' - h4 - a href="#{sc.output_path}"=sc.showcase.module_name - =sc.showcase.description \ No newline at end of file diff --git a/sample/index.json b/sample/index.json new file mode 100644 index 0000000..7b203d9 --- /dev/null +++ b/sample/index.json @@ -0,0 +1,4694 @@ +[ + { + "id": "batch/batchlet-simple/", + "name": "Batchlet Simple", + "description": "Batchlet Simple - Execute a task oriented step", + "html_url": "http://javaee.support/sample/batch-batchlet-simple/index.html", + "category": "Batch", + "last_updated": "2014-12-14 19:59:25 +0100", + "usage": [ + "Batch", + "CDI" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Aslak Knutsen", + "avatar": "http://gravatar.com/avatar/3f27861ec08730fd02c91fe4129d2668?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + }, + { + "name": "Scott Kurz", + "avatar": "http://gravatar.com/avatar/?s=25" + } + ] + }, + { + "id": "batch/chunk-checkpoint/", + "name": "Batch Chunk Checkpoint", + "description": "Chunk Checkpoint - Custom Checkpoint Policy", + "html_url": "http://javaee.support/sample/batch-chunk-checkpoint/index.html", + "category": "Batch", + "last_updated": "2014-12-14 19:59:25 +0100", + "usage": [ + "Batch", + "CDI" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + }, + { + "name": "Scott Kurz", + "avatar": "http://gravatar.com/avatar/?s=25" + } + ] + }, + { + "id": "batch/chunk-csv-database/", + "name": "Batch Chunk CSV Database", + "description": "Chunk Processing - Read, Process, Write to a Database", + "html_url": "http://javaee.support/sample/batch-chunk-csv-database/index.html", + "category": "Batch", + "last_updated": "2014-12-14 19:59:25 +0100", + "usage": [ + "Batch", + "CDI", + "JPA", + "validation" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + }, + { + "name": "Scott Kurz", + "avatar": "http://gravatar.com/avatar/?s=25" + } + ] + }, + { + "id": "batch/chunk-exception/", + "name": "Batch Chunk Exception", + "description": "Chunk Exception Handling - Retrying and Skipping", + "html_url": "http://javaee.support/sample/batch-chunk-exception/index.html", + "category": "Batch", + "last_updated": "2014-12-14 19:59:25 +0100", + "usage": [ + "Batch", + "CDI" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + }, + { + "name": "Scott Kurz", + "avatar": "http://gravatar.com/avatar/?s=25" + } + ] + }, + { + "id": "batch/chunk-mapper/", + "name": "Batch Chunk Partition Mapper", + "description": "Chunk Processing - Read, Process, Write in multiple Threads", + "html_url": "http://javaee.support/sample/batch-chunk-mapper/index.html", + "category": "Batch", + "last_updated": "2014-12-14 19:59:25 +0100", + "usage": [ + "Batch", + "CDI" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + }, + { + "name": "Scott Kurz", + "avatar": "http://gravatar.com/avatar/?s=25" + } + ] + }, + { + "id": "batch/chunk-optional-processor/", + "name": "Batch Chunk Optional Processor", + "description": "Chunk Processing - Read and Write", + "html_url": "http://javaee.support/sample/batch-chunk-optional-processor/index.html", + "category": "Batch", + "last_updated": "2014-12-14 19:59:25 +0100", + "usage": [ + "Batch", + "CDI" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + }, + { + "name": "Scott Kurz", + "avatar": "http://gravatar.com/avatar/?s=25" + } + ] + }, + { + "id": "batch/chunk-partition/", + "name": "Batch Chunk Partition", + "description": "Chunk Processing - Read, Process, Write in multiple Threads", + "html_url": "http://javaee.support/sample/batch-chunk-partition/index.html", + "category": "Batch", + "last_updated": "2014-12-14 19:59:25 +0100", + "usage": [ + "Batch", + "CDI" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + }, + { + "name": "Scott Kurz", + "avatar": "http://gravatar.com/avatar/?s=25" + } + ] + }, + { + "id": "batch/chunk-simple/", + "name": "Batch Chunk Simple", + "description": "Chunk Processing - Read, Process, Write", + "html_url": "http://javaee.support/sample/batch-chunk-simple/index.html", + "category": "Batch", + "last_updated": "2014-12-14 19:59:25 +0100", + "usage": [ + "Batch", + "CDI" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + }, + { + "name": "Scott Kurz", + "avatar": "http://gravatar.com/avatar/?s=25" + } + ] + }, + { + "id": "batch/decision/", + "name": "Batch Decision", + "description": "Batch DSL - Decision", + "html_url": "http://javaee.support/sample/batch-decision/index.html", + "category": "Batch", + "last_updated": "2014-12-14 19:59:25 +0100", + "usage": [ + "Batch", + "CDI" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Aslak Knutsen", + "avatar": "http://gravatar.com/avatar/3f27861ec08730fd02c91fe4129d2668?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + }, + { + "name": "Scott Kurz", + "avatar": "http://gravatar.com/avatar/?s=25" + } + ] + }, + { + "id": "batch/flow/", + "name": "Batch Flow", + "description": "Batch DSL - Flow", + "html_url": "http://javaee.support/sample/batch-flow/index.html", + "category": "Batch", + "last_updated": "2014-12-14 19:59:25 +0100", + "usage": [ + "Batch", + "CDI" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + }, + { + "name": "Scott Kurz", + "avatar": "http://gravatar.com/avatar/?s=25" + } + ] + }, + { + "id": "batch/batch-listeners/", + "name": "Batch Listeners", + "description": "Batch Listeners - Applying Listeners to Job, Chunk, Step, Reader, Processor and Writer", + "html_url": "http://javaee.support/sample/batch-batch-listeners/index.html", + "category": "Batch", + "last_updated": "2014-12-14 19:59:25 +0100", + "usage": [ + "Batch", + "CDI" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + }, + { + "name": "Scott Kurz", + "avatar": "http://gravatar.com/avatar/?s=25" + } + ] + }, + { + "id": "batch/multiple-steps/", + "name": "Batch Multiple Steps", + "description": "Batch JSL - Executing Multiple Steps", + "html_url": "http://javaee.support/sample/batch-multiple-steps/index.html", + "category": "Batch", + "last_updated": "2014-12-14 19:59:25 +0100", + "usage": [ + "Batch", + "CDI" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + }, + { + "name": "Scott Kurz", + "avatar": "http://gravatar.com/avatar/?s=25" + } + ] + }, + { + "id": "batch/split/", + "name": "Batch Split", + "description": "Batch JSL - Splitting Steps", + "html_url": "http://javaee.support/sample/batch-split/index.html", + "category": "Batch", + "last_updated": "2014-12-14 19:59:25 +0100", + "usage": [ + "Batch", + "CDI" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + }, + { + "name": "Scott Kurz", + "avatar": "http://gravatar.com/avatar/?s=25" + } + ] + }, + { + "id": "batch/chunk-simple-nobeans/", + "name": "Batch Chunk Simple No Beans", + "description": "Chunk Processing - Read, Process, Write", + "html_url": "http://javaee.support/sample/batch-chunk-simple-nobeans/index.html", + "category": "Batch", + "last_updated": "2014-12-14 19:59:25 +0100", + "usage": [ + "Batch", + "CDI" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + }, + { + "name": "Scott Kurz", + "avatar": "http://gravatar.com/avatar/?s=25" + } + ] + }, + { + "id": "batch/scheduling/", + "name": "Batch Schedule", + "description": "Scheduling a Batch Job", + "html_url": "http://javaee.support/sample/batch-scheduling/index.html", + "category": "Batch", + "last_updated": "2014-07-09 03:14:13 +0200", + "usage": [ + "EJB", + "Batch", + "Concurrency", + "CDI" + ], + "authors": [ + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + }, + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + } + ] + }, + { + "id": "cdi/vetoed/", + "name": "Vetoed", + "description": "", + "html_url": "http://javaee.support/sample/cdi-vetoed/index.html", + "category": "CDI", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + "CDI", + "Servlet" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "cdi/pkg-level/", + "name": "Pkg level", + "description": "", + "html_url": "http://javaee.support/sample/cdi-pkg-level/index.html", + "category": "CDI", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + "CDI", + "Servlet" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "cdi/decorators/", + "name": "Decorators", + "description": "", + "html_url": "http://javaee.support/sample/cdi-decorators/index.html", + "category": "CDI", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + "CDI" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + }, + { + "name": "Korneliusz Rabczak", + "avatar": "http://gravatar.com/avatar/aaca7d822e0de7089f31c11f115d4fc4?s=25" + } + ] + }, + { + "id": "cdi/bean-discovery-all/", + "name": "Bean discovery all", + "description": "", + "html_url": "http://javaee.support/sample/cdi-bean-discovery-all/index.html", + "category": "CDI", + "last_updated": "2014-10-05 05:52:25 +0200", + "usage": [ + "CDI" + ], + "authors": [ + { + "name": "Alexis Hassler", + "avatar": "http://gravatar.com/avatar/fe38721931b2933e6b3749015c1d4b55?s=25" + }, + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Aslak Knutsen", + "avatar": "http://gravatar.com/avatar/3f27861ec08730fd02c91fe4129d2668?s=25" + }, + { + "name": "John Ament", + "avatar": "http://gravatar.com/avatar/?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "cdi/bean-discovery-annotated/", + "name": "Bean discovery annotated", + "description": "", + "html_url": "http://javaee.support/sample/cdi-bean-discovery-annotated/index.html", + "category": "CDI", + "last_updated": "2014-10-05 05:52:25 +0200", + "usage": [ + "CDI" + ], + "authors": [ + { + "name": "Alexis Hassler", + "avatar": "http://gravatar.com/avatar/fe38721931b2933e6b3749015c1d4b55?s=25" + }, + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Aslak Knutsen", + "avatar": "http://gravatar.com/avatar/3f27861ec08730fd02c91fe4129d2668?s=25" + }, + { + "name": "John Ament", + "avatar": "http://gravatar.com/avatar/?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "cdi/bean-discovery-none/", + "name": "Bean discovery none", + "description": "", + "html_url": "http://javaee.support/sample/cdi-bean-discovery-none/index.html", + "category": "CDI", + "last_updated": "2014-10-05 05:52:25 +0200", + "usage": [ + "CDI" + ], + "authors": [ + { + "name": "Alexis Hassler", + "avatar": "http://gravatar.com/avatar/fe38721931b2933e6b3749015c1d4b55?s=25" + }, + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Aslak Knutsen", + "avatar": "http://gravatar.com/avatar/3f27861ec08730fd02c91fe4129d2668?s=25" + }, + { + "name": "John Ament", + "avatar": "http://gravatar.com/avatar/?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "cdi/exclude-filter/", + "name": "Exclude filter", + "description": "", + "html_url": "http://javaee.support/sample/cdi-exclude-filter/index.html", + "category": "CDI", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + "CDI", + "Servlet" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "cdi/built-in/", + "name": "Built in", + "description": "", + "html_url": "http://javaee.support/sample/cdi-built-in/index.html", + "category": "CDI", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + "CDI", + "Servlet", + "EJB", + "JTA" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "cdi/interceptors/", + "name": "Interceptors", + "description": "", + "html_url": "http://javaee.support/sample/cdi-interceptors/index.html", + "category": "CDI", + "last_updated": "2014-10-05 05:52:25 +0200", + "usage": [ + "CDI" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Aslak Knutsen", + "avatar": "http://gravatar.com/avatar/3f27861ec08730fd02c91fe4129d2668?s=25" + }, + { + "name": "John Ament", + "avatar": "http://gravatar.com/avatar/?s=25" + }, + { + "name": "Radim Hanus", + "avatar": "http://gravatar.com/avatar/1e6e5a866d04af3a13524d1e6fe4ed7d?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "cdi/interceptors-priority/", + "name": "Interceptors priority", + "description": "", + "html_url": "http://javaee.support/sample/cdi-interceptors-priority/index.html", + "category": "CDI", + "last_updated": "2014-10-05 05:52:25 +0200", + "usage": [ + "CDI" + ], + "authors": [ + { + "name": "Aslak Knutsen", + "avatar": "http://gravatar.com/avatar/3f27861ec08730fd02c91fe4129d2668?s=25" + }, + { + "name": "John Ament", + "avatar": "http://gravatar.com/avatar/?s=25" + }, + { + "name": "Radim Hanus", + "avatar": "http://gravatar.com/avatar/1e6e5a866d04af3a13524d1e6fe4ed7d?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "cdi/nobeans-xml/", + "name": "Nobeans xml", + "description": "", + "html_url": "http://javaee.support/sample/cdi-nobeans-xml/index.html", + "category": "CDI", + "last_updated": "2014-10-05 05:52:25 +0200", + "usage": [ + "CDI" + ], + "authors": [ + { + "name": "Alexis Hassler", + "avatar": "http://gravatar.com/avatar/fe38721931b2933e6b3749015c1d4b55?s=25" + }, + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Aslak Knutsen", + "avatar": "http://gravatar.com/avatar/3f27861ec08730fd02c91fe4129d2668?s=25" + }, + { + "name": "John Ament", + "avatar": "http://gravatar.com/avatar/?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "cdi/beansxml-noversion/", + "name": "Beansxml noversion", + "description": "", + "html_url": "http://javaee.support/sample/cdi-beansxml-noversion/index.html", + "category": "CDI", + "last_updated": "2014-10-05 05:52:25 +0200", + "usage": [ + "CDI" + ], + "authors": [ + { + "name": "Alexis Hassler", + "avatar": "http://gravatar.com/avatar/fe38721931b2933e6b3749015c1d4b55?s=25" + }, + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Aslak Knutsen", + "avatar": "http://gravatar.com/avatar/3f27861ec08730fd02c91fe4129d2668?s=25" + }, + { + "name": "John Ament", + "avatar": "http://gravatar.com/avatar/?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "cdi/beanmanager/", + "name": "Beanmanager", + "description": "", + "html_url": "http://javaee.support/sample/cdi-beanmanager/index.html", + "category": "CDI", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + "CDI", + "Servlet" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "cdi/extension/", + "name": "Extension", + "description": "", + "html_url": "http://javaee.support/sample/cdi-extension/index.html", + "category": "CDI", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + "CDI", + "Servlet" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "cdi/scopes/", + "name": "scopes", + "description": "", + "html_url": "http://javaee.support/sample/cdi-scopes/index.html", + "category": "CDI", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + "CDI", + "Servlet" + ], + "authors": [ + { + "name": "Arend.von.reinersdorff", + "avatar": "http://gravatar.com/avatar/4a5a2102c1f72577bf9254537b8e86e5?s=25" + }, + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + }, + { + "name": "Abhishek Gupta", + "avatar": "http://gravatar.com/avatar/eb0d2c5bf9426d7718efc6f9b087efb5?s=25" + } + ] + }, + { + "id": "cdi/alternatives/", + "name": "Alternatives", + "description": "", + "html_url": "http://javaee.support/sample/cdi-alternatives/index.html", + "category": "CDI", + "last_updated": "2014-10-05 05:52:25 +0200", + "usage": [ + "CDI" + ], + "authors": [ + { + "name": "Alexis Hassler", + "avatar": "http://gravatar.com/avatar/fe38721931b2933e6b3749015c1d4b55?s=25" + }, + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Aslak Knutsen", + "avatar": "http://gravatar.com/avatar/3f27861ec08730fd02c91fe4129d2668?s=25" + }, + { + "name": "John Ament", + "avatar": "http://gravatar.com/avatar/?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "cdi/alternatives-priority/", + "name": "Alternatives priority", + "description": "", + "html_url": "http://javaee.support/sample/cdi-alternatives-priority/index.html", + "category": "CDI", + "last_updated": "2014-10-05 05:52:25 +0200", + "usage": [ + "CDI" + ], + "authors": [ + { + "name": "Aslak Knutsen", + "avatar": "http://gravatar.com/avatar/3f27861ec08730fd02c91fe4129d2668?s=25" + }, + { + "name": "John Ament", + "avatar": "http://gravatar.com/avatar/?s=25" + }, + { + "name": "Radim Hanus", + "avatar": "http://gravatar.com/avatar/1e6e5a866d04af3a13524d1e6fe4ed7d?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "cdi/nobeans-el-injection/", + "name": "Nobeans el injection", + "description": "", + "html_url": "http://javaee.support/sample/cdi-nobeans-el-injection/index.html", + "category": "CDI", + "last_updated": "2013-12-11 23:50:53 +0100", + "usage": [ + "CDI" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + } + ] + }, + { + "id": "cdi/nobeans-el-injection-flowscoped/", + "name": "Nobeans el injection flowscoped", + "description": "", + "html_url": "http://javaee.support/sample/cdi-nobeans-el-injection-flowscoped/index.html", + "category": "CDI", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + "CDI" + ], + "authors": [ + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + }, + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + } + ] + }, + { + "id": "cdi/events/", + "name": "Events", + "description": "", + "html_url": "http://javaee.support/sample/cdi-events/index.html", + "category": "CDI", + "last_updated": "2014-10-05 05:52:25 +0200", + "usage": [ + "CDI" + ], + "authors": [ + { + "name": "Aslak Knutsen", + "avatar": "http://gravatar.com/avatar/3f27861ec08730fd02c91fe4129d2668?s=25" + }, + { + "name": "John Ament", + "avatar": "http://gravatar.com/avatar/?s=25" + }, + { + "name": "Radim Hanus", + "avatar": "http://gravatar.com/avatar/1e6e5a866d04af3a13524d1e6fe4ed7d?s=25" + } + ] + }, + { + "id": "concurrency/managedexecutor/", + "name": "Managedexecutor", + "description": "", + "html_url": "http://javaee.support/sample/concurrency-managedexecutor/index.html", + "category": "Concurrency", + "last_updated": "2014-10-05 05:52:25 +0200", + "usage": [ + "Concurrency", + "CDI", + "EJB", + "JTA" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Aslak Knutsen", + "avatar": "http://gravatar.com/avatar/3f27861ec08730fd02c91fe4129d2668?s=25" + }, + { + "name": "John Ament", + "avatar": "http://gravatar.com/avatar/?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "concurrency/managedscheduledexecutor/", + "name": "managedscheduledexecutor", + "description": "", + "html_url": "http://javaee.support/sample/concurrency-managedscheduledexecutor/index.html", + "category": "Concurrency", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + "Concurrency", + "CDI", + "Servlet" + ], + "authors": [ + { + "name": "Alexander Heusingfeld", + "avatar": "http://gravatar.com/avatar/aba82ecdcf1e1534f2c579d124d8cd35?s=25" + }, + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "concurrency/managedthreadfactory/", + "name": "managedthreadfactory", + "description": "", + "html_url": "http://javaee.support/sample/concurrency-managedthreadfactory/index.html", + "category": "Concurrency", + "last_updated": "2014-07-15 02:29:38 +0200", + "usage": [ + "Concurrency", + "CDI", + "Servlet" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "concurrency/dynamicproxy/", + "name": "Dynamicproxy", + "description": "", + "html_url": "http://javaee.support/sample/concurrency-dynamicproxy/index.html", + "category": "Concurrency", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + "Concurrency", + "CDI", + "Servlet" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "ejb/embeddable/", + "name": "Embeddable", + "description": "", + "html_url": "http://javaee.support/sample/ejb-embeddable/index.html", + "category": "EJB", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + "EJB" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "ejb/lifecycle/", + "name": "Lifecycle", + "description": "", + "html_url": "http://javaee.support/sample/ejb-lifecycle/index.html", + "category": "EJB", + "last_updated": "2014-10-30 23:03:02 +0100", + "usage": [ + "EJB", + "CDI", + "Servlet" + ], + "authors": [ + { + "name": "Andrew Guibert", + "avatar": "http://gravatar.com/avatar/?s=25" + }, + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "ejb/singleton/", + "name": "Singleton", + "description": "", + "html_url": "http://javaee.support/sample/ejb-singleton/index.html", + "category": "EJB", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + "CDI", + "Servlet", + "EJB" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Ondrej Zizka", + "avatar": "http://gravatar.com/avatar/c2e81d39016f1e0633e4348b3fcd1d15?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "ejb/stateful/", + "name": "Stateful", + "description": "", + "html_url": "http://javaee.support/sample/ejb-stateful/index.html", + "category": "EJB", + "last_updated": "2014-10-06 00:05:59 +0200", + "usage": [ + "EJB", + "Servlet", + "CDI" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Rafał Roppel", + "avatar": "http://gravatar.com/avatar/4e0f4e2278aaecc65991e2a13f0b4325?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + }, + { + "name": "Arjan Tijms", + "avatar": "http://gravatar.com/avatar/d383928ce35a8dab6f4cf8f4e5e269b9?s=25" + }, + { + "name": "Kuba Marchwicki", + "avatar": "http://gravatar.com/avatar/b5405045448a182b8ee12236ec63d8b0?s=25" + } + ] + }, + { + "id": "ejb/stateless/", + "name": "Stateless", + "description": "", + "html_url": "http://javaee.support/sample/ejb-stateless/index.html", + "category": "EJB", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + "EJB", + "Servlet", + "CDI" + ], + "authors": [ + { + "name": "Alexander Heusingfeld", + "avatar": "http://gravatar.com/avatar/aba82ecdcf1e1534f2c579d124d8cd35?s=25" + }, + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Rafał Roppel", + "avatar": "http://gravatar.com/avatar/4e0f4e2278aaecc65991e2a13f0b4325?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + }, + { + "name": "Kuba Marchwicki", + "avatar": "http://gravatar.com/avatar/b5405045448a182b8ee12236ec63d8b0?s=25" + } + ] + }, + { + "id": "ejb/timer/", + "name": "Timer", + "description": "", + "html_url": "http://javaee.support/sample/ejb-timer/index.html", + "category": "EJB", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + "EJB", + "CDI" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + }, + { + "name": "Kuba Marchwicki", + "avatar": "http://gravatar.com/avatar/b5405045448a182b8ee12236ec63d8b0?s=25" + } + ] + }, + { + "id": "ejb/async-ejb/", + "name": "Async ejb", + "description": "", + "html_url": "http://javaee.support/sample/ejb-async-ejb/index.html", + "category": "EJB", + "last_updated": "2014-07-15 02:29:38 +0200", + "usage": [ + "EJB", + "CDI" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + }, + { + "name": "Kuba Marchwicki", + "avatar": "http://gravatar.com/avatar/b5405045448a182b8ee12236ec63d8b0?s=25" + } + ] + }, + { + "id": "el/standalone/", + "name": "Standalone", + "description": "", + "html_url": "http://javaee.support/sample/el-standalone/index.html", + "category": "EL", + "last_updated": "2014-10-05 05:52:25 +0200", + "usage": [ + "EL" + ], + "authors": [ + { + "name": "Alexis Hassler", + "avatar": "http://gravatar.com/avatar/fe38721931b2933e6b3749015c1d4b55?s=25" + }, + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Aslak Knutsen", + "avatar": "http://gravatar.com/avatar/3f27861ec08730fd02c91fe4129d2668?s=25" + }, + { + "name": "John Ament", + "avatar": "http://gravatar.com/avatar/?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "javamail/definition/", + "name": "Definition", + "description": "", + "html_url": "http://javaee.support/sample/javamail-definition/index.html", + "category": "JavaMail", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + "CDI", + "JavaMail", + "Servlet" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "jaspic/common/", + "name": "Common", + "description": "", + "html_url": "http://javaee.support/sample/jaspic-common/index.html", + "category": "JASPIC", + "last_updated": "2014-01-11 01:34:10 +0100", + "usage": [ + "JASPIC", + "Servlet" + ], + "authors": [ + { + "name": "Stefan Guilhen", + "avatar": "http://gravatar.com/avatar/4ce28e3d3f99e984c21b880dbac66d7d?s=25" + }, + { + "name": "Arjan Tijms", + "avatar": "http://gravatar.com/avatar/d383928ce35a8dab6f4cf8f4e5e269b9?s=25" + } + ] + }, + { + "id": "jaspic/async-authentication/", + "name": "Async authentication", + "description": "", + "html_url": "http://javaee.support/sample/jaspic-async-authentication/index.html", + "category": "JASPIC", + "last_updated": "2014-07-25 16:32:28 +0200", + "usage": [ + "EJB", + "Servlet", + "JASPIC" + ], + "authors": [ + { + "name": "Arjan Tijms", + "avatar": "http://gravatar.com/avatar/d383928ce35a8dab6f4cf8f4e5e269b9?s=25" + } + ] + }, + { + "id": "jaspic/basic-authentication/", + "name": "Basic authentication", + "description": "", + "html_url": "http://javaee.support/sample/jaspic-basic-authentication/index.html", + "category": "JASPIC", + "last_updated": "2014-01-11 01:34:10 +0100", + "usage": [ + "JASPIC", + "Servlet" + ], + "authors": [ + { + "name": "Stefan Guilhen", + "avatar": "http://gravatar.com/avatar/4ce28e3d3f99e984c21b880dbac66d7d?s=25" + }, + { + "name": "Arjan Tijms", + "avatar": "http://gravatar.com/avatar/d383928ce35a8dab6f4cf8f4e5e269b9?s=25" + } + ] + }, + { + "id": "jaspic/ejb-propagation/", + "name": "Ejb propagation", + "description": "", + "html_url": "http://javaee.support/sample/jaspic-ejb-propagation/index.html", + "category": "JASPIC", + "last_updated": "2014-01-11 01:34:10 +0100", + "usage": [ + "EJB", + "JASPIC", + "Servlet" + ], + "authors": [ + { + "name": "Stefan Guilhen", + "avatar": "http://gravatar.com/avatar/4ce28e3d3f99e984c21b880dbac66d7d?s=25" + }, + { + "name": "Arjan Tijms", + "avatar": "http://gravatar.com/avatar/d383928ce35a8dab6f4cf8f4e5e269b9?s=25" + } + ] + }, + { + "id": "jaspic/lifecycle/", + "name": "Lifecycle", + "description": "", + "html_url": "http://javaee.support/sample/jaspic-lifecycle/index.html", + "category": "JASPIC", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + "JASPIC", + "Servlet" + ], + "authors": [ + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + }, + { + "name": "Stefan Guilhen", + "avatar": "http://gravatar.com/avatar/4ce28e3d3f99e984c21b880dbac66d7d?s=25" + }, + { + "name": "Arjan Tijms", + "avatar": "http://gravatar.com/avatar/d383928ce35a8dab6f4cf8f4e5e269b9?s=25" + } + ] + }, + { + "id": "jaspic/register-session/", + "name": "Register session", + "description": "", + "html_url": "http://javaee.support/sample/jaspic-register-session/index.html", + "category": "JASPIC", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + "JASPIC", + "Servlet" + ], + "authors": [ + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + }, + { + "name": "Stefan Guilhen", + "avatar": "http://gravatar.com/avatar/4ce28e3d3f99e984c21b880dbac66d7d?s=25" + }, + { + "name": "Arjan Tijms", + "avatar": "http://gravatar.com/avatar/d383928ce35a8dab6f4cf8f4e5e269b9?s=25" + } + ] + }, + { + "id": "jaspic/wrapping/", + "name": "Wrapping", + "description": "", + "html_url": "http://javaee.support/sample/jaspic-wrapping/index.html", + "category": "JASPIC", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + "JASPIC", + "Servlet" + ], + "authors": [ + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + }, + { + "name": "Stefan Guilhen", + "avatar": "http://gravatar.com/avatar/4ce28e3d3f99e984c21b880dbac66d7d?s=25" + }, + { + "name": "Arjan Tijms", + "avatar": "http://gravatar.com/avatar/d383928ce35a8dab6f4cf8f4e5e269b9?s=25" + } + ] + }, + { + "id": "jaxrs/angularjs/", + "name": "Angularjs", + "description": "Angular JS consuming REST services", + "html_url": "http://javaee.support/sample/jaxrs-angularjs/index.html", + "category": "JAXRS", + "last_updated": "2014-10-05 05:52:25 +0200", + "usage": [ + "JPA", + "JAXRS", + "EJB" + ], + "authors": [ + { + "name": "Bartosz Majsak", + "avatar": "http://gravatar.com/avatar/de13898b827f3227a9f9f31eb90a2367?s=25" + }, + { + "name": "John Ament", + "avatar": "http://gravatar.com/avatar/?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + }, + { + "name": "Bernard Labno", + "avatar": "http://gravatar.com/avatar/4da9d21f8432bc5a2aebda9af268d34c?s=25" + } + ] + }, + { + "id": "jaxrs/async-client/", + "name": "Async Client", + "description": "Invoke a JAX-RS service via an asynchronous client", + "html_url": "http://javaee.support/sample/jaxrs-async-client/index.html", + "category": "JAXRS", + "last_updated": "2014-09-10 16:50:40 +0200", + "usage": [ + "JAXRS" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Aslak Knutsen", + "avatar": "http://gravatar.com/avatar/3f27861ec08730fd02c91fe4129d2668?s=25" + }, + { + "name": "Max Rydahl Andersen", + "avatar": "http://gravatar.com/avatar/?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "jaxrs/async-server/", + "name": "Async server", + "description": "", + "html_url": "http://javaee.support/sample/jaxrs-async-server/index.html", + "category": "JAXRS", + "last_updated": "2014-07-15 02:29:38 +0200", + "usage": [ + "JAXRS", + "Concurrency", + "CDI" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Aslak Knutsen", + "avatar": "http://gravatar.com/avatar/3f27861ec08730fd02c91fe4129d2668?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "jaxrs/beanvalidation/", + "name": "Beanvalidation", + "description": "", + "html_url": "http://javaee.support/sample/jaxrs-beanvalidation/index.html", + "category": "JAXRS", + "last_updated": "2014-07-15 02:29:38 +0200", + "usage": [ + "JAXRS", + "validation" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Aslak Knutsen", + "avatar": "http://gravatar.com/avatar/3f27861ec08730fd02c91fe4129d2668?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "jaxrs/beanparam/", + "name": "Beanparam", + "description": "", + "html_url": "http://javaee.support/sample/jaxrs-beanparam/index.html", + "category": "JAXRS", + "last_updated": "2014-05-26 14:46:12 +0200", + "usage": [ + "JAXRS" + ], + "authors": [ + { + "name": "Xavier Coulon", + "avatar": "http://gravatar.com/avatar/c40ef3e492c1fc1e2b21cfd1eb7be38b?s=25" + } + ] + }, + { + "id": "jaxrs/client-negotiation/", + "name": "Client negotiation", + "description": "", + "html_url": "http://javaee.support/sample/jaxrs-client-negotiation/index.html", + "category": "JAXRS", + "last_updated": "2014-07-15 02:29:38 +0200", + "usage": [ + "JAXRS" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Aslak Knutsen", + "avatar": "http://gravatar.com/avatar/3f27861ec08730fd02c91fe4129d2668?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "jaxrs/dynamicfilter/", + "name": "Dynamicfilter", + "description": "", + "html_url": "http://javaee.support/sample/jaxrs-dynamicfilter/index.html", + "category": "JAXRS", + "last_updated": "2014-07-15 02:29:38 +0200", + "usage": [ + "JAXRS" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Aslak Knutsen", + "avatar": "http://gravatar.com/avatar/3f27861ec08730fd02c91fe4129d2668?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "jaxrs/fileupload/", + "name": "Fileupload", + "description": "", + "html_url": "http://javaee.support/sample/jaxrs-fileupload/index.html", + "category": "JAXRS", + "last_updated": "2014-05-28 21:24:18 +0200", + "usage": [ + "JAXRS" + ], + "authors": [ + { + "name": "Xavier Coulon", + "avatar": "http://gravatar.com/avatar/c40ef3e492c1fc1e2b21cfd1eb7be38b?s=25" + } + ] + }, + { + "id": "jaxrs/filter/", + "name": "Filter", + "description": "", + "html_url": "http://javaee.support/sample/jaxrs-filter/index.html", + "category": "JAXRS", + "last_updated": "2014-07-15 02:29:38 +0200", + "usage": [ + "JAXRS" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Aslak Knutsen", + "avatar": "http://gravatar.com/avatar/3f27861ec08730fd02c91fe4129d2668?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "jaxrs/filter-interceptor/", + "name": "Filter interceptor", + "description": "", + "html_url": "http://javaee.support/sample/jaxrs-filter-interceptor/index.html", + "category": "JAXRS", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + "JAXRS", + "Servlet" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "jaxrs/interceptor/", + "name": "Interceptor", + "description": "", + "html_url": "http://javaee.support/sample/jaxrs-interceptor/index.html", + "category": "JAXRS", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + "JAXRS", + "Servlet" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "jaxrs/invocation/", + "name": "Invocation", + "description": "", + "html_url": "http://javaee.support/sample/jaxrs-invocation/index.html", + "category": "JAXRS", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + "JAXRS", + "Servlet" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "jaxrs/invocation-async/", + "name": "Invocation async", + "description": "", + "html_url": "http://javaee.support/sample/jaxrs-invocation-async/index.html", + "category": "JAXRS", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + "JAXRS", + "Servlet" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "jaxrs/jaxrs-client/", + "name": "Jaxrs client", + "description": "", + "html_url": "http://javaee.support/sample/jaxrs-jaxrs-client/index.html", + "category": "JAXRS", + "last_updated": "2014-12-11 00:10:53 +0100", + "usage": [ + "EJB", + "JAXRS", + "CDI", + "JSON" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Aslak Knutsen", + "avatar": "http://gravatar.com/avatar/3f27861ec08730fd02c91fe4129d2668?s=25" + }, + { + "name": "Petr Sakař", + "avatar": "http://gravatar.com/avatar/d18456efd65cb895472c4e85202e2620?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + }, + { + "name": "Nikolaos Ballas", + "avatar": "http://gravatar.com/avatar/2ebd874a9c8b72fdfda75526e564f926?s=25" + } + ] + }, + { + "id": "jaxrs/jaxrs-endpoint/", + "name": "Jaxrs endpoint", + "description": "", + "html_url": "http://javaee.support/sample/jaxrs-jaxrs-endpoint/index.html", + "category": "JAXRS", + "last_updated": "2014-10-05 05:52:25 +0200", + "usage": [ + "JAXRS" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Aslak Knutsen", + "avatar": "http://gravatar.com/avatar/3f27861ec08730fd02c91fe4129d2668?s=25" + }, + { + "name": "John Ament", + "avatar": "http://gravatar.com/avatar/?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + }, + { + "name": "Nikolaos Ballas", + "avatar": "http://gravatar.com/avatar/2ebd874a9c8b72fdfda75526e564f926?s=25" + } + ] + }, + { + "id": "jaxrs/jsonp/", + "name": "Jsonp", + "description": "", + "html_url": "http://javaee.support/sample/jaxrs-jsonp/index.html", + "category": "JAXRS", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + "JAXRS", + "JSON" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Aslak Knutsen", + "avatar": "http://gravatar.com/avatar/3f27861ec08730fd02c91fe4129d2668?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "jaxrs/link/", + "name": "Link", + "description": "", + "html_url": "http://javaee.support/sample/jaxrs-link/index.html", + "category": "JAXRS", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + "JAXRS" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Jeff Zhang", + "avatar": "http://gravatar.com/avatar/4cfdd003569598eb05daf51da2cb2d28?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "jaxrs/mapping-exceptions/", + "name": "Mapping exceptions", + "description": "", + "html_url": "http://javaee.support/sample/jaxrs-mapping-exceptions/index.html", + "category": "JAXRS", + "last_updated": "2014-07-15 02:29:38 +0200", + "usage": [ + "JAXRS" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Aslak Knutsen", + "avatar": "http://gravatar.com/avatar/3f27861ec08730fd02c91fe4129d2668?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "jaxrs/paramconverter/", + "name": "Paramconverter", + "description": "", + "html_url": "http://javaee.support/sample/jaxrs-paramconverter/index.html", + "category": "JAXRS", + "last_updated": "2014-05-28 12:00:03 +0200", + "usage": [ + "JAXRS" + ], + "authors": [ + { + "name": "Xavier Coulon", + "avatar": "http://gravatar.com/avatar/c40ef3e492c1fc1e2b21cfd1eb7be38b?s=25" + } + ] + }, + { + "id": "jaxrs/readerwriter/", + "name": "Readerwriter", + "description": "", + "html_url": "http://javaee.support/sample/jaxrs-readerwriter/index.html", + "category": "JAXRS", + "last_updated": "2014-07-15 02:29:38 +0200", + "usage": [ + "JAXRS" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Aslak Knutsen", + "avatar": "http://gravatar.com/avatar/3f27861ec08730fd02c91fe4129d2668?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "jaxrs/readerwriter-json/", + "name": "Readerwriter json", + "description": "", + "html_url": "http://javaee.support/sample/jaxrs-readerwriter-json/index.html", + "category": "JAXRS", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + "JAXRS", + "JSON", + "Servlet" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "jaxrs/request-binding/", + "name": "Request binding", + "description": "", + "html_url": "http://javaee.support/sample/jaxrs-request-binding/index.html", + "category": "JAXRS", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + "JAXRS", + "Servlet" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "jaxrs/resource-validation/", + "name": "Resource validation", + "description": "", + "html_url": "http://javaee.support/sample/jaxrs-resource-validation/index.html", + "category": "JAXRS", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + "validation", + "JAXRS", + "Servlet", + "JSON" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + }, + { + "name": "Dagguh", + "avatar": "http://gravatar.com/avatar/b7b64a8107a98a7ab23e45b6809432e3?s=25" + } + ] + }, + { + "id": "jaxrs/server-negotiation/", + "name": "Server negotiation", + "description": "", + "html_url": "http://javaee.support/sample/jaxrs-server-negotiation/index.html", + "category": "JAXRS", + "last_updated": "2014-07-15 02:29:38 +0200", + "usage": [ + "JAXRS" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Aslak Knutsen", + "avatar": "http://gravatar.com/avatar/3f27861ec08730fd02c91fe4129d2668?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "jaxrs/singleton/", + "name": "singleton", + "description": "", + "html_url": "http://javaee.support/sample/jaxrs-singleton/index.html", + "category": "JAXRS", + "last_updated": "2014-12-11 00:10:53 +0100", + "usage": [ + "JAXRS", + "CDI" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Aslak Knutsen", + "avatar": "http://gravatar.com/avatar/3f27861ec08730fd02c91fe4129d2668?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "jaxrs/readerwriter-injection/", + "name": "Readerwriter injection", + "description": "", + "html_url": "http://javaee.support/sample/jaxrs-readerwriter-injection/index.html", + "category": "JAXRS", + "last_updated": "2014-07-15 02:29:38 +0200", + "usage": [ + "JAXRS", + "CDI" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Aslak Knutsen", + "avatar": "http://gravatar.com/avatar/3f27861ec08730fd02c91fe4129d2668?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "jaxrs/jaxrs-security-declarative/", + "name": "Jaxrs security declarative", + "description": "", + "html_url": "http://javaee.support/sample/jaxrs-jaxrs-security-declarative/index.html", + "category": "JAXRS", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + "JAXRS", + "EJB", + "CDI" + ], + "authors": [ + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + }, + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + } + ] + }, + { + "id": "jaxrs/db-access/", + "name": "Db access", + "description": "", + "html_url": "http://javaee.support/sample/jaxrs-db-access/index.html", + "category": "JAXRS", + "last_updated": "2014-04-04 02:35:38 +0200", + "usage": [ + "JAXRS", + "JPA", + "EJB" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + } + ] + }, + { + "id": "jaxws/jaxws-endpoint/", + "name": "Jaxws endpoint", + "description": "", + "html_url": "http://javaee.support/sample/jaxws-jaxws-endpoint/index.html", + "category": "jaxws", + "last_updated": "2014-12-01 21:39:04 +0100", + "usage": [ + "jaxws" + ], + "authors": [ + { + "name": "Fermin Gallego", + "avatar": "http://gravatar.com/avatar/1fded788acc506a3246215f9e7fbc92f?s=25" + }, + { + "name": "Nico Schlebusch", + "avatar": "http://gravatar.com/avatar/?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "jaxws/jaxws-client/", + "name": "Jaxws client", + "description": "", + "html_url": "http://javaee.support/sample/jaxws-jaxws-client/index.html", + "category": "jaxws", + "last_updated": "2014-02-10 22:42:33 +0100", + "usage": [ + + ], + "authors": [ + { + "name": "Fermin Gallego", + "avatar": "http://gravatar.com/avatar/1fded788acc506a3246215f9e7fbc92f?s=25" + } + ] + }, + { + "id": "jca/connector-simple/connector/", + "name": "connector", + "description": "", + "html_url": "http://javaee.support/sample/jca-connector-simple-connector/index.html", + "category": "JCA", + "last_updated": "2014-07-15 02:29:38 +0200", + "usage": [ + "JCA", + "JTA", + "JASPIC" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Jeff Zhang", + "avatar": "http://gravatar.com/avatar/4cfdd003569598eb05daf51da2cb2d28?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "jms/jms-xa/", + "name": "Jms xa", + "description": "Arquillian test for JMS XA", + "html_url": "http://javaee.support/sample/jms-jms-xa/index.html", + "category": "JMS", + "last_updated": "2014-10-05 05:52:25 +0200", + "usage": [ + "EJB", + "CDI", + "JPA", + "JTA", + "JMS" + ], + "authors": [ + { + "name": "John Ament", + "avatar": "http://gravatar.com/avatar/?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + }, + { + "name": "Bernard Labno", + "avatar": "http://gravatar.com/avatar/4da9d21f8432bc5a2aebda9af268d34c?s=25" + } + ] + }, + { + "id": "jms/send-receive/", + "name": "Send receive", + "description": "", + "html_url": "http://javaee.support/sample/jms-send-receive/index.html", + "category": "JMS", + "last_updated": "2014-10-05 05:52:25 +0200", + "usage": [ + "EJB", + "JMS", + "CDI" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Aslak Knutsen", + "avatar": "http://gravatar.com/avatar/3f27861ec08730fd02c91fe4129d2668?s=25" + }, + { + "name": "John Ament", + "avatar": "http://gravatar.com/avatar/?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + }, + { + "name": "Patrik Duditš", + "avatar": "http://gravatar.com/avatar/19a56ae56e133a56dd06d22be7d283ae?s=25" + } + ] + }, + { + "id": "jms/temp-destination/", + "name": "Temporary destinations", + "description": "Request/Response over JMS", + "html_url": "http://javaee.support/sample/jms-temp-destination/index.html", + "category": "JMS", + "last_updated": "2014-10-05 05:52:25 +0200", + "usage": [ + "JMS", + "EJB", + "CDI" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Aslak Knutsen", + "avatar": "http://gravatar.com/avatar/3f27861ec08730fd02c91fe4129d2668?s=25" + }, + { + "name": "John Ament", + "avatar": "http://gravatar.com/avatar/?s=25" + }, + { + "name": "Patrik Duditš", + "avatar": "http://gravatar.com/avatar/19a56ae56e133a56dd06d22be7d283ae?s=25" + } + ] + }, + { + "id": "jms/jms-batch/", + "name": "Batch JMS processing", + "description": "ItemReader reading from durable subscription", + "html_url": "http://javaee.support/sample/jms-jms-batch/index.html", + "category": "JMS", + "last_updated": "2014-10-05 05:52:25 +0200", + "usage": [ + "JMS", + "Batch", + "CDI", + "EJB" + ], + "authors": [ + { + "name": "Aslak Knutsen", + "avatar": "http://gravatar.com/avatar/3f27861ec08730fd02c91fe4129d2668?s=25" + }, + { + "name": "John Ament", + "avatar": "http://gravatar.com/avatar/?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + }, + { + "name": "Patrik Duditš", + "avatar": "http://gravatar.com/avatar/19a56ae56e133a56dd06d22be7d283ae?s=25" + } + ] + }, + { + "id": "jpa/criteria/", + "name": "JPA Criteria API", + "description": "Using the Criteria API to create queries", + "html_url": "http://javaee.support/sample/jpa-criteria/index.html", + "category": "JPA", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + "JPA", + "validation", + "EJB", + "CDI" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "jpa/datasourcedefinition/", + "name": "Datasourcedefinition", + "description": "", + "html_url": "http://javaee.support/sample/jpa-datasourcedefinition/index.html", + "category": "JPA", + "last_updated": "2014-10-05 05:52:25 +0200", + "usage": [ + "EJB" + ], + "authors": [ + { + "name": "Alexis Hassler", + "avatar": "http://gravatar.com/avatar/fe38721931b2933e6b3749015c1d4b55?s=25" + }, + { + "name": "Aslak Knutsen", + "avatar": "http://gravatar.com/avatar/3f27861ec08730fd02c91fe4129d2668?s=25" + }, + { + "name": "John Ament", + "avatar": "http://gravatar.com/avatar/?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "jpa/datasourcedefinition-webxml-pu/", + "name": "Datasourcedefinition webxml pu", + "description": "", + "html_url": "http://javaee.support/sample/jpa-datasourcedefinition-webxml-pu/index.html", + "category": "JPA", + "last_updated": "2014-01-28 20:26:35 +0100", + "usage": [ + "JPA", + "EJB", + "CDI" + ], + "authors": [ + { + "name": "Arjan Tijms", + "avatar": "http://gravatar.com/avatar/d383928ce35a8dab6f4cf8f4e5e269b9?s=25" + } + ] + }, + { + "id": "jpa/datasourcedefinition-annotation-pu/", + "name": "Datasourcedefinition annotation pu", + "description": "", + "html_url": "http://javaee.support/sample/jpa-datasourcedefinition-annotation-pu/index.html", + "category": "JPA", + "last_updated": "2014-01-28 20:26:35 +0100", + "usage": [ + "EJB", + "JPA", + "CDI" + ], + "authors": [ + { + "name": "Arjan Tijms", + "avatar": "http://gravatar.com/avatar/d383928ce35a8dab6f4cf8f4e5e269b9?s=25" + } + ] + }, + { + "id": "jpa/datasourcedefinition-applicationxml-pu/", + "name": "Datasourcedefinition applicationxml pu", + "description": "", + "html_url": "http://javaee.support/sample/jpa-datasourcedefinition-applicationxml-pu/index.html", + "category": "JPA", + "last_updated": "2014-06-10 16:54:14 +0200", + "usage": [ + "JPA", + "EJB", + "CDI" + ], + "authors": [ + { + "name": "Arjan Tijms", + "avatar": "http://gravatar.com/avatar/d383928ce35a8dab6f4cf8f4e5e269b9?s=25" + } + ] + }, + { + "id": "jpa/dynamic-named-query/", + "name": "Dynamic named query", + "description": "", + "html_url": "http://javaee.support/sample/jpa-dynamic-named-query/index.html", + "category": "JPA", + "last_updated": "2013-12-22 17:18:02 +0100", + "usage": [ + "JPA", + "EJB", + "CDI" + ], + "authors": [ + { + "name": "Arjan Tijms", + "avatar": "http://gravatar.com/avatar/d383928ce35a8dab6f4cf8f4e5e269b9?s=25" + } + ] + }, + { + "id": "jpa/entitygraph/", + "name": "Entitygraph", + "description": "", + "html_url": "http://javaee.support/sample/jpa-entitygraph/index.html", + "category": "JPA", + "last_updated": "2014-12-08 12:47:03 +0100", + "usage": [ + "JPA", + "validation", + "EJB", + "CDI" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "jpa/listeners/", + "name": "JPA Listeners", + "description": "Invocation examples of all the available Entity Listeners", + "html_url": "http://javaee.support/sample/jpa-listeners/index.html", + "category": "JPA", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + "JPA", + "validation", + "EJB", + "CDI" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "jpa/listeners-injection/", + "name": "JPA Listeners Injection", + "description": "JPA 2.1 Entity Listeners injection", + "html_url": "http://javaee.support/sample/jpa-listeners-injection/index.html", + "category": "JPA", + "last_updated": "2014-02-03 21:45:45 +0100", + "usage": [ + "JPA", + "validation", + "EJB" + ], + "authors": [ + { + "name": "Kuba Marchwicki", + "avatar": "http://gravatar.com/avatar/b5405045448a182b8ee12236ec63d8b0?s=25" + } + ] + }, + { + "id": "jpa/multiple-pu/", + "name": "Multiple pu", + "description": "", + "html_url": "http://javaee.support/sample/jpa-multiple-pu/index.html", + "category": "JPA", + "last_updated": "2014-12-04 17:34:39 +0100", + "usage": [ + "JPA", + "validation", + "EJB", + "CDI" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "jpa/storedprocedure/", + "name": "Storedprocedure", + "description": "", + "html_url": "http://javaee.support/sample/jpa-storedprocedure/index.html", + "category": "JPA", + "last_updated": "2014-12-08 12:52:48 +0100", + "usage": [ + "JPA", + "validation", + "EJB", + "CDI" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "jpa/jndi-context/", + "name": "Jndi context", + "description": "", + "html_url": "http://javaee.support/sample/jpa-jndi-context/index.html", + "category": "JPA", + "last_updated": "2014-12-01 21:39:04 +0100", + "usage": [ + "JPA", + "EJB", + "CDI" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "jpa/locking-optimistic/", + "name": "Locking optimistic", + "description": "", + "html_url": "http://javaee.support/sample/jpa-locking-optimistic/index.html", + "category": "JPA", + "last_updated": "2014-12-05 20:10:28 +0100", + "usage": [ + "JPA", + "validation", + "EJB", + "Concurrency", + "CDI" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "jpa/locking-pessimistic/", + "name": "Locking pessimistic", + "description": "", + "html_url": "http://javaee.support/sample/jpa-locking-pessimistic/index.html", + "category": "JPA", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + "JPA", + "validation", + "EJB", + "Servlet" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "jpa/ordercolumn/", + "name": "Ordercolumn", + "description": "", + "html_url": "http://javaee.support/sample/jpa-ordercolumn/index.html", + "category": "JPA", + "last_updated": "2014-10-05 00:52:22 +0200", + "usage": [ + "JPA", + "EJB" + ], + "authors": [ + { + "name": "Arjan Tijms", + "avatar": "http://gravatar.com/avatar/d383928ce35a8dab6f4cf8f4e5e269b9?s=25" + } + ] + }, + { + "id": "jpa/pu-typesafe/", + "name": "Pu typesafe", + "description": "", + "html_url": "http://javaee.support/sample/jpa-pu-typesafe/index.html", + "category": "JPA", + "last_updated": "2014-12-04 17:54:24 +0100", + "usage": [ + "JPA", + "validation", + "EJB", + "CDI" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "jpa/schema-gen-metadata/", + "name": "Schema gen metadata", + "description": "", + "html_url": "http://javaee.support/sample/jpa-schema-gen-metadata/index.html", + "category": "JPA", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + "JPA", + "EJB", + "CDI" + ], + "authors": [ + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + }, + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + } + ] + }, + { + "id": "jpa/schema-gen-scripts/", + "name": "Schema gen scripts", + "description": "", + "html_url": "http://javaee.support/sample/jpa-schema-gen-scripts/index.html", + "category": "JPA", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + "JPA", + "EJB", + "CDI", + "Servlet" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "jpa/schema-gen-scripts-external/", + "name": "Schema gen scripts external", + "description": "", + "html_url": "http://javaee.support/sample/jpa-schema-gen-scripts-external/index.html", + "category": "JPA", + "last_updated": "2014-12-05 01:03:10 +0100", + "usage": [ + "JPA", + "EJB", + "CDI" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "jpa/schema-gen-scripts-generate/", + "name": "Schema gen scripts generate", + "description": "", + "html_url": "http://javaee.support/sample/jpa-schema-gen-scripts-generate/index.html", + "category": "JPA", + "last_updated": "2014-12-05 12:07:31 +0100", + "usage": [ + "JPA" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "jpa/schema-gen-index/", + "name": "Schema gen index", + "description": "", + "html_url": "http://javaee.support/sample/jpa-schema-gen-index/index.html", + "category": "JPA", + "last_updated": "2014-12-04 23:10:13 +0100", + "usage": [ + "JPA" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "jpa/native-sql/", + "name": "JPA Native SQL", + "description": "Using the EntityManager API to perform native SQL queries", + "html_url": "http://javaee.support/sample/jpa-native-sql/index.html", + "category": "JPA", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + "JPA", + "EJB", + "CDI" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Aslak Knutsen", + "avatar": "http://gravatar.com/avatar/3f27861ec08730fd02c91fe4129d2668?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "jpa/native-sql-resultset-mapping/", + "name": "JPA Native SQL ResultSet Mapping", + "description": "Using the EntityManager API to perform native SQL queries and map the result with @SqlResultSetMapping\n annotation\n ", + "html_url": "http://javaee.support/sample/jpa-native-sql-resultset-mapping/index.html", + "category": "JPA", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + "JPA", + "EJB", + "CDI" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Aslak Knutsen", + "avatar": "http://gravatar.com/avatar/3f27861ec08730fd02c91fe4129d2668?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + }, + { + "name": "Fotofinder", + "avatar": "http://gravatar.com/avatar/36afccea721a51953536cca98e67d727?s=25" + } + ] + }, + { + "id": "jpa/unsynchronized-pc/", + "name": "Unsynchronized pc", + "description": "", + "html_url": "http://javaee.support/sample/jpa-unsynchronized-pc/index.html", + "category": "JPA", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + "JPA", + "EJB", + "CDI", + "Servlet" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "jpa/extended-pc/", + "name": "Extended pc", + "description": "", + "html_url": "http://javaee.support/sample/jpa-extended-pc/index.html", + "category": "JPA", + "last_updated": "2014-02-03 21:47:02 +0100", + "usage": [ + "EJB", + "JPA" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Kuba Marchwicki", + "avatar": "http://gravatar.com/avatar/b5405045448a182b8ee12236ec63d8b0?s=25" + } + ] + }, + { + "id": "jpa/jpa-converter/", + "name": "Jpa converter", + "description": "", + "html_url": "http://javaee.support/sample/jpa-jpa-converter/index.html", + "category": "JPA", + "last_updated": "2014-10-05 05:52:25 +0200", + "usage": [ + "EJB", + "JPA", + "CDI" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Bartosz Majsak", + "avatar": "http://gravatar.com/avatar/de13898b827f3227a9f9f31eb90a2367?s=25" + }, + { + "name": "John Ament", + "avatar": "http://gravatar.com/avatar/?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "jpa/default-datasource/", + "name": "Default datasource", + "description": "", + "html_url": "http://javaee.support/sample/jpa-default-datasource/index.html", + "category": "JPA", + "last_updated": "2014-07-10 03:05:03 +0200", + "usage": [ + "JPA", + "EJB", + "CDI" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + } + ] + }, + { + "id": "jta/transactional/", + "name": "Transactional", + "description": "", + "html_url": "http://javaee.support/sample/jta-transactional/index.html", + "category": "JTA", + "last_updated": "2014-10-05 05:52:25 +0200", + "usage": [ + "CDI", + "JTA" + ], + "authors": [ + { + "name": "Alexis Hassler", + "avatar": "http://gravatar.com/avatar/fe38721931b2933e6b3749015c1d4b55?s=25" + }, + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Aslak Knutsen", + "avatar": "http://gravatar.com/avatar/3f27861ec08730fd02c91fe4129d2668?s=25" + }, + { + "name": "John Ament", + "avatar": "http://gravatar.com/avatar/?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "jta/tx-exception/", + "name": "Tx exception", + "description": "", + "html_url": "http://javaee.support/sample/jta-tx-exception/index.html", + "category": "JTA", + "last_updated": "2014-10-05 05:52:25 +0200", + "usage": [ + "JPA", + "JTA", + "CDI" + ], + "authors": [ + { + "name": "Alexis Hassler", + "avatar": "http://gravatar.com/avatar/fe38721931b2933e6b3749015c1d4b55?s=25" + }, + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Aslak Knutsen", + "avatar": "http://gravatar.com/avatar/3f27861ec08730fd02c91fe4129d2668?s=25" + }, + { + "name": "John Ament", + "avatar": "http://gravatar.com/avatar/?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "jta/user-transaction/", + "name": "User transaction", + "description": "", + "html_url": "http://javaee.support/sample/jta-user-transaction/index.html", + "category": "JTA", + "last_updated": "2014-10-05 05:52:25 +0200", + "usage": [ + "CDI", + "JTA" + ], + "authors": [ + { + "name": "Alexis Hassler", + "avatar": "http://gravatar.com/avatar/fe38721931b2933e6b3749015c1d4b55?s=25" + }, + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Aslak Knutsen", + "avatar": "http://gravatar.com/avatar/3f27861ec08730fd02c91fe4129d2668?s=25" + }, + { + "name": "John Ament", + "avatar": "http://gravatar.com/avatar/?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "jsf/ajax/", + "name": "Ajax", + "description": "", + "html_url": "http://javaee.support/sample/jsf-ajax/index.html", + "category": "JSF", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + "CDI", + "JSF" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "jsf/bean-validation/", + "name": "Bean validation", + "description": "", + "html_url": "http://javaee.support/sample/jsf-bean-validation/index.html", + "category": "JSF", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + "CDI", + "validation" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "jsf/components/", + "name": "Components", + "description": "", + "html_url": "http://javaee.support/sample/jsf-components/index.html", + "category": "JSF", + "last_updated": "2013-09-17 22:05:19 +0200", + "usage": [ + "CDI" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + } + ] + }, + { + "id": "jsf/composite-component/", + "name": "Composite component", + "description": "", + "html_url": "http://javaee.support/sample/jsf-composite-component/index.html", + "category": "JSF", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + "CDI" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + }, + { + "name": "Tomas Remes", + "avatar": "http://gravatar.com/avatar/f9bd8b8796f11c7296086248441c3a8c?s=25" + }, + { + "name": "Andrey Cheptsov", + "avatar": "http://gravatar.com/avatar/0cc8697d22e45bf9681a15ee56ce66d2?s=25" + } + ] + }, + { + "id": "jsf/contracts/", + "name": "Contracts", + "description": "", + "html_url": "http://javaee.support/sample/jsf-contracts/index.html", + "category": "JSF", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + "CDI" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + }, + { + "name": "Andrey Cheptsov", + "avatar": "http://gravatar.com/avatar/0cc8697d22e45bf9681a15ee56ce66d2?s=25" + } + ] + }, + { + "id": "jsf/contracts-library/", + "name": "Contracts library", + "description": "", + "html_url": "http://javaee.support/sample/jsf-contracts-library/index.html", + "category": "JSF", + "last_updated": "2014-07-15 01:36:28 +0200", + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "jsf/contracts-library-impl/", + "name": "Contracts library impl", + "description": "", + "html_url": "http://javaee.support/sample/jsf-contracts-library-impl/index.html", + "category": "JSF", + "last_updated": "2013-08-27 21:05:47 +0200", + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + } + ] + }, + { + "id": "jsf/file-upload/", + "name": "File upload", + "description": "", + "html_url": "http://javaee.support/sample/jsf-file-upload/index.html", + "category": "JSF", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + "CDI", + "Servlet" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "jsf/flows-simple/", + "name": "Flows simple", + "description": "", + "html_url": "http://javaee.support/sample/jsf-flows-simple/index.html", + "category": "JSF", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + "JSF", + "CDI" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "jsf/flows-mixed/", + "name": "Flows mixed", + "description": "", + "html_url": "http://javaee.support/sample/jsf-flows-mixed/index.html", + "category": "JSF", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + "JSF", + "CDI" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + }, + { + "name": "Andrey Cheptsov", + "avatar": "http://gravatar.com/avatar/0cc8697d22e45bf9681a15ee56ce66d2?s=25" + } + ] + }, + { + "id": "jsf/flows-programmatic/", + "name": "Flows programmatic", + "description": "", + "html_url": "http://javaee.support/sample/jsf-flows-programmatic/index.html", + "category": "JSF", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + "JSF", + "CDI" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "jsf/flows-declarative/", + "name": "Flows declarative", + "description": "", + "html_url": "http://javaee.support/sample/jsf-flows-declarative/index.html", + "category": "JSF", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + "JSF", + "CDI" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "jsf/http-get/", + "name": "Http get", + "description": "", + "html_url": "http://javaee.support/sample/jsf-http-get/index.html", + "category": "JSF", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + "CDI", + "JSF" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "jsf/passthrough/", + "name": "Passthrough", + "description": "", + "html_url": "http://javaee.support/sample/jsf-passthrough/index.html", + "category": "JSF", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + "CDI" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "jsf/radio-buttons/", + "name": "Radio buttons", + "description": "", + "html_url": "http://javaee.support/sample/jsf-radio-buttons/index.html", + "category": "JSF", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + "JPA", + "validation", + "CDI" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "jsf/resource-handling/", + "name": "Resource handling", + "description": "", + "html_url": "http://javaee.support/sample/jsf-resource-handling/index.html", + "category": "JSF", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + "CDI", + "EJB" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + }, + { + "name": "Andrey Cheptsov", + "avatar": "http://gravatar.com/avatar/0cc8697d22e45bf9681a15ee56ce66d2?s=25" + } + ] + }, + { + "id": "jsf/simple-facelet/", + "name": "Simple facelet", + "description": "", + "html_url": "http://javaee.support/sample/jsf-simple-facelet/index.html", + "category": "JSF", + "last_updated": "2014-10-05 05:52:25 +0200", + "usage": [ + "CDI", + "EJB" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "John Ament", + "avatar": "http://gravatar.com/avatar/?s=25" + }, + { + "name": "Juraj Huska", + "avatar": "http://gravatar.com/avatar/937262449f9882b576aa893299a46d41?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "jsf/server-extension/", + "name": "Server extension", + "description": "", + "html_url": "http://javaee.support/sample/jsf-server-extension/index.html", + "category": "JSF", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + "CDI", + "JSF" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "jsf/viewscoped/", + "name": "Viewscoped", + "description": "", + "html_url": "http://javaee.support/sample/jsf-viewscoped/index.html", + "category": "JSF", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + "JSF" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + }, + { + "name": "Tomas Remes", + "avatar": "http://gravatar.com/avatar/f9bd8b8796f11c7296086248441c3a8c?s=25" + } + ] + }, + { + "id": "json/object-builder/", + "name": "Object builder", + "description": "", + "html_url": "http://javaee.support/sample/json-object-builder/index.html", + "category": "JSON", + "last_updated": "2014-10-05 05:52:25 +0200", + "usage": [ + "JSON" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Aslak Knutsen", + "avatar": "http://gravatar.com/avatar/3f27861ec08730fd02c91fe4129d2668?s=25" + }, + { + "name": "John Ament", + "avatar": "http://gravatar.com/avatar/?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "json/object-reader/", + "name": "Object reader", + "description": "", + "html_url": "http://javaee.support/sample/json-object-reader/index.html", + "category": "JSON", + "last_updated": "2014-07-15 02:29:38 +0200", + "usage": [ + "JSON" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "json/streaming-generate/", + "name": "Streaming generate", + "description": "", + "html_url": "http://javaee.support/sample/json-streaming-generate/index.html", + "category": "JSON", + "last_updated": "2014-07-15 02:29:38 +0200", + "usage": [ + "JSON" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "json/streaming-parser/", + "name": "Streaming parser", + "description": "", + "html_url": "http://javaee.support/sample/json-streaming-parser/index.html", + "category": "JSON", + "last_updated": "2014-07-15 02:29:38 +0200", + "usage": [ + "JSON" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "servlet/cookies/", + "name": "Cookies", + "description": "", + "html_url": "http://javaee.support/sample/servlet-cookies/index.html", + "category": "Servlet", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + "Servlet" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "servlet/async-servlet/", + "name": "Async servlet", + "description": "", + "html_url": "http://javaee.support/sample/servlet-async-servlet/index.html", + "category": "Servlet", + "last_updated": "2014-11-10 22:16:56 +0100", + "usage": [ + "Concurrency", + "CDI", + "Servlet" + ], + "authors": [ + { + "name": "Alexander Heusingfeld", + "avatar": "http://gravatar.com/avatar/aba82ecdcf1e1534f2c579d124d8cd35?s=25" + }, + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "servlet/error-mapping/", + "name": "Error mapping", + "description": "", + "html_url": "http://javaee.support/sample/servlet-error-mapping/index.html", + "category": "Servlet", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + "Servlet" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "servlet/event-listeners/", + "name": "Event listeners", + "description": "", + "html_url": "http://javaee.support/sample/servlet-event-listeners/index.html", + "category": "Servlet", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + "Servlet" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "servlet/metadata-complete/", + "name": "Metadata complete", + "description": "", + "html_url": "http://javaee.support/sample/servlet-metadata-complete/index.html", + "category": "Servlet", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + "Servlet" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "servlet/nonblocking/", + "name": "Nonblocking", + "description": "", + "html_url": "http://javaee.support/sample/servlet-nonblocking/index.html", + "category": "Servlet", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + "Servlet" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "servlet/protocol-handler/", + "name": "Protocol handler", + "description": "", + "html_url": "http://javaee.support/sample/servlet-protocol-handler/index.html", + "category": "Servlet", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + "Servlet" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "servlet/resource-packaging/", + "name": "Resource packaging", + "description": "", + "html_url": "http://javaee.support/sample/servlet-resource-packaging/index.html", + "category": "Servlet", + "last_updated": "2013-12-04 09:33:58 +0100", + "usage": [ + "JAXRS" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Aslak Knutsen", + "avatar": "http://gravatar.com/avatar/3f27861ec08730fd02c91fe4129d2668?s=25" + }, + { + "name": "Kuba Marchwicki", + "avatar": "http://gravatar.com/avatar/b5405045448a182b8ee12236ec63d8b0?s=25" + } + ] + }, + { + "id": "servlet/servlet-filters/", + "name": "Servlet filters", + "description": "", + "html_url": "http://javaee.support/sample/servlet-servlet-filters/index.html", + "category": "Servlet", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + "Servlet", + "JAXRS" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + }, + { + "name": "Kuba Marchwicki", + "avatar": "http://gravatar.com/avatar/b5405045448a182b8ee12236ec63d8b0?s=25" + } + ] + }, + { + "id": "servlet/file-upload/", + "name": "File upload", + "description": "", + "html_url": "http://javaee.support/sample/servlet-file-upload/index.html", + "category": "Servlet", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + "Servlet" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + }, + { + "name": "Kuba Marchwicki", + "avatar": "http://gravatar.com/avatar/b5405045448a182b8ee12236ec63d8b0?s=25" + } + ] + }, + { + "id": "servlet/web-fragment/", + "name": "Web fragment", + "description": "", + "html_url": "http://javaee.support/sample/servlet-web-fragment/index.html", + "category": "Servlet", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + "Servlet" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "servlet/security-basicauth/", + "name": "security-basicauth", + "description": "", + "html_url": "http://javaee.support/sample/servlet-security-basicauth/index.html", + "category": "Servlet", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + "Servlet" + ], + "authors": [ + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + }, + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + } + ] + }, + { + "id": "servlet/security-form-based/", + "name": "security-form-based", + "description": "", + "html_url": "http://javaee.support/sample/servlet-security-form-based/index.html", + "category": "Servlet", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + + ], + "authors": [ + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + }, + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + } + ] + }, + { + "id": "servlet/security-programmatic/", + "name": "security-programmatic", + "description": "", + "html_url": "http://javaee.support/sample/servlet-security-programmatic/index.html", + "category": "Servlet", + "last_updated": "2014-07-12 22:57:53 +0200", + "usage": [ + "Servlet" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + } + ] + }, + { + "id": "servlet/security-deny-uncovered/", + "name": "Security deny uncovered", + "description": "", + "html_url": "http://javaee.support/sample/servlet-security-deny-uncovered/index.html", + "category": "Servlet", + "last_updated": "2014-07-12 22:57:53 +0200", + "usage": [ + "Servlet", + "JAXRS" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + } + ] + }, + { + "id": "servlet/security-basicauth-omission/", + "name": "Security basicauth omission", + "description": "", + "html_url": "http://javaee.support/sample/servlet-security-basicauth-omission/index.html", + "category": "Servlet", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + "Servlet", + "JAXRS" + ], + "authors": [ + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + }, + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + } + ] + }, + { + "id": "servlet/programmatic-registration/", + "name": "Programmatic registration", + "description": "", + "html_url": "http://javaee.support/sample/servlet-programmatic-registration/index.html", + "category": "Servlet", + "last_updated": "2014-07-12 23:00:01 +0200", + "usage": [ + "Servlet" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + } + ] + }, + { + "id": "servlet/simple-servlet/", + "name": "Simple servlet", + "description": "", + "html_url": "http://javaee.support/sample/servlet-simple-servlet/index.html", + "category": "Servlet", + "last_updated": "2014-12-03 04:59:43 +0100", + "usage": [ + "Servlet" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + } + ] + }, + { + "id": "validation/methods/", + "name": "Methods", + "description": "", + "html_url": "http://javaee.support/sample/validation-methods/index.html", + "category": "validation", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + "validation", + "CDI" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + }, + { + "name": "Kuba Marchwicki", + "avatar": "http://gravatar.com/avatar/b5405045448a182b8ee12236ec63d8b0?s=25" + } + ] + }, + { + "id": "validation/custom-constraint/", + "name": "Custom constraint", + "description": "", + "html_url": "http://javaee.support/sample/validation-custom-constraint/index.html", + "category": "validation", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + "validation", + "CDI" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Aslak Knutsen", + "avatar": "http://gravatar.com/avatar/3f27861ec08730fd02c91fe4129d2668?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + }, + { + "name": "Kuba Marchwicki", + "avatar": "http://gravatar.com/avatar/b5405045448a182b8ee12236ec63d8b0?s=25" + } + ] + }, + { + "id": "websocket/chat/", + "name": "Chat", + "description": "", + "html_url": "http://javaee.support/sample/websocket-chat/index.html", + "category": "WebSocket", + "last_updated": "2014-10-18 00:56:29 +0200", + "usage": [ + "WebSocket" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "websocket/encoder/", + "name": "Encoder", + "description": "", + "html_url": "http://javaee.support/sample/websocket-encoder/index.html", + "category": "WebSocket", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + "JSON", + "WebSocket" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Aslak Knutsen", + "avatar": "http://gravatar.com/avatar/3f27861ec08730fd02c91fe4129d2668?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "websocket/encoder-client/", + "name": "Encoder client", + "description": "", + "html_url": "http://javaee.support/sample/websocket-encoder-client/index.html", + "category": "WebSocket", + "last_updated": "2014-07-15 02:29:38 +0200", + "usage": [ + "JSON", + "WebSocket" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Aslak Knutsen", + "avatar": "http://gravatar.com/avatar/3f27861ec08730fd02c91fe4129d2668?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "websocket/encoder-programmatic/", + "name": "Encoder programmatic", + "description": "", + "html_url": "http://javaee.support/sample/websocket-encoder-programmatic/index.html", + "category": "WebSocket", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + "WebSocket", + "JSON" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Aslak Knutsen", + "avatar": "http://gravatar.com/avatar/3f27861ec08730fd02c91fe4129d2668?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "websocket/endpoint/", + "name": "Endpoint", + "description": "", + "html_url": "http://javaee.support/sample/websocket-endpoint/index.html", + "category": "WebSocket", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + "WebSocket" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Aslak Knutsen", + "avatar": "http://gravatar.com/avatar/3f27861ec08730fd02c91fe4129d2668?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "websocket/endpoint-async/", + "name": "Endpoint async", + "description": "", + "html_url": "http://javaee.support/sample/websocket-endpoint-async/index.html", + "category": "WebSocket", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + "WebSocket" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Jacek Jackowiak", + "avatar": "http://gravatar.com/avatar/c93288fc81c8445bfa92736b52a554f1?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "websocket/endpoint-javatypes/", + "name": "Endpoint javatypes", + "description": "", + "html_url": "http://javaee.support/sample/websocket-endpoint-javatypes/index.html", + "category": "WebSocket", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + "WebSocket" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "websocket/endpoint-config/", + "name": "Endpoint config", + "description": "", + "html_url": "http://javaee.support/sample/websocket-endpoint-config/index.html", + "category": "WebSocket", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + "WebSocket" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "websocket/endpoint-programmatic/", + "name": "Endpoint programmatic", + "description": "", + "html_url": "http://javaee.support/sample/websocket-endpoint-programmatic/index.html", + "category": "WebSocket", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + "WebSocket" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Aslak Knutsen", + "avatar": "http://gravatar.com/avatar/3f27861ec08730fd02c91fe4129d2668?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "websocket/endpoint-programmatic-async/", + "name": "Endpoint programmatic async", + "description": "", + "html_url": "http://javaee.support/sample/websocket-endpoint-programmatic-async/index.html", + "category": "WebSocket", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + "WebSocket" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "websocket/endpoint-programmatic-config/", + "name": "Endpoint programmatic config", + "description": "", + "html_url": "http://javaee.support/sample/websocket-endpoint-programmatic-config/index.html", + "category": "WebSocket", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + "WebSocket" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "websocket/endpoint-programmatic-injection/", + "name": "Endpoint programmatic injection", + "description": "", + "html_url": "http://javaee.support/sample/websocket-endpoint-programmatic-injection/index.html", + "category": "WebSocket", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + "WebSocket", + "EJB", + "CDI" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "websocket/endpoint-security/", + "name": "Endpoint security", + "description": "", + "html_url": "http://javaee.support/sample/websocket-endpoint-security/index.html", + "category": "WebSocket", + "last_updated": "2014-10-27 21:54:57 +0100", + "usage": [ + "WebSocket" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "websocket/httpsession/", + "name": "Httpsession", + "description": "", + "html_url": "http://javaee.support/sample/websocket-httpsession/index.html", + "category": "WebSocket", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + "Servlet", + "WebSocket" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "websocket/injection/", + "name": "Injection", + "description": "", + "html_url": "http://javaee.support/sample/websocket-injection/index.html", + "category": "WebSocket", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + "CDI", + "WebSocket", + "EJB" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "websocket/javase-client/", + "name": "Javase client", + "description": "", + "html_url": "http://javaee.support/sample/websocket-javase-client/index.html", + "category": "WebSocket", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + "WebSocket" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + }, + { + "name": "Nikolaos Ballas", + "avatar": "http://gravatar.com/avatar/2ebd874a9c8b72fdfda75526e564f926?s=25" + } + ] + }, + { + "id": "websocket/messagesize/", + "name": "Messagesize", + "description": "", + "html_url": "http://javaee.support/sample/websocket-messagesize/index.html", + "category": "WebSocket", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + "WebSocket" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "websocket/parameters/", + "name": "Parameters", + "description": "", + "html_url": "http://javaee.support/sample/websocket-parameters/index.html", + "category": "WebSocket", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + "WebSocket" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "websocket/properties/", + "name": "Properties", + "description": "", + "html_url": "http://javaee.support/sample/websocket-properties/index.html", + "category": "WebSocket", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + "WebSocket" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "websocket/websocket-vs-rest/", + "name": "Websocket vs rest", + "description": "", + "html_url": "http://javaee.support/sample/websocket-websocket-vs-rest/index.html", + "category": "WebSocket", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + "JAXRS", + "WebSocket" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Maxime Gréau", + "avatar": "http://gravatar.com/avatar/a81c764f137343d59a5e6264c2e3c1c2?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "websocket/subprotocol/", + "name": "Subprotocol", + "description": "", + "html_url": "http://javaee.support/sample/websocket-subprotocol/index.html", + "category": "WebSocket", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + "WebSocket" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "websocket/websocket-client/", + "name": "Websocket client", + "description": "", + "html_url": "http://javaee.support/sample/websocket-websocket-client/index.html", + "category": "WebSocket", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + "Servlet", + "WebSocket" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "websocket/websocket-client-config/", + "name": "Websocket client config", + "description": "", + "html_url": "http://javaee.support/sample/websocket-websocket-client-config/index.html", + "category": "WebSocket", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + "Servlet", + "WebSocket" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "websocket/websocket-client-programmatic/", + "name": "Websocket client programmatic", + "description": "", + "html_url": "http://javaee.support/sample/websocket-websocket-client-programmatic/index.html", + "category": "WebSocket", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + "Servlet", + "WebSocket" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "websocket/websocket-client-programmatic-config/", + "name": "Websocket client programmatic config", + "description": "", + "html_url": "http://javaee.support/sample/websocket-websocket-client-programmatic-config/index.html", + "category": "WebSocket", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + "Servlet", + "WebSocket" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "websocket/websocket-client-programmatic-encoders/", + "name": "Websocket client programmatic encoders", + "description": "", + "html_url": "http://javaee.support/sample/websocket-websocket-client-programmatic-encoders/index.html", + "category": "WebSocket", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + "JSON", + "Servlet", + "WebSocket" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "websocket/whiteboard/", + "name": "Whiteboard", + "description": "", + "html_url": "http://javaee.support/sample/websocket-whiteboard/index.html", + "category": "WebSocket", + "last_updated": "2014-10-18 00:57:31 +0200", + "usage": [ + "JSON", + "WebSocket" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Philippe Marschall", + "avatar": "http://gravatar.com/avatar/568c8fb2e5cbfe951af7cd65b7a997f8?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "websocket/endpoint-singleton/", + "name": "Endpoint singleton", + "description": "", + "html_url": "http://javaee.support/sample/websocket-endpoint-singleton/index.html", + "category": "WebSocket", + "last_updated": "2014-07-15 01:36:28 +0200", + "usage": [ + "WebSocket" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + }, + { + "name": "Roberto Cortez", + "avatar": "http://gravatar.com/avatar/d9a06fda174419c0dffb982f226518c2?s=25" + } + ] + }, + { + "id": "websocket/websocket-vs-rest-payload/", + "name": "Websocket vs rest payload", + "description": "", + "html_url": "http://javaee.support/sample/websocket-websocket-vs-rest-payload/index.html", + "category": "WebSocket", + "last_updated": "2014-02-21 23:06:26 +0100", + "usage": [ + "JAXRS", + "WebSocket" + ], + "authors": [ + { + "name": "Arun-gupta", + "avatar": "http://gravatar.com/avatar/268f57c236bb50c0f6e12ac38adc9d81?s=25" + } + ] + } +] \ No newline at end of file diff --git a/sample/index.json.slim b/sample/index.json.slim deleted file mode 100644 index 320ba10..0000000 --- a/sample/index.json.slim +++ /dev/null @@ -1,25 +0,0 @@ ---- ---- -- samples = [] -- for showcase_page in site.showcases - - showcase = showcase_page.showcase - - next if showcase.category.nil? - - sample = {} - - samples << sample - - sample[:id] = showcase.module_path - - sample[:name] = showcase.name - - sample[:description] = showcase.description.nil? ? "" : showcase.description - - sample[:html_url] = "#{site.base_url}#{showcase_page.output_path}" - - sample[:category] = showcase.category.id - - unless showcase.changes.nil? - - sample[:last_updated] = showcase.changes.first.date - - unless showcase.api_usage.nil? - - sample[:usage] = [] - - for usage in showcase.api_usage.each_key - - sample[:usage] << usage - - unless showcase.contributors.nil? - - sample[:authors] = [] - - for c in site.identities.unique_by_emails(showcase.contributors) - - sample[:authors] << {:name => c.name, :avatar => c.avatar_url(25)} - -=JSON.pretty_generate samples \ No newline at end of file diff --git a/sample/interceptor-around-construct/index.html b/sample/interceptor-around-construct/index.html new file mode 100644 index 0000000..cc67a1f --- /dev/null +++ b/sample/interceptor-around-construct/index.html @@ -0,0 +1,33 @@ +JavaEE Sample::::Around construct

                                      Around construct

                                      Run
                                      How to run the sample
                                      The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                      git clone git://github.com/javaee-samples/javaee7-samples.git
                                      cd javaee7-samples/interceptor/around-construct/
                                      Now we are ready to start testing. You can run all the tests in this sample by executing:
                                      mvn test
                                      Or you can run individual tests by executing one of the following:
                                      mvn test -Dtest=GreetingBeanTest

                                      • Specifications in use:
                                        • CDI

                                        GreetingBeanTest

                                        Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                        Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                        +
                                        +
                                        @Deployment
                                        +public static Archive<?> deploy() {
                                        +	return ShrinkWrap.create(JavaArchive.class)
                                        +			.addClasses(Greeting.class, GreetingBean.class, GreetingParam.class, MyInterceptor.class, MyInterceptorBinding.class, Param.class)
                                        +			.addAsManifestResource("beans.xml");
                                        +}
                                        +
                                        +
                                        Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                        +
                                        +
                                        @Test
                                        +public void should_be_ready() throws Exception {
                                        +	assertThat(bean, is(notNullValue()));
                                        +	assertThat(bean, instanceOf(GreetingBean.class));
                                        +	assertTrue(bean.isConstructed());
                                        +	assertTrue(bean.isInitialized());
                                        +	assertThat(bean.getParam(), instanceOf(GreetingParam.class));
                                        +}
                                        +
                                        +

                                        Share the Knowledge

                                        Find this sample useful? Share on

                                        There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                        Help Improve

                                        Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                        Recent Changelog

                                        • Oct 05, 2014: #252 fixed arquillian configuration for the jobs by John D. Ament
                                        • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                        • Mar 20, 2014: Update arquillian.xml cr1 references to final by Aslak Knutsen
                                        • Dec 31, 2013: Fixed class header by Radim Hanus
                                        • Dec 31, 2013: Added top-level directory interceptor and its first module around-construct to demonstrate using @aroundconstruct by Radim Hanus
                                        How to help improve this sample
                                        The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                        git clone git://github.com/javaee-samples/javaee7-samples.git
                                        cd javaee7-samples/interceptor/around-construct/

                                        Do the changes as you see fit and send a pull request!

                                        Good Luck!

                                        + \ No newline at end of file diff --git a/sample/jacc-contexts/index.html b/sample/jacc-contexts/index.html new file mode 100644 index 0000000..b0c9962 --- /dev/null +++ b/sample/jacc-contexts/index.html @@ -0,0 +1,145 @@ +JavaEE Sample::::Contexts

                                        Contexts

                                        Run
                                        How to run the sample
                                        The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                        git clone git://github.com/javaee-samples/javaee7-samples.git
                                        cd javaee7-samples/jacc/contexts/
                                        Now we are ready to start testing. You can run all the tests in this sample by executing:
                                        mvn test
                                        Or you can run individual tests by executing one of the following:
                                        mvn test -Dtest=SubjectFromPolicyContextTestmvn test -Dtest=RequestFromPolicyContextTest

                                        SubjectFromPolicyContextTest

                                        +

                                        This test demonstrates both how to obtain the {@link Subject} and then how to indirectly retrieve the roles from +this Subject. +<p> +This will be done by calling a Servlet that retrieves the {@link Subject} of the authenticated user. +Authentication happens via the {@link TestServerAuthModule} when the "doLogin" parameter is present in +the request. +<p> +The Subject (a "bag of principals") typically contains the user name principal that can also be obtained via +{@link HttpServletRequest#getUserPrincipal()} and may contain the roles this user has. But, it has never +been standardized in Java EE which principal (attribute) of the Subject represents the user name and +which ones represent the roles, so every container does it differently. On top of that JACC did not specify +that the Subject should be returned and implementations not rarely return a Subject that contains only the +user name principal instead of the real Subject with all principals. +<p> +Via a somewhat obscure workaround via JACC it’s possible to fetch the roles from the Subject +in a standard way. +See <a href="https://blogs.oracle.com/monzillo/entry/using_jacc_to_determine_a">Using JACC to determine a caller’s roles</a> +<p>

                                        +
                                        Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                        +
                                        +
                                        @Deployment(testable = false)
                                        +public static WebArchive createDeployment() {
                                        +    return defaultArchive().addPackages(true, "org.javaee7.jacc");
                                        +}
                                        +
                                        +
                                        +

                                        Tests that we are able to obtain a reference to the {@link Subject} from a Servlet.

                                        +
                                        +
                                        +
                                        @Test
                                        +public void testCanObtainRequestInServlet() throws IOException, SAXException {
                                        +
                                        +    String response = getFromServerPath("subjectServlet?doLogin");
                                        +
                                        +    assertTrue(response.contains("Obtained subject from context."));
                                        +}
                                        +
                                        +
                                        +

                                        Tests that we are able to obtain a reference to the {@link Subject} from a Servlet and +use JACC to get the roles the user from its principals.

                                        +
                                        +
                                        +
                                        @Test
                                        +public void testCanObtainRolesFromSubjectInServlet() throws IOException, SAXException {
                                        +
                                        +    String response = getFromServerPath("subjectServlet?doLogin");
                                        +
                                        +    // The role that was assigned to the user in TestServerAuthModule
                                        +    assertTrue(response.contains("User has role architect"));
                                        +
                                        +    // Servlet 13.3; Every authenticated user should have this role and isUserInRole should return true
                                        +    // when tested.
                                        +    assertTrue(response.contains("User has role **"));
                                        +}
                                        +
                                        +

                                        RequestFromPolicyContextTest

                                        +

                                        This tests demonstrates how code can obtain a reference to the {@link HttpServletRequest} from the JACC +context.

                                        +
                                        Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                        +
                                        +
                                        @Deployment(testable = false)
                                        +public static WebArchive createDeployment() {
                                        +    return defaultArchive().addPackages(true, "org.javaee7.jacc");
                                        +}
                                        +
                                        +
                                        +

                                        Tests that we are able to obtain a reference to the {@link HttpServletRequest} from a Servlet.

                                        +
                                        +
                                        +
                                        @Test
                                        +public void testCanObtainRequestInServlet() throws IOException, SAXException {
                                        +
                                        +    String response = getFromServerPath("requestServlet");
                                        +
                                        +    assertTrue(response.contains("Obtained request from context."));
                                        +}
                                        +
                                        +
                                        +

                                        Tests that we are able to obtain a reference to the {@link HttpServletRequest} from an EJB.

                                        +
                                        +
                                        +
                                        @Test
                                        +public void testCanObtainRequestInEJB() throws IOException, SAXException {
                                        +
                                        +    String response = getFromServerPath("requestServletEJB");
                                        +
                                        +    assertTrue(response.contains("Obtained request from context."));
                                        +}
                                        +
                                        +
                                        +

                                        Tests that the {@link HttpServletRequest} reference that we obtained from JACC in a Servlet actually +works by getting a request attribute and request parameter from it.

                                        +
                                        +
                                        +
                                        @Test
                                        +public void testDataInServlet() throws IOException, SAXException {
                                        +
                                        +    String response = getFromServerPath("requestServlet?jacc_test=true");
                                        +
                                        +    assertTrue(
                                        +        "Request scope attribute not present in request obtained from context in Servlet, but should have been",
                                        +        response.contains("Attribute present in request from context.")
                                        +    );
                                        +
                                        +    assertTrue(
                                        +        "Request parameter not present in request obtained from context in Servlet, but should have been",
                                        +        response.contains("Request parameter present in request from context.")
                                        +    );
                                        +}
                                        +
                                        +
                                        +

                                        Tests that the {@link HttpServletRequest} reference that we obtained from JACC in an EJB actually +works by getting a request attribute and request parameter from it.

                                        +
                                        +
                                        +
                                        @Test
                                        +public void testDataInEJB() throws IOException, SAXException {
                                        +
                                        +    String response = getFromServerPath("requestServlet?jacc_test=true");
                                        +
                                        +    assertTrue(
                                        +        "Request scope attribute not present in request obtained from context in EJB, but should have been",
                                        +        response.contains("Attribute present in request from context.")
                                        +    );
                                        +
                                        +    assertTrue(
                                        +        "Request parameter not present in request obtained from context in EJB, but should have been",
                                        +        response.contains("Request parameter present in request from context.")
                                        +    );
                                        +}
                                        +
                                        +

                                        Share the Knowledge

                                        Find this sample useful? Share on

                                        There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                        Help Improve

                                        Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                        Recent Changelog

                                        • Jan 31, 2014: A few jacc related; getting the request and subject from the policy by arjan tijms
                                        How to help improve this sample
                                        The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                        git clone git://github.com/javaee-samples/javaee7-samples.git
                                        cd javaee7-samples/jacc/contexts/

                                        Do the changes as you see fit and send a pull request!

                                        Good Luck!

                                        + \ No newline at end of file diff --git a/sample/jaspic-async-authentication/index.html b/sample/jaspic-async-authentication/index.html new file mode 100644 index 0000000..787cae9 --- /dev/null +++ b/sample/jaspic-async-authentication/index.html @@ -0,0 +1,32 @@ +JavaEE Sample::JASPIC::Async authentication

                                        Async authentication

                                        Run
                                        How to run the sample
                                        The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                        git clone git://github.com/javaee-samples/javaee7-samples.git
                                        cd javaee7-samples/jaspic/async-authentication/
                                        Now we are ready to start testing. You can run all the tests in this sample by executing:
                                        mvn test
                                        Or you can run individual tests by executing one of the following:
                                        mvn test -Dtest=AsyncAuthenticationPublicTest

                                        AsyncAuthenticationPublicTest

                                        Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                        Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                        +
                                        +
                                        @Deployment(testable = false)
                                        +public static WebArchive createDeployment() {
                                        +    return defaultArchive();
                                        +}
                                        +
                                        +
                                        +

                                        This tests that an async response works at all in the mere presence of +a JASPIC SAM (that does nothing)

                                        +
                                        +
                                        +
                                        @Test
                                        +public void testBasicAsync() throws IOException, SAXException {
                                        +
                                        +    String response = getFromServerPath("public/asyncServlet");
                                        +    assertTrue(response.contains("async response"));
                                        +}
                                        +
                                        +

                                        Share the Knowledge

                                        Find this sample useful? Share on

                                        There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                        Help Improve

                                        Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                        Recent Changelog

                                        • Jul 25, 2014: Basic test for async requests and jaspic by arjan.tijms
                                        How to help improve this sample
                                        The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                        git clone git://github.com/javaee-samples/javaee7-samples.git
                                        cd javaee7-samples/jaspic/async-authentication/

                                        Do the changes as you see fit and send a pull request!

                                        Good Luck!

                                        + \ No newline at end of file diff --git a/sample/jaspic-basic-authentication/index.html b/sample/jaspic-basic-authentication/index.html new file mode 100644 index 0000000..1b8d4ea --- /dev/null +++ b/sample/jaspic-basic-authentication/index.html @@ -0,0 +1,230 @@ +JavaEE Sample::JASPIC::Basic authentication

                                        Basic authentication

                                        Run
                                        How to run the sample
                                        The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                        git clone git://github.com/javaee-samples/javaee7-samples.git
                                        cd javaee7-samples/jaspic/basic-authentication/
                                        Now we are ready to start testing. You can run all the tests in this sample by executing:
                                        mvn test
                                        Or you can run individual tests by executing one of the following:
                                        mvn test -Dtest=BasicAuthenticationProtectedTestmvn test -Dtest=BasicAuthenticationPublicTestmvn test -Dtest=BasicAuthenticationStatelessTest

                                        BasicAuthenticationProtectedTest

                                        +

                                        This tests that we can login from a protected resource (a resource for which security constraints have been set) and then +access it.

                                        +
                                        Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                        +
                                        +
                                        @Deployment(testable = false)
                                        +public static WebArchive createDeployment() {
                                        +    return defaultArchive();
                                        +}
                                        +
                                        +
                                        Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                        +
                                        +
                                        @Test
                                        +public void testProtectedPageNotLoggedin() throws IOException, SAXException {
                                        +
                                        +    String response = getFromServerPath("protected/servlet");
                                        +
                                        +    // Not logged-in thus should not be accessible.
                                        +    assertFalse(response.contains("This is a protected servlet"));
                                        +}
                                        +
                                        +
                                        Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                        +
                                        +
                                        @Test
                                        +public void testProtectedPageLoggedin() throws IOException, SAXException {
                                        +
                                        +    String response = getFromServerPath("protected/servlet?doLogin=true");
                                        +
                                        +    // Now has to be logged-in so page is accessible
                                        +    assertTrue(response.contains("This is a protected servlet"));
                                        +}
                                        +
                                        +

                                        BasicAuthenticationPublicTest

                                        +

                                        This tests that we can login from a public page (a page for which no security constraints have been set).

                                        +
                                        Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                        +
                                        +
                                        @Deployment(testable = false)
                                        +public static WebArchive createDeployment() {
                                        +    return defaultArchive();
                                        +}
                                        +
                                        +
                                        Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                        +
                                        +
                                        @Test
                                        +public void testPublicPageNotLoggedin() throws IOException, SAXException {
                                        +
                                        +    String response = getFromServerPath("public/servlet");
                                        +
                                        +    // Not logged-in
                                        +    assertTrue(response.contains("web username: null"));
                                        +    assertTrue(response.contains("web user has role \"architect\": false"));
                                        +}
                                        +
                                        +
                                        Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                        +
                                        +
                                        @Test
                                        +public void testPublicPageLoggedin() throws IOException, SAXException {
                                        +
                                        +    // JASPIC has to be able to authenticate a user when accessing a public (non-protected) resource.
                                        +
                                        +    String response = getFromServerPath("public/servlet?doLogin");
                                        +
                                        +    // Now has to be logged-in
                                        +    assertTrue(response.contains("web username: test"));
                                        +    assertTrue(response.contains("web user has role \"architect\": true"));
                                        +}
                                        +
                                        +
                                        Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                        +
                                        +
                                        @Test
                                        +public void testPublicPageNotRememberLogin() throws IOException, SAXException {
                                        +
                                        +
                                        +    // -------------------- Request 1 ---------------------------
                                        +
                                        +    String response = getFromServerPath("public/servlet");
                                        +
                                        +    // Not logged-in
                                        +    assertTrue(response.contains("web username: null"));
                                        +    assertTrue(response.contains("web user has role \"architect\": false"));
                                        +
                                        +
                                        +    // -------------------- Request 2 ---------------------------
                                        +
                                        +    response = getFromServerPath("public/servlet?doLogin");
                                        +
                                        +    // Now has to be logged-in
                                        +    assertTrue(response.contains("web username: test"));
                                        +    assertTrue(response.contains("web user has role \"architect\": true"));
                                        +
                                        +
                                        +    // -------------------- Request 3 ---------------------------
                                        +
                                        +    response = getFromServerPath("public/servlet");
                                        +
                                        +    // Not logged-in
                                        +    assertTrue(response.contains("web username: null"));
                                        +    assertTrue(response.contains("web user has role \"architect\": false"));
                                        +}
                                        +
                                        +

                                        BasicAuthenticationStatelessTest

                                        Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                        Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                        +
                                        +
                                        @Deployment(testable = false)
                                        +public static WebArchive createDeployment() {
                                        +    return defaultArchive();
                                        +}
                                        +
                                        +
                                        +

                                        Tests that access to a protected page does not depend on the authenticated identity that was established in a previous +request.

                                        +
                                        +
                                        +
                                        @Test
                                        +public void testProtectedAccessIsStateless() throws IOException, SAXException {
                                        +
                                        +
                                        +    // -------------------- Request 1 ---------------------------
                                        +
                                        +    // Accessing protected page without login
                                        +    String response = getFromServerPath("protected/servlet");
                                        +
                                        +    // Not logged-in thus should not be accessible.
                                        +    assertFalse(response.contains("This is a protected servlet"));
                                        +
                                        +
                                        +    // -------------------- Request 2 ---------------------------
                                        +
                                        +    // JASPIC is stateless and login (re-authenticate) has to happen for every request
                                        +    //
                                        +    // If the following fails but "testProtectedPageLoggedin" has succeeded,
                                        +    // the container has probably remembered the "unauthenticated identity", e.g. it has remembered that
                                        +    // we're not authenticated and it will deny further attempts to authenticate. This may happen when
                                        +    // the container does not correctly recognize the JASPIC protocol for "do nothing".
                                        +
                                        +    response = getFromServerPath("protected/servlet?doLogin");
                                        +
                                        +    // Now has to be logged-in so page is accessible
                                        +    assertTrue("Could not access protected page, but should be able to. "
                                        +            + "Did the container remember the previously set 'unauthenticated identity'?",
                                        +            response.contains("This is a protected servlet"));
                                        +
                                        +
                                        +    // -------------------- Request 3 ---------------------------
                                        +
                                        +    // JASPIC is stateless and login (re-authenticate) has to happen for every request
                                        +    //
                                        +    // In the following method we do a call without logging in after one where we did login.
                                        +    // The container should not remember this login and has to deny access.
                                        +    response = getFromServerPath("protected/servlet");
                                        +
                                        +    // Not logged-in thus should not be accessible.
                                        +    assertFalse("Could access protected page, but should not be able to. "
                                        +            + "Did the container remember the authenticated identity that was set in previous request?",
                                        +            response.contains("This is a protected servlet"));
                                        +}
                                        +
                                        +
                                        +

                                        Tests that access to a protected page does not depend on the authenticated identity that was established in a previous +request, but use a different request order than the previous test.

                                        +
                                        +
                                        +
                                        @Test
                                        +public void testProtectedAccessIsStateless2() throws IOException, SAXException {
                                        +
                                        +    // -------------------- Request 1 ---------------------------
                                        +
                                        +    // Start with doing a login
                                        +    String response = getFromServerPath("protected/servlet?doLogin");
                                        +
                                        +
                                        +    // -------------------- Request 2 ---------------------------
                                        +
                                        +    // JASPIC is stateless and login (re-authenticate) has to happen for every request
                                        +    //
                                        +    // In the following method we do a call without logging in after one where we did login.
                                        +    // The container should not remember this login and has to deny access.
                                        +
                                        +    // Accessing protected page without login
                                        +    response = getFromServerPath("protected/servlet");
                                        +
                                        +    // Not logged-in thus should not be accessible.
                                        +    assertFalse("Could access protected page, but should not be able to. "
                                        +            + "Did the container remember the authenticated identity that was set in previous request?",
                                        +            response.contains("This is a protected servlet"));
                                        +}
                                        +
                                        +
                                        +

                                        Tests independently from being able to access a protected resource if any details of a previously established +authenticated identity are remembered

                                        +
                                        +
                                        +
                                        @Test
                                        +public void testUserIdentityIsStateless() throws IOException, SAXException {
                                        +
                                        +
                                        +    // -------------------- Request 1 ---------------------------
                                        +
                                        +    // Accessing protected page with login
                                        +    String response = getFromServerPath("protected/servlet?doLogin");
                                        +
                                        +
                                        +    // -------------------- Request 2 ---------------------------
                                        +
                                        +    // Accessing public page without login
                                        +    response = getFromServerPath("public/servlet");
                                        +
                                        +    // No details should linger around
                                        +    assertFalse("User principal was 'test', but it should be null here. "
                                        +            + "The container seemed to have remembered it from the previous request.",
                                        +            response.contains("web username: test"));
                                        +    assertTrue("User principal was not null, but it should be null here. ",
                                        +            response.contains("web username: null"));
                                        +    assertTrue("The unauthenticated user has the role 'architect', which should not be the case. "
                                        +            + "The container seemed to have remembered it from the previous request.",
                                        +            response.contains("web user has role \"architect\": false"));
                                        +}
                                        +
                                        +

                                        Share the Knowledge

                                        Find this sample useful? Share on

                                        There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                        Help Improve

                                        Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                        Recent Changelog

                                        • Jan 11, 2014: Replaced httpunit by htmlunit, added convenience method for getting raw by arjan tijms
                                        • Jan 07, 2014: Add jboss-web.xml to web deployments by Stefan Guilhen
                                        • Dec 10, 2013: Port of jaspic tests from by arjan tijms
                                        How to help improve this sample
                                        The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                        git clone git://github.com/javaee-samples/javaee7-samples.git
                                        cd javaee7-samples/jaspic/basic-authentication/

                                        Do the changes as you see fit and send a pull request!

                                        Good Luck!

                                        + \ No newline at end of file diff --git a/sample/jaspic-common/index.html b/sample/jaspic-common/index.html new file mode 100644 index 0000000..7da60ef --- /dev/null +++ b/sample/jaspic-common/index.html @@ -0,0 +1,13 @@ +JavaEE Sample::JASPIC::Common

                                        Common

                                        Run
                                        How to run the sample
                                        The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                        git clone git://github.com/javaee-samples/javaee7-samples.git
                                        cd javaee7-samples/jaspic/common/
                                        Now we are ready to start testing. You can run all the tests in this sample by executing:
                                        mvn test
                                        Or you can run individual tests by executing one of the following:

                                        Missing a story. Add a test case.Show me how!

                                        Share the Knowledge

                                        Find this sample useful? Share on

                                        There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                        Help Improve

                                        Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                        Recent Changelog

                                        • Jan 11, 2014: Replaced httpunit by htmlunit, added convenience method for getting raw by arjan tijms
                                        • Jan 07, 2014: Add jboss-web.xml to web deployments by Stefan Guilhen
                                        • Dec 10, 2013: Port of jaspic tests from by arjan tijms
                                        How to help improve this sample
                                        The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                        git clone git://github.com/javaee-samples/javaee7-samples.git
                                        cd javaee7-samples/jaspic/common/

                                        Do the changes as you see fit and send a pull request!

                                        Good Luck!

                                        + \ No newline at end of file diff --git a/sample/jaspic-ejb-propagation/index.html b/sample/jaspic-ejb-propagation/index.html new file mode 100644 index 0000000..c18ecf0 --- /dev/null +++ b/sample/jaspic-ejb-propagation/index.html @@ -0,0 +1,87 @@ +JavaEE Sample::JASPIC::Ejb propagation

                                        Ejb propagation

                                        Run
                                        How to run the sample
                                        The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                        git clone git://github.com/javaee-samples/javaee7-samples.git
                                        cd javaee7-samples/jaspic/ejb-propagation/
                                        Now we are ready to start testing. You can run all the tests in this sample by executing:
                                        mvn test
                                        Or you can run individual tests by executing one of the following:
                                        mvn test -Dtest=ProtectedEJBPropagationTestmvn test -Dtest=PublicEJBPropagationTest

                                        ProtectedEJBPropagationTest

                                        +

                                        This tests that the established authenticated identity propagates correctly from the web layer to a "protected" EJB (an EJB +with declarative role checking).

                                        +
                                        Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                        +
                                        +
                                        @Deployment(testable = false)
                                        +public static WebArchive createDeployment() {
                                        +    return defaultArchive();
                                        +}
                                        +
                                        +
                                        Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                        +
                                        +
                                        @Test
                                        +public void testProtectedServletWithLoginCallingEJB() throws IOException, SAXException {
                                        +
                                        +    String response = getFromServerPath("protected/servlet-protected-ejb?doLogin");
                                        +
                                        +    // Both the web (HttpServletRequest) and EJB (EJBContext) should see the same
                                        +    // user name.
                                        +    assertTrue(response.contains("web username: test"));
                                        +    assertTrue("Web has user principal set, but EJB not.", response.contains("EJB username: test"));
                                        +
                                        +    // Both the web (HttpServletRequest) and EJB (EJBContext) should see that the
                                        +    // user has the role "architect".
                                        +    assertTrue(response.contains("web user has role \"architect\": true"));
                                        +    assertTrue("Web user principal has role \"architect\", but one in EJB doesn't.",
                                        +            response.contains("EJB user has role \"architect\": true"));
                                        +}
                                        +
                                        +
                                        +

                                        A small variation on the testProtectedServletWithLoginCallingEJB that tests if for authentication that happened for +public resources the security context also propagates to EJB.

                                        +
                                        +
                                        +
                                        @Test
                                        +public void testPublicServletWithLoginCallingEJB() throws IOException, SAXException {
                                        +
                                        +    String response = getFromServerPath("public/servlet-protected-ejb?doLogin");
                                        +
                                        +    // Both the web (HttpServletRequest) and EJB (EJBContext) should see the same
                                        +    // user name.
                                        +    assertTrue(response.contains("web username: test"));
                                        +    assertTrue("Web has user principal set, but EJB not.", response.contains("EJB username: test"));
                                        +
                                        +    // Both the web (HttpServletRequest) and EJB (EJBContext) should see that the
                                        +    // user has the role "architect".
                                        +    assertTrue(response.contains("web user has role \"architect\": true"));
                                        +    assertTrue("Web user principal has role \"architect\", but one in EJB doesn't.",
                                        +            response.contains("EJB user has role \"architect\": true"));
                                        +}
                                        +
                                        +

                                        PublicEJBPropagationTest

                                        +

                                        This tests that the established authenticated identity propagates correctly from the web layer to a "public" EJB (an EJB +without declarative role checking).

                                        +
                                        Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                        +
                                        +
                                        @Deployment(testable = false)
                                        +public static WebArchive createDeployment() {
                                        +    return defaultArchive();
                                        +}
                                        +
                                        +
                                        Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                        +
                                        +
                                        @Test
                                        +public void testProtectedServletWithLoginCallingEJB() throws IOException, SAXException {
                                        +
                                        +    String response = getFromServerPath("protected/servlet-public-ejb?doLogin");
                                        +
                                        +    // Both the web (HttpServletRequest) and EJB (EJBContext) should see the same
                                        +    // user name.
                                        +    assertTrue(response.contains("web username: test"));
                                        +    assertTrue("Web has user principal set, but EJB not.", response.contains("EJB username: test"));
                                        +}
                                        +
                                        +

                                        Share the Knowledge

                                        Find this sample useful? Share on

                                        There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                        Help Improve

                                        Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                        Recent Changelog

                                        • Jan 11, 2014: Replaced httpunit by htmlunit, added convenience method for getting raw by arjan tijms
                                        • Jan 07, 2014: Add jboss-web.xml to web deployments by Stefan Guilhen
                                        • Dec 10, 2013: Port of jaspic tests from by arjan tijms
                                        How to help improve this sample
                                        The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                        git clone git://github.com/javaee-samples/javaee7-samples.git
                                        cd javaee7-samples/jaspic/ejb-propagation/

                                        Do the changes as you see fit and send a pull request!

                                        Good Luck!

                                        + \ No newline at end of file diff --git a/sample/jaspic-lifecycle/index.html b/sample/jaspic-lifecycle/index.html new file mode 100644 index 0000000..ec55483 --- /dev/null +++ b/sample/jaspic-lifecycle/index.html @@ -0,0 +1,76 @@ +JavaEE Sample::JASPIC::Lifecycle

                                        Lifecycle

                                        Run
                                        How to run the sample
                                        The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                        git clone git://github.com/javaee-samples/javaee7-samples.git
                                        cd javaee7-samples/jaspic/lifecycle/
                                        Now we are ready to start testing. You can run all the tests in this sample by executing:
                                        mvn test
                                        Or you can run individual tests by executing one of the following:
                                        mvn test -Dtest=AuthModuleMethodInvocationTest

                                        AuthModuleMethodInvocationTest

                                        +

                                        This tests that the two main methods of a SAM, {@link ServerAuthModule#validateRequest} and +{@link ServerAuthModule#secureResponse} are called at the right time, which is resp. before and after the resource (e.g. a +Servlet) is invoked.

                                        +
                                        Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                        +
                                        +
                                        @Deployment(testable = false)
                                        +public static WebArchive createDeployment() {
                                        +    return defaultArchive();
                                        +}
                                        +
                                        +
                                        +

                                        Test that the main SAM methods are called and are called in the correct order.

                                        +
                                        +
                                        +

                                        The rule seems simple: +<ul> +<li>First call validateRequest() in the SAM. +<li>Then invoke the requested resource (e.g. a Servlet or JSP page) +<li>Finally call secureResponse() in the SAM +</ul>

                                        +
                                        +
                                        +
                                        @Test
                                        +public void testBasicSAMMethodsCalled() throws IOException, SAXException {
                                        +
                                        +    String response = getFromServerPath("protected/servlet");
                                        +
                                        +
                                        +    // First test if individual methods are called
                                        +    assertTrue("SAM method validateRequest not called, but should have been.",
                                        +            response.contains("validateRequest invoked"));
                                        +    assertTrue("Resource (Servlet) not invoked, but should have been.", response.contains("Resource invoked"));
                                        +
                                        +    // The previous two methods are rare to not be called, but secureResponse is more likely to fail. Seemingly it's hard
                                        +    // to understand what this method should do exactly.
                                        +    assertTrue("SAM method secureResponse not called, but should have been.",
                                        +            response.contains("secureResponse invoked"));
                                        +
                                        +    // Finally the order should be correct. More than a few implementations call secureResponse before the resource is
                                        +    // invoked.
                                        +    assertTrue("SAM methods called in wrong order",
                                        +            response.contains("validateRequest invoked\nResource invoked\nsecureResponse invoked\n"));
                                        +}
                                        +
                                        +
                                        +

                                        Test that the SAM’s cleanSubject method is called following a call to {@link HttpServletRequest#logout()}. +<p> +Although occasionally a JASPIC 1.0 implementation indeed does this, it’s only mandated that this happens in JASPIC 1.1

                                        +
                                        +
                                        +
                                        @Test
                                        +public void testLogout() throws IOException, SAXException {
                                        +
                                        +    // Note that we don't explicitly log-in; the test SAM uses for this test does that automatically before the resource
                                        +    // (servlet)
                                        +    // is invoked. Once we reach the Servlet we should be logged-in and can proceed to logout.
                                        +    String response = getFromServerPath("protected/servlet?doLogout");
                                        +
                                        +    assertTrue("SAM method cleanSubject not called, but should have been.",
                                        +            response.contains("cleanSubject invoked"));
                                        +}
                                        +
                                        +

                                        Share the Knowledge

                                        Find this sample useful? Share on

                                        There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                        Help Improve

                                        Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                        Recent Changelog

                                        • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                        • Jan 11, 2014: Replaced httpunit by htmlunit, added convenience method for getting raw by arjan tijms
                                        • Jan 07, 2014: Add jboss-web.xml to web deployments by Stefan Guilhen
                                        • Dec 10, 2013: Port of jaspic tests from by arjan tijms
                                        How to help improve this sample
                                        The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                        git clone git://github.com/javaee-samples/javaee7-samples.git
                                        cd javaee7-samples/jaspic/lifecycle/

                                        Do the changes as you see fit and send a pull request!

                                        Good Luck!

                                        + \ No newline at end of file diff --git a/sample/jaspic-register-session/index.html b/sample/jaspic-register-session/index.html new file mode 100644 index 0000000..b27eaee --- /dev/null +++ b/sample/jaspic-register-session/index.html @@ -0,0 +1,149 @@ +JavaEE Sample::JASPIC::Register session

                                        Register session

                                        Run
                                        How to run the sample
                                        The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                        git clone git://github.com/javaee-samples/javaee7-samples.git
                                        cd javaee7-samples/jaspic/register-session/
                                        Now we are ready to start testing. You can run all the tests in this sample by executing:
                                        mvn test
                                        Or you can run individual tests by executing one of the following:
                                        mvn test -Dtest=RegisterSessionTest

                                        RegisterSessionTest

                                        Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                        Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                        +
                                        +
                                        @Deployment(testable = false)
                                        +public static WebArchive createDeployment() {
                                        +    return defaultArchive();
                                        +}
                                        +
                                        +
                                        Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                        +
                                        +
                                        @Test
                                        +public void testRemembersSession() throws IOException, SAXException {
                                        +
                                        +
                                        +    // -------------------- Request 1 ---------------------------
                                        +
                                        +    // Accessing protected page without login
                                        +    String response = getFromServerPath("protected/servlet");
                                        +
                                        +    // Not logged-in thus should not be accessible.
                                        +    assertFalse(response.contains("This is a protected servlet"));
                                        +
                                        +
                                        +    // -------------------- Request 2 ---------------------------
                                        +
                                        +    // We access the protected page again and now login
                                        +
                                        +    response = getFromServerPath("protected/servlet?doLogin");
                                        +
                                        +    // Now has to be logged-in so page is accessible
                                        +    assertTrue("Could not access protected page, but should be able to. "
                                        +            + "Did the container remember the previously set 'unauthenticated identity'?",
                                        +            response.contains("This is a protected servlet"));
                                        +
                                        +
                                        +    // -------------------- Request 3 ---------------------------
                                        +
                                        +    // JASPIC is normally stateless, but for this test the SAM uses the register session feature so now
                                        +    // we should be logged-in when doing a call without explicitly logging in again.
                                        +
                                        +    response = getFromServerPath("protected/servlet?continueSession");
                                        +
                                        +    // Logged-in thus should be accessible.
                                        +    assertTrue("Could not access protected page, but should be able to. "
                                        +            + "Did the container not remember the authenticated identity via 'javax.servlet.http.registerSession'?",
                                        +            response.contains("This is a protected servlet"));
                                        +
                                        +    // Both the user name and roles/groups have to be restored
                                        +
                                        +    // *** NOTE ***: The JASPIC 1.1 spec is NOT clear about remembering roles, but spec lead Ron Monzillo clarified that
                                        +    // this should indeed be the case. The next JASPIC revision of the spec will have to mention this explicitly.
                                        +    // Intuitively it should make sense though that the authenticated identity is fully restored and not partially,
                                        +    // but again the spec should make this clear to avoid ambiguity.
                                        +    assertTrue(response.contains("web username: test"));
                                        +    assertTrue(response.contains("web user has role \"architect\": true"));
                                        +
                                        +
                                        +    // -------------------- Request 4 ---------------------------
                                        +
                                        +    // The session should also be remembered for other resources, including public ones
                                        +
                                        +    response = getFromServerPath("public/servlet?continueSession");
                                        +
                                        +    // This test almost can't fail, but include for clarity
                                        +    assertTrue(response.contains("This is a public servlet"));
                                        +
                                        +    // When accessing the public page, the username and roles should be restored and be available
                                        +    // just as on protected pages
                                        +    assertTrue(response.contains("web username: test"));
                                        +    assertTrue(response.contains("web user has role \"architect\": true"));
                                        +}
                                        +
                                        +
                                        Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                        +
                                        +
                                        @Test
                                        +public void testJoinSessionIsOptional() throws IOException, SAXException {
                                        +
                                        +
                                        +    // -------------------- Request 1 ---------------------------
                                        +
                                        +    // We access a protected page and login
                                        +    //
                                        +
                                        +    String response = getFromServerPath("protected/servlet?doLogin");
                                        +
                                        +    // Now has to be logged-in so page is accessible
                                        +    assertTrue("Could not access protected page, but should be able to. "
                                        +            + "Did the container remember the previously set 'unauthenticated identity'?",
                                        +            response.contains("This is a protected servlet"));
                                        +
                                        +
                                        +    // -------------------- Request 2 ---------------------------
                                        +
                                        +    // JASPIC is normally stateless, but for this test the SAM uses the register session feature so now
                                        +    // we should be logged-in when doing a call without explicitly logging in again.
                                        +
                                        +    response = getFromServerPath("protected/servlet?continueSession");
                                        +
                                        +    // Logged-in thus should be accessible.
                                        +    assertTrue("Could not access protected page, but should be able to. "
                                        +            + "Did the container not remember the authenticated identity via 'javax.servlet.http.registerSession'?",
                                        +            response.contains("This is a protected servlet"));
                                        +
                                        +    // Both the user name and roles/groups have to be restored
                                        +
                                        +    // *** NOTE ***: The JASPIC 1.1 spec is NOT clear about remembering roles, but spec lead Ron Monzillo clarified that
                                        +    // this should indeed be the case. The next JASPIC revision of the spec will have to mention this explicitly.
                                        +    // Intuitively it should make sense though that the authenticated identity is fully restored and not partially,
                                        +    // but again the spec should make this clear to avoid ambiguity.
                                        +    assertTrue(response.contains("web username: test"));
                                        +    assertTrue(response.contains("web user has role \"architect\": true"));
                                        +
                                        +
                                        +    // -------------------- Request 3 ---------------------------
                                        +
                                        +    // Although the container remembers the authentication session, the SAM needs to OPT-IN to it.
                                        +    // If the SAM instead "does nothing", we should not have access to the protected resource anymore
                                        +    // even within the same HTTP session.
                                        +
                                        +    response = getFromServerPath("protected/servlet");
                                        +    assertFalse(response.contains("This is a protected servlet"));
                                        +
                                        +
                                        +    // -------------------- Request 4 ---------------------------
                                        +
                                        +    // Access to a public page is unaffected by joining or not joining the session, but if we do not join the
                                        +    // session we shouldn't see the user's name and roles.
                                        +
                                        +    // THIS NOW FAILS ON GLASSFISH 4.0. CHECKED WITH RON MONZILLO THAT THIS IS INDEED AN ERROR AND FILED A BUG
                                        +
                                        +    response = getFromServerPath("public/servlet");
                                        +
                                        +    assertTrue(response.contains("This is a public servlet"));
                                        +    assertFalse(response.contains("web username: test"));
                                        +    assertFalse(response.contains("web user has role \"architect\": true"));
                                        +}
                                        +
                                        +

                                        Share the Knowledge

                                        Find this sample useful? Share on

                                        There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                        Help Improve

                                        Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                        Recent Changelog

                                        • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                        • Jan 11, 2014: Replaced httpunit by htmlunit, added convenience method for getting raw by arjan tijms
                                        • Jan 07, 2014: Add jboss-web.xml to web deployments by Stefan Guilhen
                                        • Dec 14, 2013: Re-enabled test by arjan tijms
                                        • Dec 14, 2013: Added test for the javax.servlet.http.registersession feature and by arjan tijms
                                        How to help improve this sample
                                        The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                        git clone git://github.com/javaee-samples/javaee7-samples.git
                                        cd javaee7-samples/jaspic/register-session/

                                        Do the changes as you see fit and send a pull request!

                                        Good Luck!

                                        + \ No newline at end of file diff --git a/sample/jaspic-wrapping/index.html b/sample/jaspic-wrapping/index.html new file mode 100644 index 0000000..432a117 --- /dev/null +++ b/sample/jaspic-wrapping/index.html @@ -0,0 +1,47 @@ +JavaEE Sample::JASPIC::Wrapping

                                        Wrapping

                                        Run
                                        How to run the sample
                                        The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                        git clone git://github.com/javaee-samples/javaee7-samples.git
                                        cd javaee7-samples/jaspic/wrapping/
                                        Now we are ready to start testing. You can run all the tests in this sample by executing:
                                        mvn test
                                        Or you can run individual tests by executing one of the following:
                                        mvn test -Dtest=WrappingTest

                                        WrappingTest

                                        +

                                        This tests that the wrapped request and response a SAM puts into the MessageInfo structure reaches the Servlet that’s +invoked.

                                        +
                                        Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                        +
                                        +
                                        @Deployment(testable = false)
                                        +public static WebArchive createDeployment() {
                                        +    return defaultArchive();
                                        +}
                                        +
                                        +
                                        Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                        +
                                        +
                                        @Test
                                        +public void testRequestWrapping() throws IOException, SAXException {
                                        +
                                        +    String response = getFromServerPath("protected/servlet");
                                        +
                                        +    // The SAM wrapped a request so that it always contains the request attribute "isWrapped" with value true.
                                        +    assertTrue("Request wrapped by SAM did not arrive in Servlet.",
                                        +            response.contains("request isWrapped: true"));
                                        +}
                                        +
                                        +
                                        Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                        +
                                        +
                                        @Test
                                        +public void testResponseWrapping() throws IOException, SAXException {
                                        +
                                        +    String response = getFromServerPath("protected/servlet");
                                        +
                                        +    // The SAM wrapped a response so that it always contains the header "isWrapped" with value true.
                                        +    assertTrue("Response wrapped by SAM did not arrive in Servlet.",
                                        +            response.contains("response isWrapped: true"));
                                        +}
                                        +
                                        +

                                        Share the Knowledge

                                        Find this sample useful? Share on

                                        There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                        Help Improve

                                        Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                        Recent Changelog

                                        • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                        • Jan 11, 2014: Replaced httpunit by htmlunit, added convenience method for getting raw by arjan tijms
                                        • Jan 07, 2014: Add jboss-web.xml to web deployments by Stefan Guilhen
                                        • Dec 10, 2013: Port of jaspic tests from by arjan tijms
                                        How to help improve this sample
                                        The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                        git clone git://github.com/javaee-samples/javaee7-samples.git
                                        cd javaee7-samples/jaspic/wrapping/

                                        Do the changes as you see fit and send a pull request!

                                        Good Luck!

                                        + \ No newline at end of file diff --git a/sample/javamail-definition/index.html b/sample/javamail-definition/index.html new file mode 100644 index 0000000..bf60213 --- /dev/null +++ b/sample/javamail-definition/index.html @@ -0,0 +1,13 @@ +JavaEE Sample::JavaMail::Definition

                                        Definition

                                        Run
                                        How to run the sample
                                        The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                        git clone git://github.com/javaee-samples/javaee7-samples.git
                                        cd javaee7-samples/javamail/definition/
                                        Now we are ready to start testing. You can run all the tests in this sample by executing:
                                        mvn test
                                        Or you can run individual tests by executing one of the following:

                                        Missing a story. Add a test case.Show me how!

                                        Share the Knowledge

                                        Find this sample useful? Share on

                                        There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                        Help Improve

                                        Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                        Recent Changelog

                                        • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                        • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                        • Sep 13, 2013: Fixing the property names, although commented by Arun Gupta
                                        • Sep 13, 2013: Using transport.sendmessage instead of transport.send did the trick. thanks bill! by Arun Gupta
                                        • Sep 13, 2013: Cleaning up the code and putting on backburner until the issues are fixed by Arun Gupta
                                        • Sep 13, 2013: Cleaning up the code and reading correct attributes from .javamail by Arun Gupta
                                        • Sep 13, 2013: Changing the format of .javamail by Arun Gupta
                                        • Sep 12, 2013: Intermittent commit for debugging purpose by Arun Gupta
                                        • Sep 12, 2013: Using a credentials class to read the username, password, and to field. also adding timestamp in email subject by Arun Gupta
                                        • Sep 12, 2013: Naming the servlets appropriately by Arun Gupta
                                        How to help improve this sample
                                        The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                        git clone git://github.com/javaee-samples/javaee7-samples.git
                                        cd javaee7-samples/javamail/definition/

                                        Do the changes as you see fit and send a pull request!

                                        Good Luck!

                                        + \ No newline at end of file diff --git a/sample/jaxrs-angularjs/index.html b/sample/jaxrs-angularjs/index.html new file mode 100644 index 0000000..4e219fc --- /dev/null +++ b/sample/jaxrs-angularjs/index.html @@ -0,0 +1,120 @@ +JavaEE Sample::JAXRS::Angularjs

                                        Angularjs

                                        Run
                                        How to run the sample
                                        The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                        git clone git://github.com/javaee-samples/javaee7-samples.git
                                        cd javaee7-samples/jaxrs/angularjs/
                                        Now we are ready to start testing. You can run all the tests in this sample by executing:
                                        mvn test
                                        Or you can run individual tests by executing one of the following:
                                        mvn test -Dtest=NoteResourceImplTest

                                        Angular JS consuming REST services

                                        NoteResourceImplTest

                                        Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                        Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                        +
                                        +
                                        @Deployment
                                        +public static Archive createDeployment()
                                        +{
                                        +    final GenericArchive webResources = ShrinkWrap.create(GenericArchive.class)
                                        +        .as(ExplodedImporter.class)
                                        +        .importDirectory("src/main/webapp")
                                        +        .as(GenericArchive.class);
                                        +    final File[] seleniumApi = Maven.resolver()
                                        +        .loadPomFromFile("pom.xml")
                                        +        .resolve("org.seleniumhq.selenium:selenium-api:2.35.0")
                                        +        .withTransitivity()
                                        +        .asFile();
                                        +    return ShrinkWrap.create(WebArchive.class, NoteResourceImplTest.class.getSimpleName() + ".war")
                                        +        .addClasses(Note.class, NoteApp.class, NoteResource.class, NoteResourceImpl.class)
                                        +        .addAsResource("META-INF/persistence.xml")
                                        +        .addAsWebInfResource("enforce-beans.xml", "jboss-all.xml")
                                        +        .addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml")
                                        +        .addAsLibraries(seleniumApi)
                                        +        .merge(webResources);
                                        +}
                                        +
                                        +
                                        +
                                        +
                                        @Test
                                        +@InSequence(1)
                                        +public void setupDB_ARQ1077_Workaround()
                                        +{
                                        +}
                                        +
                                        +
                                        Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                        +
                                        +
                                        @Test
                                        +@InSequence(3)
                                        +public void setupDB_ARQ1077_Workaround_2()
                                        +{
                                        +}
                                        +
                                        +
                                        Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                        +
                                        +
                                        @Test
                                        +@InSequence(5)
                                        +public void setupDB_ARQ1077_Workaround_3()
                                        +{
                                        +}
                                        +
                                        +
                                        Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                        +
                                        +
                                        @InSequence(4)
                                        +@RunAsClient
                                        +@Test
                                        +public void addNewNote(@ArquillianResource URL deploymentURL, @Drone WebDriver driver) throws Exception
                                        +{
                                        +//        Given
                                        +    driver.navigate().to(deploymentURL);
                                        +    final TodoPage page = GrapheneRuntime.getInstance().goTo(TodoPage.class);
                                        +    assertEquals(3, page.getTodos().size());
                                        +//        When
                                        +    page.addNote();
                                        +    page.typeTitle("New title");
                                        +    page.typeSummary("New summary");
                                        +    page.save();
                                        +//        Then
                                        +    assertEquals(4, page.getTodos().size());
                                        +    assertEquals("New title", page.getTodos().get(3).getTitle());
                                        +    assertEquals("New summary", page.getTodos().get(3).getSummary());
                                        +}
                                        +
                                        +
                                        Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                        +
                                        +
                                        @InSequence(2)
                                        +@RunAsClient
                                        +@Test
                                        +public void onenterContainsNotesFromDB(@ArquillianResource URL deploymentURL, @Drone WebDriver driver)
                                        +{
                                        +//        Given
                                        +//        When
                                        +    driver.navigate().to(deploymentURL);
                                        +    final TodoPage page = GrapheneRuntime.getInstance().goTo(TodoPage.class);
                                        +//        Then
                                        +    assertEquals(3, page.getTodos().size());
                                        +    assertEquals("Note A", page.getTodos().get(0).getTitle());
                                        +    assertEquals("Note B", page.getTodos().get(1).getTitle());
                                        +    assertEquals("Note C", page.getTodos().get(2).getTitle());
                                        +}
                                        +
                                        +
                                        Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                        +
                                        +
                                        @InSequence(6)
                                        +@RunAsClient
                                        +@Test
                                        +public void removeNote(@ArquillianResource URL deploymentURL, @Drone WebDriver driver) throws Exception
                                        +{
                                        +//        Given
                                        +    driver.navigate().to(deploymentURL);
                                        +    final TodoPage page = GrapheneRuntime.getInstance().goTo(TodoPage.class);
                                        +    assertEquals(3, page.getTodos().size());
                                        +//        When
                                        +    page.getTodos().get(0).remove();
                                        +//        Then
                                        +    assertEquals("Note B", page.getTodos().get(0).getTitle());
                                        +    assertEquals("Note C", page.getTodos().get(1).getTitle());
                                        +}
                                        +
                                        +

                                        Share the Knowledge

                                        Find this sample useful? Share on

                                        There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                        Help Improve

                                        Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                        Recent Changelog

                                        • Oct 05, 2014: #252 fixed arquillian configuration for the jobs by John D. Ament
                                        • Aug 12, 2014: Enforcing weld to scan only those archives which have beans.xml in it. otherwise any other 3rd party library which is using jsr-330 annotations will cause the deployment in cdi 1.1 environment (java ee 7) to fail. for example guava used in angularjs tests. related issue: #245 by Bartosz Majsak
                                        • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                        • Dec 03, 2013: #10 angular js consuming rest services by bernard
                                        How to help improve this sample
                                        The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                        git clone git://github.com/javaee-samples/javaee7-samples.git
                                        cd javaee7-samples/jaxrs/angularjs/

                                        Do the changes as you see fit and send a pull request!

                                        Good Luck!

                                        + \ No newline at end of file diff --git a/sample/jaxrs-async-client/index.html b/sample/jaxrs-async-client/index.html new file mode 100644 index 0000000..e40e138 --- /dev/null +++ b/sample/jaxrs-async-client/index.html @@ -0,0 +1,171 @@ +JavaEE Sample::JAXRS::Async Client

                                        Async Client

                                        Run
                                        How to run the sample
                                        The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                        git clone git://github.com/javaee-samples/javaee7-samples.git
                                        cd javaee7-samples/jaxrs/async-client/
                                        Now we are ready to start testing. You can run all the tests in this sample by executing:
                                        mvn test
                                        Or you can run individual tests by executing one of the following:
                                        mvn test -Dtest=MyResourceTest

                                        Invoke a JAX-RS service via an asynchronous client

                                        • Specifications in use:
                                          • JAXRS

                                          MyResourceTest

                                          +

                                          In this sample we’re going to explore how to communicate with a JAX-RS +service via an asynchronous invocation from the client.

                                          +
                                          +
                                          +

                                          First step; we need a service to invoke.

                                          +
                                          +
                                          +

                                          Let’s create a simple GET method.

                                          +
                                          +
                                          +
                                          +
                                          @GET
                                          +public String getList() {
                                          +    return response[0];
                                          +}
                                          +
                                          +
                                          +
                                          +

                                          For JAX-RS to expose our service we need to provide an implementation of +the JAX-RS Application class to define our root path.

                                          +
                                          +
                                          +
                                          +
                                          @ApplicationPath("webresources")
                                          +public class MyApplication extends Application {
                                          +
                                          +    public MyApplication();
                                          +}
                                          +
                                          +
                                          +

                                          Since JAX-RS webservices are, well, web related and require a +web context, they are required to be deployed within a web archive. +By default, JAX-RS will perform autodiscovery of our services. +That means there is no need to add a web.xml in this scenario.

                                          +
                                          +
                                          +

                                          Based on the definition of our @Deployment method, we will be +creating and deploying the following archive structure.

                                          +
                                          +
                                          +
                                          +
                                          /WEB-INF/
                                          +/WEB-INF/classes/
                                          +/WEB-INF/classes/org/
                                          +/WEB-INF/classes/org/javaee7/jaxrs/
                                          +/WEB-INF/classes/org/javaee7/jaxrs/asyncclient/
                                          +/WEB-INF/classes/org/javaee7/jaxrs/asyncclient/MyResource.class
                                          +/WEB-INF/classes/org/javaee7/jaxrs/asyncclient/MyApplication.class
                                          +
                                          +
                                          +
                                          +
                                          @Deployment(testable = false)
                                          +public static WebArchive createDeployment() {
                                          +   return ShrinkWrap.create(WebArchive.class)
                                          +         .addClasses(MyApplication.class, MyResource.class);
                                          +}
                                          +
                                          +
                                          +

                                          Before we can invoke our service we need to setup the client.

                                          +
                                          +
                                          +
                                          +
                                          @Before
                                          +public void setUpClass() throws MalformedURLException {
                                          +    Client client = ClientBuilder.newClient();
                                          +    target = client.target(URI.create(new URL(base, "webresources/fruits").toExternalForm()));
                                          +}
                                          +
                                          +
                                          +
                                          +

                                          Now we are free to invoke our deployed service by using the JAX-RS +client library.

                                          +
                                          +
                                          +

                                          The asynchronous client library comes with multiple option on how +to invoke the methods. First let’s look at using the Future option +with access to the complete Response.

                                          +
                                          +
                                          +
                                          @Test
                                          +public void testPollingResponse() throws InterruptedException, ExecutionException {
                                          +    Future<Response> r1 = target.request().async().get(); (1)
                                          +    String response = r1.get().readEntity(String.class);  (2)
                                          +    assertEquals("apple", response);                      (3)
                                          +}
                                          +
                                          +
                                          +
                                          +
                                            +
                                          1. +

                                            Build an asynchronous request handler for the Response object

                                            +
                                          2. +
                                          3. +

                                            Read the entity from the body of the Response

                                            +
                                          4. +
                                          5. +

                                            Validate we got the expected value

                                            +
                                          6. +
                                          +
                                          +

                                          Another possibility is to use the Future option with access to only the Response body.

                                          +
                                          +
                                          +
                                          @Test
                                          +public void testPollingString() throws InterruptedException, ExecutionException {
                                          +    Future<String> r1 = target.request().async().get(String.class); (1)
                                          +    String response = r1.get();                                     (2)
                                          +    assertEquals("apple", response);                                (3)
                                          +}
                                          +
                                          +
                                          +
                                          +
                                            +
                                          1. +

                                            Build an asynchronous request handler for the body of the Response

                                            +
                                          2. +
                                          3. +

                                            Read the entity directly from the Future

                                            +
                                          4. +
                                          5. +

                                            Validate we got the expected value

                                            +
                                          6. +
                                          +
                                          +

                                          You can also register a InvocationCallback and get a callback when the Request is done.

                                          +
                                          +
                                          +
                                          @Test
                                          +public void testInvocationCallback() throws InterruptedException, ExecutionException {
                                          +        target.request().async().get(new InvocationCallback<String>() { (1)
                                          +
                                          +            @Override
                                          +            public void completed(String r) {                           (2)
                                          +                assertEquals("apple", r);
                                          +            }
                                          +
                                          +            @Override
                                          +            public void failed(Throwable t) {                           (3)
                                          +                fail(t.getMessage());
                                          +            }
                                          +
                                          +        });
                                          +}
                                          +
                                          +
                                          +
                                          +
                                            +
                                          1. +

                                            Build an asynchronous request callback for the body of the Response

                                            +
                                          2. +
                                          3. +

                                            Called when the Request is completed and our entiy parsed

                                            +
                                          4. +
                                          5. +

                                            Called if the Request failed to complete

                                            +
                                          6. +
                                          +

                                          Share the Knowledge

                                          Find this sample useful? Share on

                                          There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                          Help Improve

                                          Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                          Recent Changelog

                                          • Sep 10, 2014: Fix typo and remove not very helpful ' ;) by Max Rydahl Andersen
                                          • Jul 15, 2014: Removed default header by Roberto Cortez
                                          • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                          • Jan 13, 2014: Fix typo in jax-rs::async-client description by Aslak Knutsen
                                          • Jan 10, 2014: Add description to jax-rs:async-client sample by Aslak Knutsen
                                          • Dec 03, 2013: Change to use client.target(uri) to be compatible with jax-rs 1.0 by Aslak Knutsen
                                          • Nov 12, 2013: Convert jax-rs samples to arquillian: async client by Aslak Knutsen
                                          • Nov 08, 2013: Initializing the client before each test by Arun Gupta
                                          • Nov 07, 2013: Converting servlet into tests by Arun Gupta
                                          • Oct 27, 2013: Removing redundant dependencies by Arun Gupta
                                          How to help improve this sample
                                          The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                          git clone git://github.com/javaee-samples/javaee7-samples.git
                                          cd javaee7-samples/jaxrs/async-client/

                                          Do the changes as you see fit and send a pull request!

                                          Good Luck!

                                          + \ No newline at end of file diff --git a/sample/jaxrs-async-server/index.html b/sample/jaxrs-async-server/index.html new file mode 100644 index 0000000..fde2fe3 --- /dev/null +++ b/sample/jaxrs-async-server/index.html @@ -0,0 +1,31 @@ +JavaEE Sample::JAXRS::Async server

                                          Async server

                                          Run
                                          How to run the sample
                                          The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                          git clone git://github.com/javaee-samples/javaee7-samples.git
                                          cd javaee7-samples/jaxrs/async-server/
                                          Now we are ready to start testing. You can run all the tests in this sample by executing:
                                          mvn test
                                          Or you can run individual tests by executing one of the following:
                                          mvn test -Dtest=MyResourceTest

                                          MyResourceTest

                                          Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                          Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                          +
                                          +
                                          @Deployment(testable = false)
                                          +public static WebArchive createDeployment() {
                                          +   return ShrinkWrap.create(WebArchive.class)
                                          +         .addClasses(MyApplication.class, MyResource.class);
                                          +}
                                          +
                                          +
                                          +

                                          Test of getList method, of class MyResource.

                                          +
                                          +
                                          +
                                          @Test
                                          +public void testGetList() {
                                          +    String result = target.request().get(String.class);
                                          +    assertEquals("apple", result);
                                          +}
                                          +
                                          +

                                          Share the Knowledge

                                          Find this sample useful? Share on

                                          There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                          Help Improve

                                          Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                          Recent Changelog

                                          • Jul 15, 2014: Removed default header by Roberto Cortez
                                          • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                          • Dec 03, 2013: Change to use client.target(uri) to be compatible with jax-rs 1.0 by Aslak Knutsen
                                          • Nov 12, 2013: Convert jax-rs samples to arquillian: async server by Aslak Knutsen
                                          • Nov 07, 2013: Cleaning up test by Arun Gupta
                                          • Nov 07, 2013: Adding tests by Arun Gupta
                                          • Nov 07, 2013: Fixed servlet title by Arun Gupta
                                          • Nov 07, 2013: Using jndi lookup for managed thread factory by Arun Gupta
                                          • Nov 07, 2013: Removing redundant attributes on @webservlet by Arun Gupta
                                          • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                          How to help improve this sample
                                          The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                          git clone git://github.com/javaee-samples/javaee7-samples.git
                                          cd javaee7-samples/jaxrs/async-server/

                                          Do the changes as you see fit and send a pull request!

                                          Good Luck!

                                          + \ No newline at end of file diff --git a/sample/jaxrs-beanparam/index.html b/sample/jaxrs-beanparam/index.html new file mode 100644 index 0000000..ef30eda --- /dev/null +++ b/sample/jaxrs-beanparam/index.html @@ -0,0 +1,30 @@ +JavaEE Sample::JAXRS::Beanparam

                                          Beanparam

                                          Run
                                          How to run the sample
                                          The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                          git clone git://github.com/javaee-samples/javaee7-samples.git
                                          cd javaee7-samples/jaxrs/beanparam/
                                          Now we are ready to start testing. You can run all the tests in this sample by executing:
                                          mvn test
                                          Or you can run individual tests by executing one of the following:
                                          mvn test -Dtest=MyResourceTest

                                          • Specifications in use:
                                            • JAXRS

                                            MyResourceTest

                                            Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                            Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                            +
                                            +
                                            @Deployment(testable = false)
                                            +public static WebArchive createDeployment() {
                                            +   return ShrinkWrap.create(WebArchive.class)
                                            +         .addClasses(MyApplication.class, MyResource.class, MyPathParams.class, MyQueryParams.class);
                                            +}
                                            +
                                            +
                                            Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                            +
                                            +
                                            @Test
                                            +public void testRequestWithAllParams() {
                                            +	WebTarget t = target.path("/123").path("/abc").queryParam("param1", "foo").queryParam("param2", "bar").queryParam("param3", "baz");
                                            +    String r = t.request(). get(String.class);
                                            +    assertEquals("/123/abc?param1=foo&param2=bar&param3=baz", r);
                                            +}
                                            +
                                            +

                                            Share the Knowledge

                                            Find this sample useful? Share on

                                            There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                            Help Improve

                                            Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                            Recent Changelog

                                            • May 26, 2014: Adding jax-rs @beanparam example by Xavier Coulon
                                            How to help improve this sample
                                            The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                            git clone git://github.com/javaee-samples/javaee7-samples.git
                                            cd javaee7-samples/jaxrs/beanparam/

                                            Do the changes as you see fit and send a pull request!

                                            Good Luck!

                                            + \ No newline at end of file diff --git a/sample/jaxrs-beanvalidation/index.html b/sample/jaxrs-beanvalidation/index.html new file mode 100644 index 0000000..89916f2 --- /dev/null +++ b/sample/jaxrs-beanvalidation/index.html @@ -0,0 +1,98 @@ +JavaEE Sample::JAXRS::Beanvalidation

                                            Beanvalidation

                                            Run
                                            How to run the sample
                                            The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                            git clone git://github.com/javaee-samples/javaee7-samples.git
                                            cd javaee7-samples/jaxrs/beanvalidation/
                                            Now we are ready to start testing. You can run all the tests in this sample by executing:
                                            mvn test
                                            Or you can run individual tests by executing one of the following:
                                            mvn test -Dtest=MyResourceTest

                                            MyResourceTest

                                            Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                            Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                            +
                                            +
                                            @Deployment(testable = false)
                                            +public static WebArchive createDeployment() {
                                            +    return ShrinkWrap.create(WebArchive.class)
                                            +            .addClasses(MyApplication.class, MyResource.class);
                                            +}
                                            +
                                            +
                                            Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                            +
                                            +
                                            @Test
                                            +public void testInvalidRequest() {
                                            +    try {
                                            +        target.request().post(Entity.text("fo"), String.class);
                                            +        fail("Request must fail with payload < 3");
                                            +    } catch (BadRequestException e) {
                                            +        assertNotNull(e);
                                            +    }
                                            +}
                                            +
                                            +
                                            Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                            +
                                            +
                                            @Test
                                            +public void testValidRequest() {
                                            +    String r = target.request().post(Entity.text("foo"), String.class);
                                            +    assertEquals("foo", r);
                                            +}
                                            +
                                            +
                                            Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                            +
                                            +
                                            @Test
                                            +public void testValidPostRequest() {
                                            +    MultivaluedHashMap<String, String> map = new MultivaluedHashMap<>();
                                            +    map.add("name", "Penny");
                                            +    map.add("age", "1");
                                            +    target.request().post(Entity.form(map));
                                            +
                                            +    map.clear();
                                            +    map.add("name", "Leonard");
                                            +    map.add("age", "2");
                                            +    target.request().post(Entity.form(map));
                                            +}
                                            +
                                            +
                                            Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                            +
                                            +
                                            @Test
                                            +public void testInvalidPostRequest() {
                                            +    try {
                                            +        MultivaluedHashMap<String, String> map = new MultivaluedHashMap<>();
                                            +        map.add("name", null);
                                            +        map.add("age", "1");
                                            +        target.request().post(Entity.form(map));
                                            +    } catch (BadRequestException e) {
                                            +        assertNotNull(e);
                                            +    }
                                            +}
                                            +
                                            +
                                            Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                            +
                                            +
                                            @Test
                                            +public void testInvalidPostRequestLesserAge() {
                                            +    try {
                                            +        MultivaluedHashMap<String, String> map = new MultivaluedHashMap<>();
                                            +        map.add("name", "Penny");
                                            +        map.add("age", "0");
                                            +        target.request().post(Entity.form(map));
                                            +    } catch (BadRequestException e) {
                                            +        assertNotNull(e);
                                            +    }
                                            +}
                                            +
                                            +
                                            Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                            +
                                            +
                                            @Test
                                            +public void testInvalidPostRequestGreaterAge() {
                                            +    try {
                                            +        MultivaluedHashMap<String, String> map = new MultivaluedHashMap<>();
                                            +        map.add("name", "Penny");
                                            +        map.add("age", "11");
                                            +        target.request().post(Entity.form(map));
                                            +    } catch (BadRequestException e) {
                                            +        assertNotNull(e);
                                            +    }
                                            +}
                                            +
                                            +

                                            Share the Knowledge

                                            Find this sample useful? Share on

                                            There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                            Help Improve

                                            Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                            Recent Changelog

                                            • Jul 15, 2014: Removed default header by Roberto Cortez
                                            • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                            • Jul 10, 2014: Adding new tests for jaxrs/bean validation by arun-gupta
                                            • Dec 03, 2013: Change to use client.target(uri) to be compatible with jax-rs 1.0 by Aslak Knutsen
                                            • Nov 12, 2013: Convert jax-rs samples to arquillian: beanvalidation by Aslak Knutsen
                                            • Nov 07, 2013: Adding tests by Arun Gupta
                                            • Nov 07, 2013: Removing redundant attributes on @webservlet by Arun Gupta
                                            • Oct 27, 2013: Removing redundant dependencies by Arun Gupta
                                            • Oct 27, 2013: Adding more descriptive output statement by Arun Gupta
                                            • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                            How to help improve this sample
                                            The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                            git clone git://github.com/javaee-samples/javaee7-samples.git
                                            cd javaee7-samples/jaxrs/beanvalidation/

                                            Do the changes as you see fit and send a pull request!

                                            Good Luck!

                                            + \ No newline at end of file diff --git a/sample/jaxrs-client-negotiation/index.html b/sample/jaxrs-client-negotiation/index.html new file mode 100644 index 0000000..0b4a586 --- /dev/null +++ b/sample/jaxrs-client-negotiation/index.html @@ -0,0 +1,38 @@ +JavaEE Sample::JAXRS::Client negotiation

                                            Client negotiation

                                            Run
                                            How to run the sample
                                            The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                            git clone git://github.com/javaee-samples/javaee7-samples.git
                                            cd javaee7-samples/jaxrs/client-negotiation/
                                            Now we are ready to start testing. You can run all the tests in this sample by executing:
                                            mvn test
                                            Or you can run individual tests by executing one of the following:
                                            mvn test -Dtest=MyResourceTest

                                            • Specifications in use:
                                              • JAXRS

                                              MyResourceTest

                                              Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                              Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                              +
                                              +
                                              @Deployment(testable = false)
                                              +public static WebArchive createDeployment() {
                                              +   return ShrinkWrap.create(WebArchive.class)
                                              +         .addClasses(MyApplication.class, MyResource.class, People.class, Person.class);
                                              +}
                                              +
                                              +
                                              Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                              +
                                              +
                                              @Test
                                              +public void testXML() throws SAXException, IOException {
                                              +    String xml = target.request("application/xml").get(String.class);
                                              +    System.out.println(xml);
                                              +    XMLAssert.assertXMLEqual("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><people><person><age>1</age><name>Penny</name></person><person><age>2</age><name>Leonard</name></person><person><age>3</age><name>Sheldon</name></person></people>", xml);
                                              +}
                                              +
                                              +
                                              Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                              +
                                              +
                                              @Test
                                              +public void testJSON() throws JSONException {
                                              +    String json = target.request("application/json").get(String.class);
                                              +    JSONAssert.assertEquals("[{\"age\":1,\"name\":\"Penny\"},{\"age\":2,\"name\":\"Leonard\"},{\"age\":3,\"name\":\"Sheldon\"}]", json, false);
                                              +}
                                              +
                                              +

                                              Share the Knowledge

                                              Find this sample useful? Share on

                                              There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                              Help Improve

                                              Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                              Recent Changelog

                                              • Jul 15, 2014: Removed default header by Roberto Cortez
                                              • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                              • Dec 03, 2013: Change to use client.target(uri) to be compatible with jax-rs 1.0 by Aslak Knutsen
                                              • Nov 12, 2013: Convert jax-rs samples to arquillian: client negotiation by Aslak Knutsen
                                              • Nov 07, 2013: Adding xmlassert and jsonassert for comparing xml and json by Arun Gupta
                                              • Nov 07, 2013: Adding tests by Arun Gupta
                                              • Nov 07, 2013: Removed glassfish-specific dependencies by Arun Gupta
                                              • Nov 07, 2013: Fixing a name by Arun Gupta
                                              • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                              • Sep 03, 2013: Adding a new sample to show client-side content negotiation by Arun Gupta
                                              How to help improve this sample
                                              The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                              git clone git://github.com/javaee-samples/javaee7-samples.git
                                              cd javaee7-samples/jaxrs/client-negotiation/

                                              Do the changes as you see fit and send a pull request!

                                              Good Luck!

                                              + \ No newline at end of file diff --git a/sample/jaxrs-db-access/index.html b/sample/jaxrs-db-access/index.html new file mode 100644 index 0000000..4716c2c --- /dev/null +++ b/sample/jaxrs-db-access/index.html @@ -0,0 +1,44 @@ +JavaEE Sample::JAXRS::Db access

                                              Db access

                                              Run
                                              How to run the sample
                                              The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                              git clone git://github.com/javaee-samples/javaee7-samples.git
                                              cd javaee7-samples/jaxrs/db-access/
                                              Now we are ready to start testing. You can run all the tests in this sample by executing:
                                              mvn test
                                              Or you can run individual tests by executing one of the following:
                                              mvn test -Dtest=EmployeeResourceTest

                                              EmployeeResourceTest

                                              Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                              Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                              +
                                              +
                                              @Deployment(testable = false)
                                              +public static WebArchive createDeployment() {
                                              +    return ShrinkWrap.create(WebArchive.class)
                                              +            .addClasses(Employee.class,
                                              +                    EmployeeResource.class,
                                              +                    MyApplication.class)
                                              +            .addAsResource("META-INF/persistence.xml")
                                              +            .addAsResource("META-INF/load.sql");
                                              +}
                                              +
                                              +
                                              Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                              +
                                              +
                                              @Test
                                              +public void testGet() {
                                              +    Employee[] list = target
                                              +            .request(MediaType.APPLICATION_XML)
                                              +            .get(Employee[].class);
                                              +    assertNotNull(list);
                                              +    assertEquals(8, list.length);
                                              +    assertFalse(list[0].equals(new Employee("Penny")));
                                              +    assertFalse(list[1].equals(new Employee("Sheldon")));
                                              +    assertFalse(list[2].equals(new Employee("Amy")));
                                              +    assertFalse(list[3].equals(new Employee("Leonard")));
                                              +    assertFalse(list[4].equals(new Employee("Bernadette")));
                                              +    assertFalse(list[5].equals(new Employee("Raj")));
                                              +    assertFalse(list[6].equals(new Employee("Howard")));
                                              +    assertFalse(list[7].equals(new Employee("Priya")));
                                              +}
                                              +
                                              +

                                              Share the Knowledge

                                              Find this sample useful? Share on

                                              There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                              Help Improve

                                              Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                              Recent Changelog

                                              • Apr 04, 2014: Adding a new test to show databse access from a jax-rs resource by arun-gupta
                                              How to help improve this sample
                                              The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                              git clone git://github.com/javaee-samples/javaee7-samples.git
                                              cd javaee7-samples/jaxrs/db-access/

                                              Do the changes as you see fit and send a pull request!

                                              Good Luck!

                                              + \ No newline at end of file diff --git a/sample/jaxrs-dynamicfilter/index.html b/sample/jaxrs-dynamicfilter/index.html new file mode 100644 index 0000000..e9b2413 --- /dev/null +++ b/sample/jaxrs-dynamicfilter/index.html @@ -0,0 +1,41 @@ +JavaEE Sample::JAXRS::Dynamicfilter

                                              Dynamicfilter

                                              Run
                                              How to run the sample
                                              The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                              git clone git://github.com/javaee-samples/javaee7-samples.git
                                              cd javaee7-samples/jaxrs/dynamicfilter/
                                              Now we are ready to start testing. You can run all the tests in this sample by executing:
                                              mvn test
                                              Or you can run individual tests by executing one of the following:
                                              mvn test -Dtest=MyResourceTest

                                              • Specifications in use:
                                                • JAXRS

                                                MyResourceTest

                                                Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                                Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                                +
                                                +
                                                @Deployment(testable=false)
                                                +public static WebArchive createDeployment() {
                                                +    return ShrinkWrap.create(WebArchive.class)
                                                +            .addClasses(
                                                +                    MyApplication.class,
                                                +                    MyResource.class,
                                                +                    DynamicServerLogggingFilterFeature.class,
                                                +                    ServerLoggingFilter.class);
                                                +}
                                                +
                                                +
                                                Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                +
                                                +
                                                @Test
                                                +public void testGet() {
                                                +    String response = target.request().get(String.class);
                                                +    assertEquals("apple", response);
                                                +}
                                                +
                                                +
                                                Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                +
                                                +
                                                @Test
                                                +public void testPost() {
                                                +    String response = target.request().post(Entity.text("apple"), String.class);
                                                +    assertEquals("apple", response);
                                                +}
                                                +
                                                +

                                                Share the Knowledge

                                                Find this sample useful? Share on

                                                There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                Help Improve

                                                Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                Recent Changelog

                                                • Jul 15, 2014: Removed default header by Roberto Cortez
                                                • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                • Dec 03, 2013: Change to use client.target(uri) to be compatible with jax-rs 1.0 by Aslak Knutsen
                                                • Nov 21, 2013: Removing @provider as the filter is dynamically registered by Arun Gupta
                                                • Nov 21, 2013: Removing @serverlogged so that serverloggingfilter is picked up automatically by Arun Gupta
                                                • Nov 21, 2013: Cleaning up the test - still failing with wildfly beta2 snapshot, needs further investigation by Arun Gupta
                                                • Nov 12, 2013: Convert jax-rs samples to arquillian: dynamic filter by Aslak Knutsen
                                                • Nov 07, 2013: Adding test by Arun Gupta
                                                • Oct 27, 2013: Remoremoving redundant dependencies by Arun Gupta
                                                • Oct 27, 2013: Adding more descriptive output statement by Arun Gupta
                                                How to help improve this sample
                                                The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                git clone git://github.com/javaee-samples/javaee7-samples.git
                                                cd javaee7-samples/jaxrs/dynamicfilter/

                                                Do the changes as you see fit and send a pull request!

                                                Good Luck!

                                                + \ No newline at end of file diff --git a/sample/jaxrs-fileupload/index.html b/sample/jaxrs-fileupload/index.html new file mode 100644 index 0000000..b598b80 --- /dev/null +++ b/sample/jaxrs-fileupload/index.html @@ -0,0 +1,63 @@ +JavaEE Sample::JAXRS::Fileupload

                                                Fileupload

                                                Run
                                                How to run the sample
                                                The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                git clone git://github.com/javaee-samples/javaee7-samples.git
                                                cd javaee7-samples/jaxrs/fileupload/
                                                Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                mvn test
                                                Or you can run individual tests by executing one of the following:
                                                mvn test -Dtest=MyResourceTest

                                                • Specifications in use:
                                                  • JAXRS

                                                  MyResourceTest

                                                  Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                                  Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                                  +
                                                  +
                                                  @Deployment(testable = false)
                                                  +public static WebArchive createDeployment() {
                                                  +	return ShrinkWrap.create(WebArchive.class).addClasses(MyApplication.class, MyResource.class);
                                                  +}
                                                  +
                                                  +
                                                  Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                  +
                                                  +
                                                  @Test
                                                  +public void shouldPostOctetStreamContentAsInputStream() {
                                                  +	// when
                                                  +	Long uploadedFileSize = target.path("/upload").request()
                                                  +			.post(Entity.entity(tempFile, MediaType.APPLICATION_OCTET_STREAM), Long.class);
                                                  +	// then
                                                  +	assertThat(uploadedFileSize).isEqualTo(1000);
                                                  +}
                                                  +
                                                  +
                                                  Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                  +
                                                  +
                                                  @Test
                                                  +public void shouldNotPostImagePngContentAsInputStream() {
                                                  +	// when
                                                  +	final Response response = target.path("/upload").request().post(Entity.entity(tempFile, "image/png"));
                                                  +	// then
                                                  +	assertThat(response.getStatus()).isEqualTo(Status.UNSUPPORTED_MEDIA_TYPE.getStatusCode());
                                                  +}
                                                  +
                                                  +
                                                  Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                  +
                                                  +
                                                  @Test
                                                  +public void shouldPostOctetStreamContentAsFile() {
                                                  +	// when
                                                  +	Long uploadedFileSize = target.path("/upload2").request()
                                                  +			.post(Entity.entity(tempFile, MediaType.APPLICATION_OCTET_STREAM), Long.class);
                                                  +	// then
                                                  +	assertThat(uploadedFileSize).isEqualTo(1000);
                                                  +}
                                                  +
                                                  +
                                                  Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                  +
                                                  +
                                                  @Test
                                                  +public void shouldPostImagePngContentAsFile() {
                                                  +	// when
                                                  +	Long uploadedFileSize = target.path("/upload2").request()
                                                  +			.post(Entity.entity(tempFile, "image/png"), Long.class);
                                                  +	// then
                                                  +	assertThat(uploadedFileSize).isEqualTo(1000);
                                                  +}
                                                  +
                                                  +

                                                  Share the Knowledge

                                                  Find this sample useful? Share on

                                                  There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                  Help Improve

                                                  Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                  Recent Changelog

                                                  • May 28, 2014: Jax-rs fileupload sample project by Xavier Coulon
                                                  How to help improve this sample
                                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                                  cd javaee7-samples/jaxrs/fileupload/

                                                  Do the changes as you see fit and send a pull request!

                                                  Good Luck!

                                                  + \ No newline at end of file diff --git a/sample/jaxrs-filter-interceptor/index.html b/sample/jaxrs-filter-interceptor/index.html new file mode 100644 index 0000000..48100f9 --- /dev/null +++ b/sample/jaxrs-filter-interceptor/index.html @@ -0,0 +1,13 @@ +JavaEE Sample::JAXRS::Filter interceptor

                                                  Filter interceptor

                                                  Run
                                                  How to run the sample
                                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                                  cd javaee7-samples/jaxrs/filter-interceptor/
                                                  Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                  mvn test
                                                  Or you can run individual tests by executing one of the following:

                                                  Missing a story. Add a test case.Show me how!

                                                  Share the Knowledge

                                                  Find this sample useful? Share on

                                                  There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                  Help Improve

                                                  Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                  Recent Changelog

                                                  • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                  • Oct 27, 2013: Adding more descriptive output statement by Arun Gupta
                                                  • Oct 27, 2013: Making the output statement consistent with server filter by Arun Gupta
                                                  • Oct 27, 2013: Removing redundant dependencies by Arun Gupta
                                                  • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                                  • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                                  How to help improve this sample
                                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                                  cd javaee7-samples/jaxrs/filter-interceptor/

                                                  Do the changes as you see fit and send a pull request!

                                                  Good Luck!

                                                  + \ No newline at end of file diff --git a/sample/jaxrs-filter/index.html b/sample/jaxrs-filter/index.html new file mode 100644 index 0000000..bfb564b --- /dev/null +++ b/sample/jaxrs-filter/index.html @@ -0,0 +1,45 @@ +JavaEE Sample::JAXRS::Filter

                                                  Filter

                                                  Run
                                                  How to run the sample
                                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                                  cd javaee7-samples/jaxrs/filter/
                                                  Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                  mvn test
                                                  Or you can run individual tests by executing one of the following:
                                                  mvn test -Dtest=MyResourceTest

                                                  • Specifications in use:
                                                    • JAXRS

                                                    MyResourceTest

                                                    Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                                    Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                                    +
                                                    +
                                                    @Deployment(testable = false)
                                                    +public static WebArchive createDeployment() {
                                                    +   return ShrinkWrap.create(WebArchive.class)
                                                    +         .addClasses(MyApplication.class, MyResource.class, ServerLoggingFilter.class);
                                                    +}
                                                    +
                                                    +
                                                    +

                                                    Test of getFruit method, of class MyResource.

                                                    +
                                                    +
                                                    +
                                                    @Test
                                                    +public void testGetFruit() {
                                                    +    String result = target.request().get(String.class);
                                                    +    assertEquals("Likely that the headers set in the filter were not available in endpoint",
                                                    +            "apple",
                                                    +            result);
                                                    +}
                                                    +
                                                    +
                                                    +

                                                    Test of getFruit2 method, of class MyResource.

                                                    +
                                                    +
                                                    +
                                                    @Test
                                                    +public void testPostFruit() {
                                                    +    String result = target.request().post(Entity.text("apple"), String.class);
                                                    +    assertEquals("Likely that the headers set in the filter were not available in endpoint",
                                                    +            "apple",
                                                    +            result);
                                                    +}
                                                    +
                                                    +

                                                    Share the Knowledge

                                                    Find this sample useful? Share on

                                                    There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                    Help Improve

                                                    Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                    Recent Changelog

                                                    • Jul 15, 2014: Removed default header by Roberto Cortez
                                                    • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                    • Dec 03, 2013: Change to use client.target(uri) to be compatible with jax-rs 1.0 by Aslak Knutsen
                                                    • Nov 12, 2013: Convert jax-rs samples to arquillian: filter by Aslak Knutsen
                                                    • Nov 07, 2013: Removing jsp/servlet, adding tests by Arun Gupta
                                                    • Oct 27, 2013: Making the output statement consistent with server filter by Arun Gupta
                                                    • Oct 27, 2013: Adding more descriptive output statement by Arun Gupta
                                                    • Oct 27, 2013: Removing redundant dependencies by Arun Gupta
                                                    • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                                    • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                                    How to help improve this sample
                                                    The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                    git clone git://github.com/javaee-samples/javaee7-samples.git
                                                    cd javaee7-samples/jaxrs/filter/

                                                    Do the changes as you see fit and send a pull request!

                                                    Good Luck!

                                                    + \ No newline at end of file diff --git a/sample/jaxrs-interceptor/index.html b/sample/jaxrs-interceptor/index.html new file mode 100644 index 0000000..0e4b005 --- /dev/null +++ b/sample/jaxrs-interceptor/index.html @@ -0,0 +1,13 @@ +JavaEE Sample::JAXRS::Interceptor

                                                    Interceptor

                                                    Run
                                                    How to run the sample
                                                    The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                    git clone git://github.com/javaee-samples/javaee7-samples.git
                                                    cd javaee7-samples/jaxrs/interceptor/
                                                    Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                    mvn test
                                                    Or you can run individual tests by executing one of the following:

                                                    Missing a story. Add a test case.Show me how!

                                                    Share the Knowledge

                                                    Find this sample useful? Share on

                                                    There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                    Help Improve

                                                    Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                    Recent Changelog

                                                    • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                    • Oct 27, 2013: Removing redundant dependencies by Arun Gupta
                                                    • Oct 27, 2013: Adding more descriptive output statement by Arun Gupta
                                                    • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                                    • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                                    How to help improve this sample
                                                    The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                    git clone git://github.com/javaee-samples/javaee7-samples.git
                                                    cd javaee7-samples/jaxrs/interceptor/

                                                    Do the changes as you see fit and send a pull request!

                                                    Good Luck!

                                                    + \ No newline at end of file diff --git a/sample/jaxrs-invocation-async/index.html b/sample/jaxrs-invocation-async/index.html new file mode 100644 index 0000000..06a3f43 --- /dev/null +++ b/sample/jaxrs-invocation-async/index.html @@ -0,0 +1,13 @@ +JavaEE Sample::JAXRS::Invocation async

                                                    Invocation async

                                                    Run
                                                    How to run the sample
                                                    The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                    git clone git://github.com/javaee-samples/javaee7-samples.git
                                                    cd javaee7-samples/jaxrs/invocation-async/
                                                    Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                    mvn test
                                                    Or you can run individual tests by executing one of the following:

                                                    Missing a story. Add a test case.Show me how!

                                                    Share the Knowledge

                                                    Find this sample useful? Share on

                                                    There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                    Help Improve

                                                    Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                    Recent Changelog

                                                    • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                    • Nov 08, 2013: Removing glassfish-specific dependencies by Arun Gupta
                                                    • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                                    • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                                    How to help improve this sample
                                                    The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                    git clone git://github.com/javaee-samples/javaee7-samples.git
                                                    cd javaee7-samples/jaxrs/invocation-async/

                                                    Do the changes as you see fit and send a pull request!

                                                    Good Luck!

                                                    + \ No newline at end of file diff --git a/sample/jaxrs-invocation/index.html b/sample/jaxrs-invocation/index.html new file mode 100644 index 0000000..4be2cd4 --- /dev/null +++ b/sample/jaxrs-invocation/index.html @@ -0,0 +1,13 @@ +JavaEE Sample::JAXRS::Invocation

                                                    Invocation

                                                    Run
                                                    How to run the sample
                                                    The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                    git clone git://github.com/javaee-samples/javaee7-samples.git
                                                    cd javaee7-samples/jaxrs/invocation/
                                                    Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                    mvn test
                                                    Or you can run individual tests by executing one of the following:

                                                    Missing a story. Add a test case.Show me how!

                                                    Share the Knowledge

                                                    Find this sample useful? Share on

                                                    There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                    Help Improve

                                                    Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                    Recent Changelog

                                                    • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                    • Oct 27, 2013: Removing redundant dependencies by Arun Gupta
                                                    • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                                    • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                                    How to help improve this sample
                                                    The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                    git clone git://github.com/javaee-samples/javaee7-samples.git
                                                    cd javaee7-samples/jaxrs/invocation/

                                                    Do the changes as you see fit and send a pull request!

                                                    Good Luck!

                                                    + \ No newline at end of file diff --git a/sample/jaxrs-jaxrs-client/index.html b/sample/jaxrs-jaxrs-client/index.html new file mode 100644 index 0000000..c0ec3ae --- /dev/null +++ b/sample/jaxrs-jaxrs-client/index.html @@ -0,0 +1,137 @@ +JavaEE Sample::JAXRS::Jaxrs client

                                                    Jaxrs client

                                                    Run
                                                    How to run the sample
                                                    The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                    git clone git://github.com/javaee-samples/javaee7-samples.git
                                                    cd javaee7-samples/jaxrs/jaxrs-client/
                                                    Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                    mvn test
                                                    Or you can run individual tests by executing one of the following:
                                                    mvn test -Dtest=MyResourceTest

                                                    MyResourceTest

                                                    Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                                    Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                                    +
                                                    +
                                                    @Deployment(testable = false)
                                                    +public static WebArchive createDeployment() {
                                                    +    return ShrinkWrap.create(WebArchive.class)
                                                    +            .addClasses(
                                                    +                    MyApplication.class, MyResource.class, People.class,
                                                    +                    Person.class, PersonSessionBean.class);
                                                    +}
                                                    +
                                                    +
                                                    +

                                                    Test of getList method, of class MyResource.

                                                    +
                                                    +
                                                    +
                                                    @Test
                                                    +public void test1PostAndGet() {
                                                    +    MultivaluedHashMap<String, String> map = new MultivaluedHashMap<>();
                                                    +    map.add("name", "Penny");
                                                    +    map.add("age", "1");
                                                    +    target.request().post(Entity.form(map));
                                                    +
                                                    +    map.clear();
                                                    +    map.add("name", "Leonard");
                                                    +    map.add("age", "2");
                                                    +    target.request().post(Entity.form(map));
                                                    +
                                                    +    map.clear();
                                                    +    map.add("name", "Sheldon");
                                                    +    map.add("age", "3");
                                                    +    target.request().post(Entity.form(map));
                                                    +
                                                    +    Person[] list = target.request().get(Person[].class);
                                                    +    assertEquals(3, list.length);
                                                    +
                                                    +    assertEquals("Penny", list[0].getName());
                                                    +    assertEquals(1, list[0].getAge());
                                                    +
                                                    +    assertEquals("Leonard", list[1].getName());
                                                    +    assertEquals(2, list[1].getAge());
                                                    +
                                                    +    assertEquals("Sheldon", list[2].getName());
                                                    +    assertEquals(3, list[2].getAge());
                                                    +}
                                                    +
                                                    +
                                                    +

                                                    Test of getPerson method, of class MyResource.

                                                    +
                                                    +
                                                    +
                                                    @Test
                                                    +public void test2GetSingle() {
                                                    +    Person p = target
                                                    +            .path("{id}")
                                                    +            .resolveTemplate("id", "1")
                                                    +            .request(MediaType.APPLICATION_XML)
                                                    +            .get(Person.class);
                                                    +    assertEquals("Leonard", p.getName());
                                                    +    assertEquals(2, p.getAge());
                                                    +}
                                                    +
                                                    +
                                                    +

                                                    Test of putToList method, of class MyResource.

                                                    +
                                                    +
                                                    +
                                                    @Test
                                                    +public void test3Put() {
                                                    +    MultivaluedHashMap<String, String> map = new MultivaluedHashMap<>();
                                                    +    map.add("name", "Howard");
                                                    +    map.add("age", "4");
                                                    +    target.request().post(Entity.form(map));
                                                    +
                                                    +    Person[] list = target.request().get(Person[].class);
                                                    +    assertEquals(4, list.length);
                                                    +
                                                    +    assertEquals("Howard", list[3].getName());
                                                    +    assertEquals(4, list[3].getAge());
                                                    +}
                                                    +
                                                    +
                                                    +

                                                    Test of deleteFromList method, of class MyResource.

                                                    +
                                                    +
                                                    +
                                                    @Test
                                                    +public void test4Delete() {
                                                    +    target
                                                    +            .path("{name}")
                                                    +            .resolveTemplate("name", "Howard")
                                                    +            .request()
                                                    +            .delete();
                                                    +    Person[] list = target.request().get(Person[].class);
                                                    +    assertEquals(3, list.length);
                                                    +}
                                                    +
                                                    +
                                                    Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                    +
                                                    +
                                                    @Test
                                                    +public void test5ClientSideNegotiation() {
                                                    +    String json = target.request().accept(MediaType.APPLICATION_JSON).get(String.class);
                                                    +
                                                    +    JsonReader reader = Json.createReader(new StringReader(json));
                                                    +    JsonArray jsonArray = reader.readArray();
                                                    +    assertEquals(1, jsonArray.getJsonObject(0).getInt("age"));
                                                    +    assertEquals("Penny", jsonArray.getJsonObject(0).getString("name"));
                                                    +    assertEquals(2, jsonArray.getJsonObject(1).getInt("age"));
                                                    +    assertEquals("Leonard", jsonArray.getJsonObject(1).getString("name"));
                                                    +    assertEquals(3, jsonArray.getJsonObject(2).getInt("age"));
                                                    +    assertEquals("Sheldon", jsonArray.getJsonObject(2).getString("name"));
                                                    +}
                                                    +
                                                    +
                                                    Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                    +
                                                    +
                                                    @Test
                                                    +public void test6DeleteAll() {
                                                    +    Person[] list = target.request().get(Person[].class);
                                                    +    for (Person p : list) {
                                                    +        target
                                                    +                .path("{name}")
                                                    +                .resolveTemplate("name", p.getName())
                                                    +                .request()
                                                    +                .delete();
                                                    +    }
                                                    +    list = target.request().get(Person[].class);
                                                    +    assertEquals(0, list.length);
                                                    +}
                                                    +
                                                    +

                                                    Share the Knowledge

                                                    Find this sample useful? Share on

                                                    There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                    Help Improve

                                                    Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                    Recent Changelog

                                                    • Dec 11, 2014: Fixed and improved tests for jaxrs client and singleton due to tomee failures by Roberto Cortez
                                                    • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                    • Apr 04, 2014: Removing redundant copyright by arun-gupta
                                                    • Dec 03, 2013: Change to use client.target(uri) to be compatible with jax-rs 1.0 by Aslak Knutsen
                                                    • Nov 21, 2013: Formatting changes by Arun Gupta
                                                    • Nov 12, 2013: Convert jax-rs samples to arquillian: jax-rs client by Aslak Knutsen
                                                    • Nov 08, 2013: Moved resteasy jaxb module to parent pom.xml by Arun Gupta
                                                    • Nov 08, 2013: Fix test failures by Petr Sakař
                                                    • Nov 08, 2013: Remove compile warnings by Petr Sakař
                                                    • Nov 08, 2013: Bugfix - concurrentmodificationexception in personsessionbean deleteperson by Petr Sakař
                                                    How to help improve this sample
                                                    The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                    git clone git://github.com/javaee-samples/javaee7-samples.git
                                                    cd javaee7-samples/jaxrs/jaxrs-client/

                                                    Do the changes as you see fit and send a pull request!

                                                    Good Luck!

                                                    + \ No newline at end of file diff --git a/sample/jaxrs-jaxrs-endpoint/index.html b/sample/jaxrs-jaxrs-endpoint/index.html new file mode 100644 index 0000000..c6a5e97 --- /dev/null +++ b/sample/jaxrs-jaxrs-endpoint/index.html @@ -0,0 +1,86 @@ +JavaEE Sample::JAXRS::Jaxrs endpoint

                                                    Jaxrs endpoint

                                                    Run
                                                    How to run the sample
                                                    The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                    git clone git://github.com/javaee-samples/javaee7-samples.git
                                                    cd javaee7-samples/jaxrs/jaxrs-endpoint/
                                                    Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                    mvn test
                                                    Or you can run individual tests by executing one of the following:
                                                    mvn test -Dtest=MyResourceTest

                                                    • Specifications in use:
                                                      • JAXRS

                                                      MyResourceTest

                                                      Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                                      +

                                                      Arquillian specific method for creating a file which can be deployed +while executing the test.

                                                      +
                                                      +
                                                      +
                                                      @Deployment(testable = false)
                                                      +public static WebArchive createDeployment() {
                                                      +    WebArchive war = ShrinkWrap.create(WebArchive.class).
                                                      +            addClass(MyApplication.class).
                                                      +            addClass(Database.class).
                                                      +            addClass(MyResource.class);
                                                      +    System.out.println(war.toString(true));
                                                      +
                                                      +    return war;
                                                      +}
                                                      +
                                                      +
                                                      +

                                                      Test of POST method, of class MyResource.

                                                      +
                                                      +
                                                      +
                                                      @Test
                                                      +public void test1Post() {
                                                      +    target.request().post(Entity.text("apple"));
                                                      +    String r = target.request().get(String.class);
                                                      +    assertEquals("[apple]", r);
                                                      +}
                                                      +
                                                      +
                                                      +

                                                      Test of PUT method, of class MyResource.

                                                      +
                                                      +
                                                      +
                                                      @Test
                                                      +public void test2Put() {
                                                      +    target.request().put(Entity.text("banana"));
                                                      +    String r = target.request().get(String.class);
                                                      +    assertEquals("[apple, banana]", r);
                                                      +}
                                                      +
                                                      +
                                                      +

                                                      Test of GET method, of class MyResource.

                                                      +
                                                      +
                                                      +
                                                      @Test
                                                      +public void test3GetAll() {
                                                      +    String r = target.request().get(String.class);
                                                      +    assertEquals("[apple, banana]", r);
                                                      +}
                                                      +
                                                      +
                                                      +

                                                      Test of GET method, of class MyResource.

                                                      +
                                                      +
                                                      +
                                                      @Test
                                                      +public void test4GetOne() {
                                                      +    String r = target.path("apple").request().get(String.class);
                                                      +    assertEquals("apple", r);
                                                      +}
                                                      +
                                                      +
                                                      +

                                                      Test of GET method, of class MyResource.

                                                      +
                                                      +
                                                      +
                                                      @Test
                                                      +public void test5Delete() {
                                                      +    target.path("banana").request().delete();
                                                      +    String r = target.request().get(String.class);
                                                      +    assertEquals("[apple]", r);
                                                      +
                                                      +    target.path("apple").request().delete();
                                                      +    r = target.request().get(String.class);
                                                      +    assertEquals("[]", r);
                                                      +}
                                                      +
                                                      +

                                                      Share the Knowledge

                                                      Find this sample useful? Share on

                                                      There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                      Help Improve

                                                      Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                      Recent Changelog

                                                      • Oct 05, 2014: #252 fixed arquillian configuration for the jobs by John D. Ament
                                                      • Jul 15, 2014: Removed default header by Roberto Cortez
                                                      • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                      • Mar 20, 2014: Update arquillian.xml cr1 references to final by Aslak Knutsen
                                                      • Dec 24, 2013: Updated to wildfly 8.0.0.cr1 by Roberto Cortez
                                                      • Dec 03, 2013: Change to use client.target(uri) to be compatible with jax-rs 1.0 by Aslak Knutsen
                                                      • Nov 12, 2013: Convert jax-rs samples to arquillian: jax-rs endpoint by Aslak Knutsen
                                                      • Nov 12, 2013: Add wildfly managed/remote and glassfish embedded arquillian profiles by Aslak Knutsen
                                                      • Nov 08, 2013: Removing redundant test by Arun Gupta
                                                      • Nov 07, 2013: Resteasy dependency moved to parent pom in a specific profile by Arun Gupta
                                                      How to help improve this sample
                                                      The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                      git clone git://github.com/javaee-samples/javaee7-samples.git
                                                      cd javaee7-samples/jaxrs/jaxrs-endpoint/

                                                      Do the changes as you see fit and send a pull request!

                                                      Good Luck!

                                                      + \ No newline at end of file diff --git a/sample/jaxrs-jaxrs-security-declarative/index.html b/sample/jaxrs-jaxrs-security-declarative/index.html new file mode 100644 index 0000000..720a7b1 --- /dev/null +++ b/sample/jaxrs-jaxrs-security-declarative/index.html @@ -0,0 +1,108 @@ +JavaEE Sample::JAXRS::Jaxrs security declarative

                                                      Jaxrs security declarative

                                                      Run
                                                      How to run the sample
                                                      The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                      git clone git://github.com/javaee-samples/javaee7-samples.git
                                                      cd javaee7-samples/jaxrs/jaxrs-security-declarative/
                                                      Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                      mvn test
                                                      Or you can run individual tests by executing one of the following:
                                                      mvn test -Dtest=MyResourceTest

                                                      MyResourceTest

                                                      Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                                      Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                                      +
                                                      +
                                                      @Deployment(testable = false)
                                                      +public static WebArchive createDeployment() {
                                                      +    return ShrinkWrap.create(WebArchive.class)
                                                      +            .addAsWebInfResource((new File(WEBAPP_SRC + "/WEB-INF", "web.xml")))
                                                      +            .addClasses(MyApplication.class, MyResource.class);
                                                      +}
                                                      +
                                                      +
                                                      Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                      +
                                                      +
                                                      @Test
                                                      +public void testGetWithCorrectCredentials() throws IOException, SAXException {
                                                      +    WebConversation conv = new WebConversation();
                                                      +    conv.setAuthentication("file", "u1", "p1");
                                                      +    GetMethodWebRequest getRequest = new GetMethodWebRequest(base + "/webresources/myresource");
                                                      +    WebResponse response = null;
                                                      +    try {
                                                      +        response = conv.getResponse(getRequest);
                                                      +    } catch (AuthorizationRequiredException e) {
                                                      +        fail(e.getMessage());
                                                      +    }
                                                      +    assertNotNull(response);
                                                      +    assertTrue(response.getText().contains("get"));
                                                      +}
                                                      +
                                                      +
                                                      Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                      +
                                                      +
                                                      @Test
                                                      +public void testGetSubResourceWithCorrectCredentials() throws IOException, SAXException {
                                                      +    WebConversation conv = new WebConversation();
                                                      +    conv.setAuthentication("file", "u1", "p1");
                                                      +    GetMethodWebRequest getRequest = new GetMethodWebRequest(base + "/webresources/myresource/1");
                                                      +    WebResponse response = null;
                                                      +    try {
                                                      +        response = conv.getResponse(getRequest);
                                                      +    } catch (AuthorizationRequiredException e) {
                                                      +        fail(e.getMessage());
                                                      +    }
                                                      +    assertNotNull(response);
                                                      +    assertTrue(response.getText().contains("get1"));
                                                      +}
                                                      +
                                                      +
                                                      Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                      +
                                                      +
                                                      @Test
                                                      +public void testGetWithIncorrectCredentials() throws IOException, SAXException {
                                                      +    WebConversation conv = new WebConversation();
                                                      +    conv.setAuthentication("file", "random", "random");
                                                      +    GetMethodWebRequest getRequest = new GetMethodWebRequest(base + "/webresources/myresource");
                                                      +    try {
                                                      +        WebResponse response = conv.getResponse(getRequest);
                                                      +    } catch (AuthorizationRequiredException e) {
                                                      +        assertNotNull(e);
                                                      +        return;
                                                      +    }
                                                      +    fail("GET can be called with incorrect credentials");
                                                      +}
                                                      +
                                                      +
                                                      Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                      +
                                                      +
                                                      @Test
                                                      +public void testPost() throws IOException, SAXException {
                                                      +    WebConversation conv = new WebConversation();
                                                      +    conv.setAuthentication("file", "u1", "p1");
                                                      +    PostMethodWebRequest postRequest = new PostMethodWebRequest(base + "/webresources/myresource");
                                                      +    try {
                                                      +        WebResponse response = conv.getResponse(postRequest);
                                                      +    } catch (HttpException e) {
                                                      +        assertNotNull(e);
                                                      +        assertEquals(403, e.getResponseCode());
                                                      +        return;
                                                      +    }
                                                      +    fail("POST is not authorized and can still be called");
                                                      +}
                                                      +
                                                      +
                                                      Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                      +
                                                      +
                                                      @Test
                                                      +public void testPut() throws IOException, SAXException {
                                                      +    WebConversation conv = new WebConversation();
                                                      +    conv.setAuthentication("file", "u1", "p1");
                                                      +    byte[] bytes = new byte[8];
                                                      +    ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
                                                      +    PutMethodWebRequest putRequest = new PutMethodWebRequest(base + "/webresources/myresource", bais, "text/plain");
                                                      +    try {
                                                      +        WebResponse response = conv.getResponse(putRequest);
                                                      +    } catch (HttpException e) {
                                                      +        assertNotNull(e);
                                                      +        assertEquals(403, e.getResponseCode());
                                                      +        return;
                                                      +    }
                                                      +    fail("PUT is not authorized and can still be called");
                                                      +}
                                                      +
                                                      +

                                                      Share the Knowledge

                                                      Find this sample useful? Share on

                                                      There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                      Help Improve

                                                      Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                      Recent Changelog

                                                      • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                      • Dec 12, 2013: Adding a new sample/test for jax-rs basic authentication security by arun-gupta
                                                      How to help improve this sample
                                                      The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                      git clone git://github.com/javaee-samples/javaee7-samples.git
                                                      cd javaee7-samples/jaxrs/jaxrs-security-declarative/

                                                      Do the changes as you see fit and send a pull request!

                                                      Good Luck!

                                                      + \ No newline at end of file diff --git a/sample/jaxrs-jsonp/index.html b/sample/jaxrs-jsonp/index.html new file mode 100644 index 0000000..a5005d4 --- /dev/null +++ b/sample/jaxrs-jsonp/index.html @@ -0,0 +1,68 @@ +JavaEE Sample::JAXRS::Jsonp

                                                      Jsonp

                                                      Run
                                                      How to run the sample
                                                      The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                      git clone git://github.com/javaee-samples/javaee7-samples.git
                                                      cd javaee7-samples/jaxrs/jsonp/
                                                      Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                      mvn test
                                                      Or you can run individual tests by executing one of the following:
                                                      mvn test -Dtest=MyResourceTest

                                                      MyResourceTest

                                                      Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                                      Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                                      +
                                                      +
                                                      @Deployment(testable = false)
                                                      +public static WebArchive createDeployment() {
                                                      +    return ShrinkWrap.create(WebArchive.class)
                                                      +            .addClasses(
                                                      +                    MyApplication.class,
                                                      +                    MyObjectResource.class,
                                                      +                    MyArrayResource.class);
                                                      +}
                                                      +
                                                      +
                                                      +

                                                      Test of echoObject method, of class MyObjectResource.

                                                      +
                                                      +
                                                      +
                                                      @Test
                                                      +public void testEchoObject() {
                                                      +    JsonObject jsonObject = Json.createObjectBuilder()
                                                      +            .add("apple", "red")
                                                      +            .add("banana", "yellow")
                                                      +            .build();
                                                      +
                                                      +    JsonObject json = targetObject
                                                      +            .request()
                                                      +            .post(Entity.entity(jsonObject, MediaType.APPLICATION_JSON), JsonObject.class);
                                                      +    assertNotNull(json);
                                                      +    assertFalse(json.isEmpty());
                                                      +    assertTrue(json.containsKey("apple"));
                                                      +    assertEquals("red", json.getString("apple"));
                                                      +    assertTrue(json.containsKey("banana"));
                                                      +    assertEquals("yellow", json.getString("banana"));
                                                      +}
                                                      +
                                                      +
                                                      Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                      +
                                                      +
                                                      @Test
                                                      +public void testEchoArray() {
                                                      +    JsonArray jsonArray = Json.createArrayBuilder()
                                                      +            .add(Json.createObjectBuilder()
                                                      +                    .add("apple", "red"))
                                                      +            .add(Json.createObjectBuilder()
                                                      +                    .add("banana", "yellow"))
                                                      +            .build();
                                                      +
                                                      +    JsonArray json = targetArray
                                                      +            .request()
                                                      +            .post(Entity.entity(jsonArray, MediaType.APPLICATION_JSON), JsonArray.class);
                                                      +    assertNotNull(json);
                                                      +    assertEquals(2, json.size());
                                                      +    assertTrue(json.getJsonObject(0).containsKey("apple"));
                                                      +    assertEquals("red", json.getJsonObject(0).getString("apple"));
                                                      +    assertTrue(json.getJsonObject(1).containsKey("banana"));
                                                      +    assertEquals("yellow", json.getJsonObject(1).getString("banana"));
                                                      +}
                                                      +
                                                      +

                                                      Share the Knowledge

                                                      Find this sample useful? Share on

                                                      There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                      Help Improve

                                                      Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                      Recent Changelog

                                                      • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                      • Jul 11, 2014: Convert to tests for json-p usage with jax-rs by arun-gupta
                                                      • Dec 03, 2013: Change to use client.target(uri) to be compatible with jax-rs 1.0 by Aslak Knutsen
                                                      • Nov 22, 2013: Adding a new arquillian-ready test, still failing with org.glassfish.json.jsonproviderimpl not found by Arun Gupta
                                                      • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                                      • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                                      How to help improve this sample
                                                      The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                      git clone git://github.com/javaee-samples/javaee7-samples.git
                                                      cd javaee7-samples/jaxrs/jsonp/

                                                      Do the changes as you see fit and send a pull request!

                                                      Good Luck!

                                                      + \ No newline at end of file diff --git a/sample/jaxrs-link/index.html b/sample/jaxrs-link/index.html new file mode 100644 index 0000000..cf00aeb --- /dev/null +++ b/sample/jaxrs-link/index.html @@ -0,0 +1,13 @@ +JavaEE Sample::JAXRS::Link

                                                      Link

                                                      Run
                                                      How to run the sample
                                                      The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                      git clone git://github.com/javaee-samples/javaee7-samples.git
                                                      cd javaee7-samples/jaxrs/link/
                                                      Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                      mvn test
                                                      Or you can run individual tests by executing one of the following:

                                                      • Specifications in use:
                                                        • JAXRS
                                                        Missing a story. Add a test case.Show me how!

                                                        Share the Knowledge

                                                        Find this sample useful? Share on

                                                        There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                        Help Improve

                                                        Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                        Recent Changelog

                                                        • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                        • Jul 11, 2014: Cleaning up some source code by arun-gupta
                                                        • Oct 23, 2013: Make it compiled in glassfish 4 and wildfly 8 beta1 by Jeff Zhang
                                                        • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                                        • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                                        How to help improve this sample
                                                        The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                        git clone git://github.com/javaee-samples/javaee7-samples.git
                                                        cd javaee7-samples/jaxrs/link/

                                                        Do the changes as you see fit and send a pull request!

                                                        Good Luck!

                                                        + \ No newline at end of file diff --git a/sample/jaxrs-mapping-exceptions/index.html b/sample/jaxrs-mapping-exceptions/index.html new file mode 100644 index 0000000..de03aad --- /dev/null +++ b/sample/jaxrs-mapping-exceptions/index.html @@ -0,0 +1,49 @@ +JavaEE Sample::JAXRS::Mapping exceptions

                                                        Mapping exceptions

                                                        Run
                                                        How to run the sample
                                                        The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                        git clone git://github.com/javaee-samples/javaee7-samples.git
                                                        cd javaee7-samples/jaxrs/mapping-exceptions/
                                                        Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                        mvn test
                                                        Or you can run individual tests by executing one of the following:
                                                        mvn test -Dtest=MyResourceTest

                                                        • Specifications in use:
                                                          • JAXRS

                                                          MyResourceTest

                                                          Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                                          Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                                          +
                                                          +
                                                          @Deployment(testable = false)
                                                          +public static WebArchive createDeployment() {
                                                          +   return ShrinkWrap.create(WebArchive.class)
                                                          +         .addClasses(
                                                          +               MyApplication.class, MyResource.class,
                                                          +               OrderNotFoundException.class, OrderNotFoundExceptionMapper.class);
                                                          +}
                                                          +
                                                          +
                                                          +

                                                          Test of getOrder method, of class MyResource.

                                                          +
                                                          +
                                                          +
                                                          @Test
                                                          +public void testOddOrder() {
                                                          +    String response = target.path("1").request().get(String.class);
                                                          +    assertEquals("1", response);
                                                          +}
                                                          +
                                                          +
                                                          +

                                                          Test of getOrder method, of class MyResource.

                                                          +
                                                          +
                                                          +
                                                          @Test
                                                          +public void testEvenOrder() {
                                                          +    try {
                                                          +        System.out.print(target.path("2").request().get(String.class));
                                                          +    } catch (ClientErrorException e) {
                                                          +        assertEquals(412, e.getResponse().getStatus());
                                                          +    } catch (Exception e) {
                                                          +        fail(e.getMessage());
                                                          +    }
                                                          +
                                                          +}
                                                          +
                                                          +

                                                          Share the Knowledge

                                                          Find this sample useful? Share on

                                                          There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                          Help Improve

                                                          Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                          Recent Changelog

                                                          • Jul 15, 2014: Removed default header by Roberto Cortez
                                                          • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                          • Dec 03, 2013: Change to use client.target(uri) to be compatible with jax-rs 1.0 by Aslak Knutsen
                                                          • Nov 12, 2013: Convert jax-rs samples to arquillian: mapping exception by Aslak Knutsen
                                                          • Nov 08, 2013: Removing web pages and converting to unit tests by Arun Gupta
                                                          • Nov 08, 2013: Returning just the order id by Arun Gupta
                                                          • Nov 08, 2013: Removing glassfish specific dependency by Arun Gupta
                                                          • Oct 27, 2013: Adding more descriptive output statement by Arun Gupta
                                                          • Oct 27, 2013: Adding more descriptive output statement by Arun Gupta
                                                          • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                                          How to help improve this sample
                                                          The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                          git clone git://github.com/javaee-samples/javaee7-samples.git
                                                          cd javaee7-samples/jaxrs/mapping-exceptions/

                                                          Do the changes as you see fit and send a pull request!

                                                          Good Luck!

                                                          + \ No newline at end of file diff --git a/sample/jaxrs-paramconverter/index.html b/sample/jaxrs-paramconverter/index.html new file mode 100644 index 0000000..e11cf4a --- /dev/null +++ b/sample/jaxrs-paramconverter/index.html @@ -0,0 +1,45 @@ +JavaEE Sample::JAXRS::Paramconverter

                                                          Paramconverter

                                                          Run
                                                          How to run the sample
                                                          The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                          git clone git://github.com/javaee-samples/javaee7-samples.git
                                                          cd javaee7-samples/jaxrs/paramconverter/
                                                          Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                          mvn test
                                                          Or you can run individual tests by executing one of the following:
                                                          mvn test -Dtest=MyResourceTest

                                                          • Specifications in use:
                                                            • JAXRS

                                                            MyResourceTest

                                                            Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                                            Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                                            +
                                                            +
                                                            @Deployment(testable = false)
                                                            +public static WebArchive createDeployment() {
                                                            +   return ShrinkWrap.create(WebArchive.class)
                                                            +         .addClasses(MyApplication.class, MyResource.class, MyBeanConverterProvider.class, MyBean.class);
                                                            +}
                                                            +
                                                            +
                                                            Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                            +
                                                            +
                                                            @Test
                                                            +public void testRequestWithQueryParam() {
                                                            +    String r = target.queryParam("search", "foo").request().get(String.class);
                                                            +    assertEquals("foo", r);
                                                            +}
                                                            +
                                                            +
                                                            Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                            +
                                                            +
                                                            @Test
                                                            +public void testRequestWithNoQueryParam() {
                                                            +	String r = target.request().get(String.class);
                                                            +	assertEquals("bar", r);
                                                            +}
                                                            +
                                                            +
                                                            Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                            +
                                                            +
                                                            @Test
                                                            +public void testRequestWithPathParam() {
                                                            +	String r = target.path("/foo").request().get(String.class);
                                                            +	assertEquals("foo", r);
                                                            +}
                                                            +
                                                            +

                                                            Share the Knowledge

                                                            Find this sample useful? Share on

                                                            There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                            Help Improve

                                                            Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                            Recent Changelog

                                                            • May 28, 2014: Jax-rs paramconverterprovider sample project by Xavier Coulon
                                                            How to help improve this sample
                                                            The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                            git clone git://github.com/javaee-samples/javaee7-samples.git
                                                            cd javaee7-samples/jaxrs/paramconverter/

                                                            Do the changes as you see fit and send a pull request!

                                                            Good Luck!

                                                            + \ No newline at end of file diff --git a/sample/jaxrs-readerwriter-injection/index.html b/sample/jaxrs-readerwriter-injection/index.html new file mode 100644 index 0000000..7a116fe --- /dev/null +++ b/sample/jaxrs-readerwriter-injection/index.html @@ -0,0 +1,51 @@ +JavaEE Sample::JAXRS::Readerwriter injection

                                                            Readerwriter injection

                                                            Run
                                                            How to run the sample
                                                            The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                            git clone git://github.com/javaee-samples/javaee7-samples.git
                                                            cd javaee7-samples/jaxrs/readerwriter-injection/
                                                            Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                            mvn test
                                                            Or you can run individual tests by executing one of the following:
                                                            mvn test -Dtest=MyResourceTest

                                                            MyResourceTest

                                                            Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                                            Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                                            +
                                                            +
                                                            @Deployment(testable = false)
                                                            +public static WebArchive createDeployment() {
                                                            +    WebArchive war = ShrinkWrap.create(WebArchive.class)
                                                            +            .addClasses(
                                                            +                    MyApplication.class,
                                                            +                    MyResource.class,
                                                            +                    MyObject.class,
                                                            +                    MyReader.class,
                                                            +                    MyWriter.class,
                                                            +                    AnotherObject.class);
                                                            +
                                                            +    System.out.println(war.toString(true));
                                                            +    return war;
                                                            +}
                                                            +
                                                            +
                                                            Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                            +
                                                            +
                                                            @Test
                                                            +public void testPostWithCustomMimeTypeAndInjectedBeanInReader() {
                                                            +    String fruit = target
                                                            +            .request()
                                                            +            .post(Entity.entity(new MyObject(1), MyObject.MIME_TYPE), String.class);
                                                            +    assertEquals("mango", fruit);
                                                            +}
                                                            +
                                                            +
                                                            Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                            +
                                                            +
                                                            @Test
                                                            +public void testPostSimple() {
                                                            +    String fruit = target
                                                            +            .path("index")
                                                            +            .request()
                                                            +            .post(Entity.text("1"), String.class);
                                                            +    assertEquals("banana", fruit);
                                                            +}
                                                            +
                                                            +

                                                            Share the Knowledge

                                                            Find this sample useful? Share on

                                                            There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                            Help Improve

                                                            Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                            Recent Changelog

                                                            • Jul 15, 2014: Removed default header by Roberto Cortez
                                                            • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                            • Dec 03, 2013: Remove messagebodyreader from client by Aslak Knutsen
                                                            • Nov 22, 2013: Adding arquillian tests and dropping redundant files by Arun Gupta
                                                            • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                                            • Sep 10, 2013: Moving readerwriter-pu to readerwriter-injection by Arun Gupta
                                                            How to help improve this sample
                                                            The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                            git clone git://github.com/javaee-samples/javaee7-samples.git
                                                            cd javaee7-samples/jaxrs/readerwriter-injection/

                                                            Do the changes as you see fit and send a pull request!

                                                            Good Luck!

                                                            + \ No newline at end of file diff --git a/sample/jaxrs-readerwriter-json/index.html b/sample/jaxrs-readerwriter-json/index.html new file mode 100644 index 0000000..d47ad17 --- /dev/null +++ b/sample/jaxrs-readerwriter-json/index.html @@ -0,0 +1,13 @@ +JavaEE Sample::JAXRS::Readerwriter json

                                                            Readerwriter json

                                                            Run
                                                            How to run the sample
                                                            The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                            git clone git://github.com/javaee-samples/javaee7-samples.git
                                                            cd javaee7-samples/jaxrs/readerwriter-json/
                                                            Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                            mvn test
                                                            Or you can run individual tests by executing one of the following:

                                                            Missing a story. Add a test case.Show me how!

                                                            Share the Knowledge

                                                            Find this sample useful? Share on

                                                            There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                            Help Improve

                                                            Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                            Recent Changelog

                                                            • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                            • Oct 27, 2013: Adding more descriptive output statement by Arun Gupta
                                                            • Sep 20, 2013: Adding @produces by Arun Gupta
                                                            • Sep 20, 2013: Removing redundant attributes from @webservlet by Arun Gupta
                                                            • Sep 20, 2013: Removing redundant imports by Arun Gupta
                                                            • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                                            • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                                            How to help improve this sample
                                                            The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                            git clone git://github.com/javaee-samples/javaee7-samples.git
                                                            cd javaee7-samples/jaxrs/readerwriter-json/

                                                            Do the changes as you see fit and send a pull request!

                                                            Good Luck!

                                                            + \ No newline at end of file diff --git a/sample/jaxrs-readerwriter/index.html b/sample/jaxrs-readerwriter/index.html new file mode 100644 index 0000000..025fe73 --- /dev/null +++ b/sample/jaxrs-readerwriter/index.html @@ -0,0 +1,54 @@ +JavaEE Sample::JAXRS::Readerwriter

                                                            Readerwriter

                                                            Run
                                                            How to run the sample
                                                            The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                            git clone git://github.com/javaee-samples/javaee7-samples.git
                                                            cd javaee7-samples/jaxrs/readerwriter/
                                                            Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                            mvn test
                                                            Or you can run individual tests by executing one of the following:
                                                            mvn test -Dtest=MyResourceTest

                                                            • Specifications in use:
                                                              • JAXRS

                                                              MyResourceTest

                                                              Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                                              Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                                              +
                                                              +
                                                              @Deployment(testable = false)
                                                              +public static WebArchive createDeployment() {
                                                              +    WebArchive war = ShrinkWrap.create(WebArchive.class)
                                                              +            .addClasses(
                                                              +                    MyApplication.class,
                                                              +                    MyResource.class,
                                                              +                    MyObject.class,
                                                              +                    MyReader.class,
                                                              +                    MyWriter.class);
                                                              +
                                                              +    System.out.println(war.toString(true));
                                                              +    return war;
                                                              +}
                                                              +
                                                              +
                                                              +

                                                              Test of postFruit method, of class MyResource.

                                                              +
                                                              +
                                                              +
                                                              @Test
                                                              +public void testPostWithCustomMimeType() {
                                                              +    String fruit = target
                                                              +            .request()
                                                              +            .post(Entity.entity(new MyObject(1), MyObject.MIME_TYPE), String.class);
                                                              +    assertEquals("banana", fruit);
                                                              +}
                                                              +
                                                              +
                                                              +

                                                              Test of postFruitIndexed method, of class MyResource.

                                                              +
                                                              +
                                                              +
                                                              @Test
                                                              +public void testPostSimple() {
                                                              +    String fruit = target
                                                              +            .path("index")
                                                              +            .request()
                                                              +            .post(Entity.text("1"), String.class);
                                                              +    assertEquals("banana", fruit);
                                                              +}
                                                              +
                                                              +

                                                              Share the Knowledge

                                                              Find this sample useful? Share on

                                                              There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                              Help Improve

                                                              Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                              Recent Changelog

                                                              • Jul 15, 2014: Removed default header by Roberto Cortez
                                                              • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                              • Dec 03, 2013: Remove messagebodyreader from the client by Aslak Knutsen
                                                              • Nov 22, 2013: And removing redundant files by Arun Gupta
                                                              • Nov 22, 2013: Adding new arquillian tests by Arun Gupta
                                                              • Oct 27, 2013: Removing redundant statements by Arun Gupta
                                                              • Sep 20, 2013: Better formatting of output messages by Arun Gupta
                                                              • Sep 20, 2013: Adding better output messages by Arun Gupta
                                                              • Sep 20, 2013: Removing redundant attributes from @webservlet by Arun Gupta
                                                              • Sep 20, 2013: Adding a final qualifier by Arun Gupta
                                                              How to help improve this sample
                                                              The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                              git clone git://github.com/javaee-samples/javaee7-samples.git
                                                              cd javaee7-samples/jaxrs/readerwriter/

                                                              Do the changes as you see fit and send a pull request!

                                                              Good Luck!

                                                              + \ No newline at end of file diff --git a/sample/jaxrs-request-binding/index.html b/sample/jaxrs-request-binding/index.html new file mode 100644 index 0000000..2ccf958 --- /dev/null +++ b/sample/jaxrs-request-binding/index.html @@ -0,0 +1,13 @@ +JavaEE Sample::JAXRS::Request binding

                                                              Request binding

                                                              Run
                                                              How to run the sample
                                                              The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                              git clone git://github.com/javaee-samples/javaee7-samples.git
                                                              cd javaee7-samples/jaxrs/request-binding/
                                                              Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                              mvn test
                                                              Or you can run individual tests by executing one of the following:

                                                              Missing a story. Add a test case.Show me how!

                                                              Share the Knowledge

                                                              Find this sample useful? Share on

                                                              There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                              Help Improve

                                                              Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                              Recent Changelog

                                                              • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                              • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                                              • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                                              How to help improve this sample
                                                              The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                              git clone git://github.com/javaee-samples/javaee7-samples.git
                                                              cd javaee7-samples/jaxrs/request-binding/

                                                              Do the changes as you see fit and send a pull request!

                                                              Good Luck!

                                                              + \ No newline at end of file diff --git a/sample/jaxrs-resource-validation/index.html b/sample/jaxrs-resource-validation/index.html new file mode 100644 index 0000000..e5d2e3b --- /dev/null +++ b/sample/jaxrs-resource-validation/index.html @@ -0,0 +1,111 @@ +JavaEE Sample::JAXRS::Resource validation

                                                              Resource validation

                                                              Run
                                                              How to run the sample
                                                              The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                              git clone git://github.com/javaee-samples/javaee7-samples.git
                                                              cd javaee7-samples/jaxrs/resource-validation/
                                                              Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                              mvn test
                                                              Or you can run individual tests by executing one of the following:
                                                              mvn test -Dtest=NameAddResourceTest

                                                              NameAddResourceTest

                                                              Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                                              Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                                              +
                                                              +
                                                              @Deployment(testable = false)
                                                              +public static WebArchive createDeployment() {
                                                              +    return ShrinkWrap.create(WebArchive.class)
                                                              +            .addClasses(MyApplication.class, NameAddResource.class, Name.class, Email.class, EmailValidator.class);
                                                              +}
                                                              +
                                                              +
                                                              Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                              +
                                                              +
                                                              @Test
                                                              +public void shouldPassNameValidation() throws Exception {
                                                              +    JsonObject name = startValidName()
                                                              +            .build();
                                                              +
                                                              +    Response response = postName(name);
                                                              +
                                                              +    assertStatus(response, OK);
                                                              +}
                                                              +
                                                              +
                                                              Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                              +
                                                              +
                                                              @Test
                                                              +public void shouldFailAtFirstNameSizeValidation() throws Exception {
                                                              +    JsonObject name = startValidName()
                                                              +            .add("firstName", "")
                                                              +            .build();
                                                              +
                                                              +    Response response = postName(name);
                                                              +
                                                              +    assertFailedValidation(response);
                                                              +}
                                                              +
                                                              +
                                                              Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                              +
                                                              +
                                                              @Test
                                                              +public void shouldFailAtFirstNameNullValidation() throws Exception {
                                                              +    JsonObject name = startValidName()
                                                              +            .addNull("firstName")
                                                              +            .build();
                                                              +
                                                              +    Response response = postName(name);
                                                              +
                                                              +    assertFailedValidation(response);
                                                              +}
                                                              +
                                                              +
                                                              Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                              +
                                                              +
                                                              @Test
                                                              +public void shouldFailAtLastNameSizeValidation() throws Exception {
                                                              +    JsonObject name = startValidName()
                                                              +            .add("lastName", "")
                                                              +            .build();
                                                              +
                                                              +    Response response = postName(name);
                                                              +
                                                              +    assertFailedValidation(response);
                                                              +}
                                                              +
                                                              +
                                                              Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                              +
                                                              +
                                                              @Test
                                                              +public void shouldFailAtLastNameNullValidation() throws Exception {
                                                              +    JsonObject name = startValidName()
                                                              +            .addNull("lastName")
                                                              +            .build();
                                                              +
                                                              +    Response response = postName(name);
                                                              +
                                                              +    assertFailedValidation(response);
                                                              +}
                                                              +
                                                              +
                                                              Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                              +
                                                              +
                                                              @Test
                                                              +public void shouldFailAtEmailAtSymbolValidation() throws Exception {
                                                              +    JsonObject name = startValidName()
                                                              +            .add("email", "missing-at-symbol.com")
                                                              +            .build();
                                                              +
                                                              +    Response response = postName(name);
                                                              +
                                                              +    assertFailedValidation(response);
                                                              +}
                                                              +
                                                              +
                                                              Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                              +
                                                              +
                                                              @Test
                                                              +public void shouldFailAtEmailComDomainValidation() throws Exception {
                                                              +    JsonObject name = startValidName()
                                                              +            .add("email", "other-than-com@domain.pl")
                                                              +            .build();
                                                              +
                                                              +    Response response = postName(name);
                                                              +
                                                              +    assertFailedValidation(response);
                                                              +}
                                                              +
                                                              +

                                                              Share the Knowledge

                                                              Find this sample useful? Share on

                                                              There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                              Help Improve

                                                              Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                              Recent Changelog

                                                              • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                              • Dec 03, 2013: Added test cases for null lastname, null firstname, email domain name by dagguh
                                                              • Dec 03, 2013: Removed resteasy vendor lock by dagguh
                                                              • Dec 02, 2013: Reduced duplication in test code by dagguh
                                                              • Dec 02, 2013: Test case for successful name valdiation by dagguh
                                                              • Dec 02, 2013: Trying to shrinkwrap the used messagebodywriter by dagguh
                                                              • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                                              • Aug 27, 2013: Added different types of validation with jax-rs (field, property, @valid) by Arun Gupta
                                                              • Aug 27, 2013: Removing a redundant import by Arun Gupta
                                                              • Aug 27, 2013: Iterating over both the targets by Arun Gupta
                                                              How to help improve this sample
                                                              The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                              git clone git://github.com/javaee-samples/javaee7-samples.git
                                                              cd javaee7-samples/jaxrs/resource-validation/

                                                              Do the changes as you see fit and send a pull request!

                                                              Good Luck!

                                                              + \ No newline at end of file diff --git a/sample/jaxrs-server-negotiation/index.html b/sample/jaxrs-server-negotiation/index.html new file mode 100644 index 0000000..85538af --- /dev/null +++ b/sample/jaxrs-server-negotiation/index.html @@ -0,0 +1,50 @@ +JavaEE Sample::JAXRS::Server negotiation

                                                              Server negotiation

                                                              Run
                                                              How to run the sample
                                                              The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                              git clone git://github.com/javaee-samples/javaee7-samples.git
                                                              cd javaee7-samples/jaxrs/server-negotiation/
                                                              Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                              mvn test
                                                              Or you can run individual tests by executing one of the following:
                                                              mvn test -Dtest=MyResourceTest

                                                              • Specifications in use:
                                                                • JAXRS

                                                                MyResourceTest

                                                                Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                                                Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                                                +
                                                                +
                                                                @Deployment(testable = false)
                                                                +public static WebArchive createDeployment() {
                                                                +   return ShrinkWrap.create(WebArchive.class)
                                                                +         .addClasses(MyApplication.class, MyResource.class, People.class, Person.class);
                                                                +}
                                                                +
                                                                +
                                                                Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                +
                                                                +
                                                                @Test
                                                                +public void testJson() throws JSONException {
                                                                +    String response = target.request().accept("application/*").get(String.class);
                                                                +    JSONAssert.assertEquals("[{\"name\":\"Penny\",\"age\":1},{\"name\":\"Leonard\",\"age\":2},{\"name\":\"Sheldon\",\"age\":3}]",
                                                                +            response,
                                                                +            JSONCompareMode.STRICT);
                                                                +}
                                                                +
                                                                +
                                                                Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                +
                                                                +
                                                                @Test
                                                                +public void testJson2() throws JSONException {
                                                                +    String response = target.request().get(String.class);
                                                                +    JSONAssert.assertEquals("[{\"name\":\"Penny\",\"age\":1},{\"name\":\"Leonard\",\"age\":2},{\"name\":\"Sheldon\",\"age\":3}]",
                                                                +            response,
                                                                +            JSONCompareMode.STRICT);
                                                                +}
                                                                +
                                                                +
                                                                Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                +
                                                                +
                                                                @Test
                                                                +public void testXml() throws JSONException, SAXException, IOException {
                                                                +    String response = target.request().accept("application/xml").get(String.class);
                                                                +    XMLAssert.assertXMLEqual("<people><person><age>1</age><name>Penny</name></person><person><age>2</age><name>Leonard</name></person><person><age>3</age><name>Sheldon</name></person></people>",
                                                                +            response);
                                                                +}
                                                                +
                                                                +

                                                                Share the Knowledge

                                                                Find this sample useful? Share on

                                                                There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                Help Improve

                                                                Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                Recent Changelog

                                                                • Jul 15, 2014: Removed default header by Roberto Cortez
                                                                • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                                • Dec 03, 2013: Change to use client.target(uri) to be compatible with jax-rs 1.0 by Aslak Knutsen
                                                                • Nov 12, 2013: Convert jax-rs samples to arquillian: server negotiation by Aslak Knutsen
                                                                • Nov 08, 2013: Removing web pages/servlet and converting to unit tests by Arun Gupta
                                                                • Nov 08, 2013: Fixing a name by Arun Gupta
                                                                • Oct 02, 2013: Explicitly specifying application/* media type by Arun Gupta
                                                                • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                                                • Sep 04, 2013: Adding a logging statement by Arun Gupta
                                                                • Aug 27, 2013: Fixing a log statement by Arun Gupta
                                                                How to help improve this sample
                                                                The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                cd javaee7-samples/jaxrs/server-negotiation/

                                                                Do the changes as you see fit and send a pull request!

                                                                Good Luck!

                                                                + \ No newline at end of file diff --git a/sample/jaxrs-singleton/index.html b/sample/jaxrs-singleton/index.html new file mode 100644 index 0000000..21c82f9 --- /dev/null +++ b/sample/jaxrs-singleton/index.html @@ -0,0 +1,130 @@ +JavaEE Sample::JAXRS::singleton

                                                                singleton

                                                                Run
                                                                How to run the sample
                                                                The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                cd javaee7-samples/jaxrs/singleton/
                                                                Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                mvn test
                                                                Or you can run individual tests by executing one of the following:
                                                                mvn test -Dtest=ApplicationSingletonResourceTestmvn test -Dtest=AnnotatedSingletonResourceTest

                                                                ApplicationSingletonResourceTest

                                                                Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                                                Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                                                +
                                                                +
                                                                @Deployment(testable = false)
                                                                +public static WebArchive createDeployment() {
                                                                +    return ShrinkWrap.create(WebArchive.class)
                                                                +                     .addClasses(
                                                                +                             MyApplication.class,
                                                                +                             ApplicationSingletonResource.class);
                                                                +}
                                                                +
                                                                +
                                                                Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                +
                                                                +
                                                                @Test
                                                                +@InSequence(1)
                                                                +public void testPost() {
                                                                +    target.request().post(Entity.text("pineapple"));
                                                                +    target.request().post(Entity.text("mango"));
                                                                +    target.request().post(Entity.text("kiwi"));
                                                                +    target.request().post(Entity.text("passion fruit"));
                                                                +
                                                                +    String list = target.request().get(String.class);
                                                                +    StringTokenizer tokens = new StringTokenizer(list, ",");
                                                                +    assertEquals(4, tokens.countTokens());
                                                                +}
                                                                +
                                                                +
                                                                Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                +
                                                                +
                                                                @Test
                                                                +@InSequence(2)
                                                                +public void testGet() {
                                                                +    String response = target.path("2").request().get(String.class);
                                                                +    assertEquals("kiwi", response);
                                                                +}
                                                                +
                                                                +
                                                                Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                +
                                                                +
                                                                @Test
                                                                +@InSequence(3)
                                                                +public void testDelete() {
                                                                +    target.path("kiwi").request().delete();
                                                                +
                                                                +    String list = target.request().get(String.class);
                                                                +    StringTokenizer tokens = new StringTokenizer(list, ",");
                                                                +    assertEquals(3, tokens.countTokens());
                                                                +}
                                                                +
                                                                +
                                                                Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                +
                                                                +
                                                                @Test
                                                                +@InSequence(4)
                                                                +public void testPut() {
                                                                +    target.request().put(Entity.text("apple"));
                                                                +
                                                                +    String list = target.request().get(String.class);
                                                                +    StringTokenizer tokens = new StringTokenizer(list, ",");
                                                                +    assertEquals(4, tokens.countTokens());
                                                                +}
                                                                +
                                                                +

                                                                AnnotatedSingletonResourceTest

                                                                Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                                                Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                                                +
                                                                +
                                                                @Deployment(testable = false)
                                                                +public static WebArchive createDeployment() {
                                                                +    return ShrinkWrap.create(WebArchive.class)
                                                                +                     .addClasses(
                                                                +                             MyAnnotatedApplication.class,
                                                                +                             AnnotatedSingletonResource.class);
                                                                +}
                                                                +
                                                                +
                                                                Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                +
                                                                +
                                                                @Test
                                                                +@InSequence(1)
                                                                +public void testPost() {
                                                                +    target.request().post(Entity.text("pineapple"));
                                                                +    target.request().post(Entity.text("mango"));
                                                                +    target.request().post(Entity.text("kiwi"));
                                                                +    target.request().post(Entity.text("passion fruit"));
                                                                +
                                                                +    String list = target.request().get(String.class);
                                                                +    System.out.println("--> " + list);
                                                                +    StringTokenizer tokens = new StringTokenizer(list, ",");
                                                                +    assertEquals(4, tokens.countTokens());
                                                                +}
                                                                +
                                                                +
                                                                Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                +
                                                                +
                                                                @Test
                                                                +@InSequence(2)
                                                                +public void testGet() {
                                                                +    String response = target.path("2").request().get(String.class);
                                                                +    assertEquals("kiwi", response);
                                                                +}
                                                                +
                                                                +
                                                                Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                +
                                                                +
                                                                @Test
                                                                +@InSequence(3)
                                                                +public void testDelete() {
                                                                +    target.path("kiwi").request().delete();
                                                                +
                                                                +    String list = target.request().get(String.class);
                                                                +    StringTokenizer tokens = new StringTokenizer(list, ",");
                                                                +    assertEquals(3, tokens.countTokens());
                                                                +}
                                                                +
                                                                +
                                                                Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                +
                                                                +
                                                                @Test
                                                                +@InSequence(4)
                                                                +public void testPut() {
                                                                +    target.request().put(Entity.text("apple"));
                                                                +
                                                                +    String list = target.request().get(String.class);
                                                                +    StringTokenizer tokens = new StringTokenizer(list, ",");
                                                                +    assertEquals(4, tokens.countTokens());
                                                                +}
                                                                +
                                                                +

                                                                Share the Knowledge

                                                                Find this sample useful? Share on

                                                                There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                Help Improve

                                                                Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                Recent Changelog

                                                                • Dec 11, 2014: Fixed and improved tests for jaxrs client and singleton due to tomee failures by Roberto Cortez
                                                                • Jul 15, 2014: Removed default header by Roberto Cortez
                                                                • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                                • Dec 03, 2013: Change to use client.target(uri) to be compatible with jax-rs 1.0 by Aslak Knutsen
                                                                • Dec 03, 2013: Change to use client.target(string) to avoid jax-rs 1 vs 2 conflict by Aslak Knutsen
                                                                • Nov 22, 2013: Fixing the application packaging for annotated and application case by Arun Gupta
                                                                • Nov 22, 2013: Adding an interim version of meged singleton tests - annotated and application by Arun Gupta
                                                                How to help improve this sample
                                                                The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                cd javaee7-samples/jaxrs/singleton/

                                                                Do the changes as you see fit and send a pull request!

                                                                Good Luck!

                                                                + \ No newline at end of file diff --git a/sample/jaxws-jaxws-client/index.html b/sample/jaxws-jaxws-client/index.html new file mode 100644 index 0000000..98c9107 --- /dev/null +++ b/sample/jaxws-jaxws-client/index.html @@ -0,0 +1,63 @@ +JavaEE Sample::jaxws::Jaxws client

                                                                Jaxws client

                                                                Run
                                                                How to run the sample
                                                                The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                cd javaee7-samples/jaxws/jaxws-client/
                                                                Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                mvn test
                                                                Or you can run individual tests by executing one of the following:
                                                                mvn test -Dtest=EBookStoreClientSampleTest

                                                                • Specifications in use:

                                                                  EBookStoreClientSampleTest

                                                                  Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                                                  +

                                                                  Method for creating and deploying the war file from jaxws-endpoint project, +which contains the web service to be tested.

                                                                  +
                                                                  +
                                                                  +
                                                                  @Deployment(testable = false)
                                                                  +public static WebArchive createDeployment() {
                                                                  +    return ShrinkWrap.create(MavenImporter.class)
                                                                  +            .loadPomFromFile("../jaxws-endpoint/pom.xml")
                                                                  +            .importBuildOutput()
                                                                  +            .as(WebArchive.class);
                                                                  +}
                                                                  +
                                                                  +
                                                                  Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                  +
                                                                  +
                                                                  @Test
                                                                  +public void test1WelcomeMessage() throws MalformedURLException {
                                                                  +    EBookStore eBookStore = eBookStoreService.getEBookStoreImplPort();
                                                                  +    String response=eBookStore.welcomeMessage("Jackson");
                                                                  +    assertEquals("Welcome to EBookStore WebService, Mr/Mrs Jackson", response);
                                                                  +}
                                                                  +
                                                                  +
                                                                  Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                  +
                                                                  +
                                                                  @Test
                                                                  +public void test2SaveAndTakeBook() throws MalformedURLException {
                                                                  +    EBookStore eBookStore = eBookStoreService.getPort(EBookStore.class);
                                                                  +
                                                                  +    EBook eBook=new EBook();
                                                                  +    eBook.setTitle("The Jungle Book");
                                                                  +    eBook.setNumPages(225);
                                                                  +    eBook.setPrice(17.9);
                                                                  +    eBookStore.saveBook(eBook);
                                                                  +    eBook=new EBook();
                                                                  +
                                                                  +    eBook.setTitle("Animal Farm");
                                                                  +    eBook.setNumPages(113);
                                                                  +    eBook.setPrice(22.5);
                                                                  +    List<String> notes= Arrays.asList(new String[]{"Great book","Not too bad"});
                                                                  +    eBook.getNotes().addAll(notes);
                                                                  +    eBookStore.saveBook(eBook);
                                                                  +
                                                                  +    EBook response=eBookStore.takeBook("Animal Farm");
                                                                  +    assertEquals(eBook.getNumPages(),response.getNumPages());
                                                                  +    assertEquals(eBook.getPrice(),response.getPrice(),0);
                                                                  +    assertEquals(eBook.getTitle(),response.getTitle());
                                                                  +    assertEquals(notes,response.getNotes());
                                                                  +
                                                                  +}
                                                                  +
                                                                  +

                                                                  Share the Knowledge

                                                                  Find this sample useful? Share on

                                                                  There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                  Help Improve

                                                                  Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                  Recent Changelog

                                                                  • Feb 10, 2014: Removed unnecessary files in jax-ws projects by Fermin Gallego
                                                                  • Feb 07, 2014: Added jax-ws client example by Fermin Gallego
                                                                  How to help improve this sample
                                                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                  cd javaee7-samples/jaxws/jaxws-client/

                                                                  Do the changes as you see fit and send a pull request!

                                                                  Good Luck!

                                                                  + \ No newline at end of file diff --git a/sample/jaxws-jaxws-endpoint/index.html b/sample/jaxws-jaxws-endpoint/index.html new file mode 100644 index 0000000..c054539 --- /dev/null +++ b/sample/jaxws-jaxws-endpoint/index.html @@ -0,0 +1,80 @@ +JavaEE Sample::jaxws::Jaxws endpoint

                                                                  Jaxws endpoint

                                                                  Run
                                                                  How to run the sample
                                                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                  cd javaee7-samples/jaxws/jaxws-endpoint/
                                                                  Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                  mvn test
                                                                  Or you can run individual tests by executing one of the following:
                                                                  mvn test -Dtest=EBookStoreTest

                                                                  • Specifications in use:
                                                                    • jaxws

                                                                    EBookStoreTest

                                                                    Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                                                    +

                                                                    Arquillian specific method for creating a file which can be deployed +while executing the test.

                                                                    +
                                                                    +
                                                                    +
                                                                    @Deployment(testable = false)
                                                                    +public static WebArchive createDeployment() {
                                                                    +	return ShrinkWrap.create(WebArchive.class).
                                                                    +			addPackage("org.javaee7.jaxws.endpoint");
                                                                    +}
                                                                    +
                                                                    +
                                                                    Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                    +
                                                                    +
                                                                    @Test
                                                                    +public void test1WelcomeMessage() throws MalformedURLException {
                                                                    +	EBookStore eBookStore = eBookStoreService.getPort(EBookStore.class);
                                                                    +	String response=eBookStore.welcomeMessage("Johnson");
                                                                    +	assertEquals("Welcome to EBookStore WebService, Mr/Mrs Johnson", response);
                                                                    +}
                                                                    +
                                                                    +
                                                                    Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                    +
                                                                    +
                                                                    @Test
                                                                    +public void test2SaveAndTakeBook() throws MalformedURLException {
                                                                    +	EBookStore eBookStore = eBookStoreService.getPort(EBookStore.class);
                                                                    +	EBook eBook=new EBook();
                                                                    +	eBook.setTitle("The Lord of the Rings");
                                                                    +	eBook.setNumPages(1178);
                                                                    +	eBook.setPrice(21.8);
                                                                    +	eBookStore.saveBook(eBook);
                                                                    +	eBook=new EBook();
                                                                    +
                                                                    +	eBook.setTitle("Oliver Twist");
                                                                    +	eBook.setNumPages(268);
                                                                    +	eBook.setPrice(7.45);
                                                                    +	eBookStore.saveBook(eBook);
                                                                    +	EBook response=eBookStore.takeBook("Oliver Twist");
                                                                    +
                                                                    +	assertEquals(eBook.getNumPages(),response.getNumPages());
                                                                    +}
                                                                    +
                                                                    +
                                                                    Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                    +
                                                                    +
                                                                    @Test
                                                                    +public void test3FindEbooks(){
                                                                    +	EBookStore eBookStore = eBookStoreService.getPort(EBookStore.class);
                                                                    +	List<String> titleList=eBookStore.findEBooks("Rings");
                                                                    +
                                                                    +	assertNotNull(titleList);
                                                                    +	assertEquals(1, titleList.size());
                                                                    +	assertEquals("The Lord of the Rings",titleList.get(0));
                                                                    +}
                                                                    +
                                                                    +
                                                                    Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                    +
                                                                    +
                                                                    @Test
                                                                    +public void test4AddAppendix(){
                                                                    +	EBookStore eBookStore = eBookStoreService.getPort(EBookStore.class);
                                                                    +	EBook eBook=eBookStore.takeBook("Oliver Twist");
                                                                    +
                                                                    +	assertEquals(268,eBook.getNumPages());
                                                                    +	EBook eBookResponse=eBookStore.addAppendix(eBook, 5);
                                                                    +
                                                                    +	assertEquals(268,eBook.getNumPages());
                                                                    +	assertEquals(273,eBookResponse.getNumPages());
                                                                    +}
                                                                    +
                                                                    +

                                                                    Share the Knowledge

                                                                    Find this sample useful? Share on

                                                                    There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                    Help Improve

                                                                    Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                    Recent Changelog

                                                                    • Dec 01, 2014: Added tests for jndi-context project by Roberto Cortez
                                                                    • Nov 02, 2014: Issue #253 - fix to make jaxws-endpoint compile against jdk 8 by Nico Schlebusch
                                                                    • Feb 10, 2014: Removed unnecessary files in jax-ws projects by Fermin Gallego
                                                                    • Feb 06, 2014: Jax-ws endpoint example by Fermin Gallego
                                                                    How to help improve this sample
                                                                    The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                    git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                    cd javaee7-samples/jaxws/jaxws-endpoint/

                                                                    Do the changes as you see fit and send a pull request!

                                                                    Good Luck!

                                                                    + \ No newline at end of file diff --git a/sample/jca-connector-simple-connector/index.html b/sample/jca-connector-simple-connector/index.html new file mode 100644 index 0000000..5952ea8 --- /dev/null +++ b/sample/jca-connector-simple-connector/index.html @@ -0,0 +1,15 @@ +JavaEE Sample::JCA::connector

                                                                    connector

                                                                    Run
                                                                    How to run the sample
                                                                    The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                    git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                    cd javaee7-samples/jca/connector-simple/connector/
                                                                    Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                    mvn test
                                                                    Or you can run individual tests by executing one of the following:
                                                                    mvn test -Dtest=AppTest

                                                                    AppTest

                                                                    +

                                                                    Unit test for simple App.

                                                                    +

                                                                    Share the Knowledge

                                                                    Find this sample useful? Share on

                                                                    There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                    Help Improve

                                                                    Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                    Recent Changelog

                                                                    • Jul 15, 2014: Removed default header by Roberto Cortez
                                                                    • Oct 23, 2013: Make it compiled in glassfish 4 and wildfly 8 beta1 by Jeff Zhang
                                                                    • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                                                    How to help improve this sample
                                                                    The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                    git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                    cd javaee7-samples/jca/connector-simple/connector/

                                                                    Do the changes as you see fit and send a pull request!

                                                                    Good Luck!

                                                                    + \ No newline at end of file diff --git a/sample/jms-jms-batch/index.html b/sample/jms-jms-batch/index.html new file mode 100644 index 0000000..5f27383 --- /dev/null +++ b/sample/jms-jms-batch/index.html @@ -0,0 +1,196 @@ +JavaEE Sample::JMS::Batch JMS processing

                                                                    Batch JMS processing

                                                                    Run
                                                                    How to run the sample
                                                                    The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                    git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                    cd javaee7-samples/jms/jms-batch/
                                                                    Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                    mvn test
                                                                    Or you can run individual tests by executing one of the following:
                                                                    mvn test -Dtest=JmsItemReaderTest

                                                                    ItemReader reading from durable subscription

                                                                    JmsItemReaderTest

                                                                    +

                                                                    This test demonstrates programmatical creation of durable consumer, and reading +its subscribed messages in a batch job in form of an ItemReader.

                                                                    +
                                                                    +
                                                                    +
                                                                    +
                                                                    @Named()
                                                                    +public class JmsItemReader extends AbstractItemReader {
                                                                    +
                                                                    +    public JmsItemReader();
                                                                    +    @Resource(lookup = Resources.CONNECTION_FACTORY)
                                                                    +    ConnectionFactory factory;
                                                                    +    private JMSContext jms;
                                                                    +    @Resource(lookup = Resources.TOPIC)
                                                                    +    Topic topic;
                                                                    +    private JMSConsumer subscription;
                                                                    +
                                                                    +    @Override()
                                                                    +    public void open(Serializable checkpoint) throws Exception;
                                                                    +
                                                                    +    @Override()
                                                                    +    public Object readItem() throws Exception;
                                                                    +
                                                                    +    @Override()
                                                                    +    public void close() throws Exception;
                                                                    +}
                                                                    +
                                                                    +
                                                                    +
                                                                    +

                                                                    The items are then fed into the writer, that performs the aggregation and stores +the result into a @Singleton EJB.

                                                                    +
                                                                    +
                                                                    +
                                                                    +
                                                                    @Named()
                                                                    +public class SummingItemWriter extends AbstractItemWriter {
                                                                    +
                                                                    +    public SummingItemWriter();
                                                                    +    @Inject()
                                                                    +    ResultCollector collector;
                                                                    +    private int numItems;
                                                                    +    private int sum;
                                                                    +
                                                                    +    @Override()
                                                                    +    public void open(Serializable checkpoint) throws Exception;
                                                                    +
                                                                    +    @Override()
                                                                    +    public void writeItems(List<Object> objects) throws Exception;
                                                                    +
                                                                    +    @Override()
                                                                    +    public void close() throws Exception;
                                                                    +
                                                                    +    private int computeSum(List<Object> objects);
                                                                    +}
                                                                    +
                                                                    +
                                                                    +

                                                                    Upon deployment a topic and connection factory for durable subscription are created:

                                                                    +
                                                                    +
                                                                    +
                                                                    +
                                                                    @JMSDestinationDefinition(name = Resources.TOPIC, resourceAdapter = "jmsra", interfaceName = "javax.jms.Topic", destinationName = "batch.topic", description = "Batch processing topic")
                                                                    +@JMSConnectionFactoryDefinition(name = Resources.CONNECTION_FACTORY, resourceAdapter = "jmsra", clientId = "batchJob", description = "Connection factory with clientId of the durable subscription")
                                                                    +public class Resources {
                                                                    +
                                                                    +    public Resources();
                                                                    +    public static final String SUBSCRIPTION = "BatchJob";
                                                                    +    public static final String TOPIC = "java:app/batch/topic";
                                                                    +    public static final String CONNECTION_FACTORY = "java:app/batch/factory";
                                                                    +}
                                                                    +
                                                                    +
                                                                    +
                                                                    +

                                                                    Then the subscription itself is created by means of @Singleton @Startup EJB +SubscriptionCreator.

                                                                    +
                                                                    +
                                                                    +
                                                                    +
                                                                    @PostConstruct
                                                                    +void createSubscription() {
                                                                    +    try (JMSContext jms = factory.createContext()) { (1)
                                                                    +        JMSConsumer consumer = jms.createDurableConsumer(topic, Resources.SUBSCRIPTION); (2)
                                                                    +        consumer.close();
                                                                    +    }
                                                                    +}
                                                                    +
                                                                    +
                                                                    +
                                                                    +
                                                                      +
                                                                    1. +

                                                                      This is factory with clientId specified

                                                                      +
                                                                    2. +
                                                                    3. +

                                                                      creates durable subscription on the topic

                                                                      +
                                                                    4. +
                                                                    +
                                                                    +
                                                                    +

                                                                    The job itself computes sum and count of random numbers that are send on the topic. +Note that at time of sending there is no active consumer listening on the topic.

                                                                    +
                                                                    +
                                                                    +
                                                                    @Deployment
                                                                    +public static WebArchive deployment() {
                                                                    +    return ShrinkWrap.create(WebArchive.class)
                                                                    +            .addAsWebInfResource(EmptyAsset.INSTANCE, ArchivePaths.create("beans.xml"))
                                                                    +            .addClass(BatchTestHelper.class)
                                                                    +            .addPackage(JmsItemReader.class.getPackage())
                                                                    +            .addAsResource("META-INF/batch-jobs/jms-job.xml");
                                                                    +}
                                                                    +
                                                                    +
                                                                    +

                                                                    In this test case we verify that the subscription is really created upon deployment +and thus messages are waiting for the job even before the first run of it.

                                                                    +
                                                                    +
                                                                    +

                                                                    The subscription is not deleted even after the application is undeployed, because +the physical topic and its subscription in the message broker still exist, +even after the application scoped managed objects are deleted.

                                                                    +
                                                                    +
                                                                    +

                                                                    Following method is used to generate the payload:

                                                                    +
                                                                    +
                                                                    +
                                                                    +
                                                                    private int sendMessages(int count) {
                                                                    +    int sum = 0;
                                                                    +    Random r = new Random();
                                                                    +    try (JMSContext jms = factory.createContext(Session.AUTO_ACKNOWLEDGE)) {
                                                                    +        JMSProducer producer = jms.createProducer();
                                                                    +        for (int i=0; i< count; i++) {
                                                                    +            int payload = r.nextInt();
                                                                    +            producer.send(topic, payload);
                                                                    +            sum += payload;
                                                                    +        }
                                                                    +    }
                                                                    +    return sum;
                                                                    +}
                                                                    +
                                                                    +
                                                                    +
                                                                    +

                                                                    So we send 10 random numbers, and verify that summing integers works exactly the +same way on both ends. Or that the job really picked up all the numbers submitted +for the computation.

                                                                    +
                                                                    +
                                                                    +
                                                                    @InSequence(1)
                                                                    +@Test
                                                                    +public void worksAfterDeployment() throws InterruptedException {
                                                                    +    int sum = sendMessages(10);
                                                                    +    runJob();
                                                                    +    assertEquals(10, collector.getLastItemCount());
                                                                    +    assertEquals(sum, collector.getLastSum());
                                                                    +    assertEquals(1, collector.getNumberOfJobs());
                                                                    +}
                                                                    +
                                                                    +
                                                                    +

                                                                    To verify that the durable subscription really collects messages we do few +more runs.

                                                                    +
                                                                    +
                                                                    +
                                                                    @InSequence(2)
                                                                    +@Test
                                                                    +public void worksInMultipleRuns() throws InterruptedException {
                                                                    +    int sum = sendMessages(14);
                                                                    +    runJob();
                                                                    +    assertEquals(14, collector.getLastItemCount());
                                                                    +    assertEquals(sum, collector.getLastSum());
                                                                    +    assertEquals(2, collector.getNumberOfJobs());
                                                                    +    sum = sendMessages(8); (1)
                                                                    +    sum += sendMessages(4);
                                                                    +    runJob();
                                                                    +    assertEquals(12, collector.getLastItemCount());
                                                                    +    assertEquals(sum, collector.getLastSum());
                                                                    +    assertEquals(3, collector.getNumberOfJobs());
                                                                    +}
                                                                    +
                                                                    +
                                                                    +
                                                                    +
                                                                      +
                                                                    1. +

                                                                      Sending messages from separate connections makes no difference

                                                                      +
                                                                    2. +
                                                                    +

                                                                    Share the Knowledge

                                                                    Find this sample useful? Share on

                                                                    There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                    Help Improve

                                                                    Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                    Recent Changelog

                                                                    • Oct 05, 2014: #252 fixed arquillian configuration for the jobs by John D. Ament
                                                                    • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                                    • Mar 20, 2014: Update arquillian.xml cr1 references to final by Aslak Knutsen
                                                                    • Feb 02, 2014: Fix include expression in test case by Aslak Knutsen
                                                                    • Jan 17, 2014: Jms batch sample by pdudits
                                                                    How to help improve this sample
                                                                    The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                    git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                    cd javaee7-samples/jms/jms-batch/

                                                                    Do the changes as you see fit and send a pull request!

                                                                    Good Luck!

                                                                    + \ No newline at end of file diff --git a/sample/jms-jms-xa/index.html b/sample/jms-jms-xa/index.html new file mode 100644 index 0000000..ee8c41f --- /dev/null +++ b/sample/jms-jms-xa/index.html @@ -0,0 +1,107 @@ +JavaEE Sample::JMS::Jms xa

                                                                    Jms xa

                                                                    Run
                                                                    How to run the sample
                                                                    The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                    git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                    cd javaee7-samples/jms/jms-xa/
                                                                    Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                    mvn test
                                                                    Or you can run individual tests by executing one of the following:
                                                                    mvn test -Dtest=UserManagerNonXATestmvn test -Dtest=AbstractUserManagerTestmvn test -Dtest=UserManagerXATest

                                                                    Arquillian test for JMS XA

                                                                    UserManagerNonXATest

                                                                    Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                                                    Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                                                    +
                                                                    +
                                                                    @Deployment
                                                                    +public static WebArchive createDeployment()
                                                                    +{
                                                                    +    return createWebArchive().addClass(ConnectionFactoryProducer.class);
                                                                    +}
                                                                    +
                                                                    +
                                                                    Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                    +
                                                                    +
                                                                    @Test
                                                                    +public void emailAlreadyRegisteredNonXA() throws Exception
                                                                    +{
                                                                    +    deliveryStats.reset();
                                                                    +    assertEquals(0L, deliveryStats.getDeliveredMessagesCount());
                                                                    +    try {
                                                                    +        /**
                                                                    +         * This email is already in DB so we should get exception trying to register it.
                                                                    +         */
                                                                    +        userManager.register("jack@itcrowd.pl");
                                                                    +    } catch (Exception e) {
                                                                    +        logger.info("Got expected exception " + e);
                                                                    +    }
                                                                    +    try {
                                                                    +        ReceptionSynchronizer.waitFor(JMSMailman.class, "onMessage");
                                                                    +    } catch (AssertionError error) {
                                                                    +        logger.info("Got expected error " + error);
                                                                    +        logger.info("We're just making sure that we have waited long enough to let the message get to MDB");
                                                                    +    }
                                                                    +    assertEquals("Message should be delivered despite transaction rollback", 1L, deliveryStats.getDeliveredMessagesCount());
                                                                    +}
                                                                    +
                                                                    +
                                                                    Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                    +
                                                                    +
                                                                    @Test
                                                                    +public void happyPathNonXA() throws Exception
                                                                    +{
                                                                    +    deliveryStats.reset();
                                                                    +    assertEquals(0L, deliveryStats.getDeliveredMessagesCount());
                                                                    +    userManager.register("bernard@itcrowd.pl");
                                                                    +    try {
                                                                    +        ReceptionSynchronizer.waitFor(JMSMailman.class, "onMessage");
                                                                    +    } catch (AssertionError error) {
                                                                    +        logger.info("Got expected error " + error);
                                                                    +        logger.info("We're just making sure that we have waited long enough to let the message get to MDB");
                                                                    +    }
                                                                    +    assertEquals(1L, deliveryStats.getDeliveredMessagesCount());
                                                                    +}
                                                                    +
                                                                    +

                                                                    AbstractUserManagerTest

                                                                    Missing a description for the story. Add some javadoc to the TestClass. Show me how!

                                                                    UserManagerXATest

                                                                    Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                                                    Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                                                    +
                                                                    +
                                                                    @Deployment
                                                                    +public static WebArchive createDeployment()
                                                                    +{
                                                                    +    return createWebArchive().addClass(XAConnectionFactoryProducer.class);
                                                                    +}
                                                                    +
                                                                    +
                                                                    Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                    +
                                                                    +
                                                                    @Test
                                                                    +public void emailAlreadyRegisteredXA() throws Exception
                                                                    +{
                                                                    +    deliveryStats.reset();
                                                                    +    assertEquals(0L, deliveryStats.getDeliveredMessagesCount());
                                                                    +    try {
                                                                    +        /**
                                                                    +         * This email is already in DB so we should get exception trying to register it.
                                                                    +         */
                                                                    +        userManager.register("jack@itcrowd.pl");
                                                                    +    } catch (Exception e) {
                                                                    +        logger.info("Got expected exception " + e);
                                                                    +    }
                                                                    +    try {
                                                                    +        ReceptionSynchronizer.waitFor(JMSMailman.class, "onMessage");
                                                                    +        fail("Method should not have been invoked");
                                                                    +    } catch (AssertionError error) {
                                                                    +        logger.info("Got expected error " + error);
                                                                    +        logger.info("Message should not have been delivered due to transaction rollback");
                                                                    +    }
                                                                    +    assertEquals("Message should not be delivered due to transaction rollback", 0L, deliveryStats.getDeliveredMessagesCount());
                                                                    +}
                                                                    +
                                                                    +
                                                                    Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                    +
                                                                    +
                                                                    @Test
                                                                    +public void happyPathXA() throws Exception
                                                                    +{
                                                                    +    deliveryStats.reset();
                                                                    +    assertEquals(0L, deliveryStats.getDeliveredMessagesCount());
                                                                    +    userManager.register("bernard@itcrowd.pl");
                                                                    +    ReceptionSynchronizer.waitFor(JMSMailman.class, "onMessage");
                                                                    +    assertEquals(1L, deliveryStats.getDeliveredMessagesCount());
                                                                    +}
                                                                    +
                                                                    +

                                                                    Share the Knowledge

                                                                    Find this sample useful? Share on

                                                                    There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                    Help Improve

                                                                    Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                    Recent Changelog

                                                                    • Oct 05, 2014: #252 fixed arquillian configuration for the jobs by John D. Ament
                                                                    • Sep 30, 2014: #254 added examples w/ new jms apis by John D. Ament
                                                                    • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                                    • Dec 04, 2013: #139 arquillian test for jms xa by bernard
                                                                    How to help improve this sample
                                                                    The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                    git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                    cd javaee7-samples/jms/jms-xa/

                                                                    Do the changes as you see fit and send a pull request!

                                                                    Good Luck!

                                                                    + \ No newline at end of file diff --git a/sample/jms-send-receive/index.html b/sample/jms-send-receive/index.html new file mode 100644 index 0000000..f21d860 --- /dev/null +++ b/sample/jms-send-receive/index.html @@ -0,0 +1,115 @@ +JavaEE Sample::JMS::Send receive

                                                                    Send receive

                                                                    Run
                                                                    How to run the sample
                                                                    The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                    git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                    cd javaee7-samples/jms/send-receive/
                                                                    Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                    mvn test
                                                                    Or you can run individual tests by executing one of the following:
                                                                    mvn test -Dtest=SyncTestmvn test -Dtest=AsyncTestmvn test -Dtest=ReceptionSynchronizerTest

                                                                    SyncTest

                                                                    Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                                                    Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                                                    +
                                                                    +
                                                                    @Deployment
                                                                    +public static WebArchive deploy() {
                                                                    +    return ShrinkWrap.create(WebArchive.class)
                                                                    +            .addClasses(MessageSenderSync.class,
                                                                    +                    MessageReceiverSync.class,
                                                                    +                    ClassicMessageSender.class,
                                                                    +                    ClassicMessageReceiver.class,
                                                                    +                    MessageSenderAppManaged.class,
                                                                    +                    MessageReceiverAppManaged.class,
                                                                    +                    Resources.class);
                                                                    +}
                                                                    +
                                                                    +
                                                                    Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                    +
                                                                    +
                                                                    @Test
                                                                    +public void testClassicApi() {
                                                                    +    String message = "The test message over JMS 1.1 API";
                                                                    +    classicSender.sendMessage(message);
                                                                    +
                                                                    +    assertEquals(message, classicReceiver.receiveMessage());
                                                                    +}
                                                                    +
                                                                    +
                                                                    Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                    +
                                                                    +
                                                                    @Test
                                                                    +public void testContainerManagedJmsContext() {
                                                                    +    String message = "Test message over container-managed JMSContext";
                                                                    +    simpleSender.sendMessage(message);
                                                                    +
                                                                    +    assertEquals(message, simpleReceiver.receiveMessage());
                                                                    +}
                                                                    +
                                                                    +
                                                                    Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                    +
                                                                    +
                                                                    @Test
                                                                    +public void testAppManagedJmsContext() {
                                                                    +    String message = "The test message over app-managed JMSContext";
                                                                    +    appManagedSender.sendMessage(message);
                                                                    +
                                                                    +    assertEquals(message, appManagedReceiver.receiveMessage());
                                                                    +}
                                                                    +
                                                                    +
                                                                    Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                    +
                                                                    +
                                                                    @Test
                                                                    +public void testMultipleSendAndReceive() {
                                                                    +    simpleSender.sendMessage("1");
                                                                    +    simpleSender.sendMessage("2");
                                                                    +    assertEquals("1", simpleReceiver.receiveMessage());
                                                                    +    assertEquals("2", simpleReceiver.receiveMessage());
                                                                    +    simpleSender.sendMessage("3");
                                                                    +    simpleSender.sendMessage("4");
                                                                    +    simpleSender.sendMessage("5");
                                                                    +    assertEquals("3", simpleReceiver.receiveMessage());
                                                                    +    assertEquals("4", simpleReceiver.receiveMessage());
                                                                    +    assertEquals("5", simpleReceiver.receiveMessage());
                                                                    +}
                                                                    +
                                                                    +

                                                                    AsyncTest

                                                                    Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                                                    Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                                                    +
                                                                    +
                                                                    @Deployment
                                                                    +public static WebArchive deploy() {
                                                                    +    return ShrinkWrap.create(WebArchive.class)
                                                                    +            .addClass(MessageSenderAsync.class)
                                                                    +            .addClass(Resources.class)
                                                                    +            .addClass(MessageReceiverAsync.class)
                                                                    +            .addClass(ReceptionSynchronizer.class)
                                                                    +            .addAsWebInfResource(new File("src/test/resources/WEB-INF/ejb-jar.xml"));
                                                                    +}
                                                                    +
                                                                    +
                                                                    Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                    +
                                                                    +
                                                                    @Test
                                                                    +public void testAsync() throws Exception {
                                                                    +    asyncSender.sendMessage("Fire!");
                                                                    +    ReceptionSynchronizer.waitFor(MessageReceiverAsync.class, "onMessage");
                                                                    +    // unless we timed out, the test passes
                                                                    +}
                                                                    +
                                                                    +

                                                                    ReceptionSynchronizerTest

                                                                    Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                                                    Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                    +
                                                                    +
                                                                    @Test
                                                                    +public void testWaiting() throws NoSuchMethodException, InterruptedException {
                                                                    +    final ReceptionSynchronizer cut = new ReceptionSynchronizer();
                                                                    +    ScheduledExecutorService pool = Executors.newScheduledThreadPool(1);
                                                                    +    final Method method = ReceptionSynchronizerTest.class.getDeclaredMethod("testWaiting");
                                                                    +    long startTime = System.currentTimeMillis();
                                                                    +    pool.schedule(new Runnable() {
                                                                    +
                                                                    +        @Override
                                                                    +        public void run() {
                                                                    +            cut.registerInvocation(method);
                                                                    +        }
                                                                    +    }, 1, TimeUnit.SECONDS);
                                                                    +    ReceptionSynchronizer.waitFor(ReceptionSynchronizerTest.class, "testWaiting");
                                                                    +    long waitTime = System.currentTimeMillis()-startTime;
                                                                    +    assertTrue("Waited more than 950ms", waitTime > 950);
                                                                    +    assertTrue("Waited no longer than 1050ms", waitTime < 1050);
                                                                    +}
                                                                    +
                                                                    +

                                                                    Share the Knowledge

                                                                    Find this sample useful? Share on

                                                                    There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                    Help Improve

                                                                    Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                    Recent Changelog

                                                                    • Oct 05, 2014: #252 fixed arquillian configuration for the jobs by John D. Ament
                                                                    • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                                    • Mar 20, 2014: Update arquillian.xml cr1 references to final by Aslak Knutsen
                                                                    • Jan 11, 2014: Transaction-aware receptionsynchronizer by pdudits
                                                                    • Jan 11, 2014: Make jms tests pass in managed wildfly by pdudits
                                                                    • Dec 05, 2013: Adding a new test to send/receive multiple messages by arun-gupta
                                                                    • Dec 05, 2013: Adding a convenient method to receive all messages (not used any where for now) by arun-gupta
                                                                    • Nov 21, 2013: Refactoring some code to be more intuitive - all 5 tests work on wildfly beta2 snapshot and glassfish 4 by Arun Gupta
                                                                    • Nov 15, 2013: Removed copyright by Patrik Dudits
                                                                    • Nov 14, 2013: Documented jms samples by Patrik Dudits
                                                                    How to help improve this sample
                                                                    The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                    git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                    cd javaee7-samples/jms/send-receive/

                                                                    Do the changes as you see fit and send a pull request!

                                                                    Good Luck!

                                                                    + \ No newline at end of file diff --git a/sample/jms-temp-destination/index.html b/sample/jms-temp-destination/index.html new file mode 100644 index 0000000..1487906 --- /dev/null +++ b/sample/jms-temp-destination/index.html @@ -0,0 +1,134 @@ +JavaEE Sample::JMS::Temporary destinations

                                                                    Temporary destinations

                                                                    Run
                                                                    How to run the sample
                                                                    The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                    git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                    cd javaee7-samples/jms/temp-destination/
                                                                    Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                    mvn test
                                                                    Or you can run individual tests by executing one of the following:
                                                                    mvn test -Dtest=TempQueueTest

                                                                    Request/Response over JMS

                                                                    TempQueueTest

                                                                    +

                                                                    Temporary queues are JMS queues that exist for the lifetime of single JMS connection. +Also the reception of the messages is exclusive to the connection, therefore no +reasonable use case exist for temporary topic within Java EE container, as connection +is exclusive to single component.

                                                                    +
                                                                    +
                                                                    +

                                                                    Temporary queues are usually used as reply channels for request / response communication +over JMS.

                                                                    +
                                                                    +

                                                                    In this test we created a server component RequestResponseOverJMS, that +listens on a Queue and passes the response to the destination specified in +JMSReplyTo header of the message.

                                                                    +
                                                                    +
                                                                    +
                                                                    +
                                                                    @Override
                                                                    +public void onMessage(Message message) {
                                                                    +    try {
                                                                    +        Destination replyTo = message.getJMSReplyTo(); (1)
                                                                    +        if (replyTo == null) {
                                                                    +            return;
                                                                    +        }
                                                                    +        TextMessage request = (TextMessage) message;
                                                                    +        String payload = request.getText();            (2)
                                                                    +
                                                                    +        System.out.println("Got request: "+payload);
                                                                    +
                                                                    +        String response = "Processed: "+payload;       (3)
                                                                    +        jms.createProducer().send(replyTo, response);  (4)
                                                                    +    } catch (JMSException e) {
                                                                    +        e.printStackTrace();
                                                                    +    }
                                                                    +}
                                                                    +
                                                                    +
                                                                    +
                                                                    +
                                                                      +
                                                                    1. +

                                                                      get the destination for the response

                                                                      +
                                                                    2. +
                                                                    3. +

                                                                      read the payload

                                                                      +
                                                                    4. +
                                                                    5. +

                                                                      process the request

                                                                      +
                                                                    6. +
                                                                    7. +

                                                                      send the response

                                                                      +
                                                                    8. +
                                                                    +
                                                                    +
                                                                    +

                                                                    JmsClient is a client to this server, and has to be non transactional, +otherwise the request would be first sent upon commit, i. e. after the +business method finishes. That would be too late. We need to send the message +immediately, and wait for the response to arrive.

                                                                    +
                                                                    +
                                                                    +
                                                                    +
                                                                    @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)        (1)
                                                                    +public String process(String request) {
                                                                    +
                                                                    +    TextMessage requestMessage = jms.createTextMessage(request);
                                                                    +    TemporaryQueue responseQueue = jms.createTemporaryQueue();
                                                                    +    jms.createProducer()
                                                                    +            .setJMSReplyTo(responseQueue)                            (2)
                                                                    +            .send(requestQueue, requestMessage);                     (3)
                                                                    +
                                                                    +    try (JMSConsumer consumer = jms.createConsumer(responseQueue)) { (4)
                                                                    +
                                                                    +        String response = consumer.receiveBody(String.class, 2000);  (5)
                                                                    +
                                                                    +        if (response == null) {                                      (6)
                                                                    +            throw new IllegalStateException("Message processing timed out");
                                                                    +        } else {
                                                                    +            return response;
                                                                    +        }
                                                                    +    }
                                                                    +}
                                                                    +
                                                                    +
                                                                    +
                                                                    +
                                                                      +
                                                                    1. +

                                                                      we need to send message in the middle of the method, therefore we cannot be transactional

                                                                      +
                                                                    2. +
                                                                    3. +

                                                                      set the temporary queue as replyToDestination

                                                                      +
                                                                    4. +
                                                                    5. +

                                                                      immediately send the request message

                                                                      +
                                                                    6. +
                                                                    7. +

                                                                      listen on the temporary queue

                                                                      +
                                                                    8. +
                                                                    9. +

                                                                      wait for a TextMessage to arrive

                                                                      +
                                                                    10. +
                                                                    11. +

                                                                      receiveBody returns null in case of timeout

                                                                      +
                                                                    12. +
                                                                    +
                                                                    +
                                                                    +
                                                                    @Deployment
                                                                    +public static WebArchive deployment() {
                                                                    +    return ShrinkWrap.create(WebArchive.class)
                                                                    +            .addClasses(RequestResponseOverJMS.class, JmsClient.class, Resources.class);
                                                                    +}
                                                                    +
                                                                    +
                                                                    +

                                                                    We invoke the client, and verify that the response is processed

                                                                    +
                                                                    +
                                                                    +
                                                                    @Test
                                                                    +public void testRequestResposne() {
                                                                    +    String response = client.process("Hello");
                                                                    +    Assert.assertEquals("Processed: Hello", response);
                                                                    +}
                                                                    +
                                                                    +

                                                                    Share the Knowledge

                                                                    Find this sample useful? Share on

                                                                    There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                    Help Improve

                                                                    Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                    Recent Changelog

                                                                    • Oct 05, 2014: #252 fixed arquillian configuration for the jobs by John D. Ament
                                                                    • Mar 20, 2014: Update arquillian.xml cr1 references to final by Aslak Knutsen
                                                                    • Jan 12, 2014: Fix tempqueuetest for glassfish by pdudits
                                                                    • Jan 12, 2014: Improving documentation for tempqueuetest by pdudits
                                                                    • Jan 11, 2014: Issue #80: test for temporary queue by pdudits
                                                                    • Sep 12, 2013: Using cdi 1.1 "all" style beans.xml by Arun Gupta
                                                                    • Aug 29, 2013: Adding a message that this sample is not working right now by Arun Gupta
                                                                    • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                                                    How to help improve this sample
                                                                    The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                    git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                    cd javaee7-samples/jms/temp-destination/

                                                                    Do the changes as you see fit and send a pull request!

                                                                    Good Luck!

                                                                    + \ No newline at end of file diff --git a/sample/jpa-criteria/index.html b/sample/jpa-criteria/index.html new file mode 100644 index 0000000..5199162 --- /dev/null +++ b/sample/jpa-criteria/index.html @@ -0,0 +1,200 @@ +JavaEE Sample::JPA::JPA Criteria API

                                                                    JPA Criteria API

                                                                    Run
                                                                    How to run the sample
                                                                    The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                    git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                    cd javaee7-samples/jpa/criteria/
                                                                    Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                    mvn test
                                                                    Or you can run individual tests by executing one of the following:
                                                                    mvn test -Dtest=JpaCriteriaTest

                                                                    Using the Criteria API to create queries

                                                                    JpaCriteriaTest

                                                                    +

                                                                    In this sample we’re going to query a simple JPA Entity, using the JPA Criteria API and perform a select, +update and delete operations.

                                                                    +
                                                                    +
                                                                    +

                                                                    The following JPA Entity, represents a Movie which has a name and a comma separated list of actors:

                                                                    +
                                                                    +
                                                                    +
                                                                    +
                                                                    @Entity()
                                                                    +@Table(name = "MOVIE_CRITERIA")
                                                                    +@XmlRootElement()
                                                                    +@NamedQueries({@NamedQuery(name = "Movie.findAll", query = "SELECT m FROM Movie m"), @NamedQuery(name = "Movie.findById", query = "SELECT m FROM Movie m WHERE m.id = :id"), @NamedQuery(name = "Movie.findByName", query = "SELECT m FROM Movie m WHERE m.name = :name"), @NamedQuery(name = "Movie.findByActors", query = "SELECT m FROM Movie m WHERE m.actors = :actors")})
                                                                    +public class Movie implements Serializable {
                                                                    +    private static final long serialVersionUID = 1L;
                                                                    +    @Id()
                                                                    +    @NotNull()
                                                                    +    private Integer id;
                                                                    +    @NotNull()
                                                                    +    @Size(min = 1, max = 50)
                                                                    +    private String name;
                                                                    +    @NotNull()
                                                                    +    @Size(min = 1, max = 200)
                                                                    +    private String actors;
                                                                    +
                                                                    +    public Movie();
                                                                    +
                                                                    +    public Movie(Integer id);
                                                                    +
                                                                    +    public Movie(Integer id, String name, String actors);
                                                                    +
                                                                    +    public Integer getId();
                                                                    +
                                                                    +    public void setId(Integer id);
                                                                    +
                                                                    +    public String getName();
                                                                    +
                                                                    +    public void setName(String name);
                                                                    +
                                                                    +    public String getActors();
                                                                    +
                                                                    +    public void setActors(String actors);
                                                                    +
                                                                    +    @Override()
                                                                    +    public boolean equals(Object o);
                                                                    +
                                                                    +    @Override()
                                                                    +    public int hashCode();
                                                                    +
                                                                    +    @Override()
                                                                    +    public String toString();
                                                                    +}
                                                                    +
                                                                    +
                                                                    +
                                                                    +

                                                                    The select, update and delete operations are exposed using a simple stateless ejb.

                                                                    +
                                                                    +
                                                                    +

                                                                    Select every movie:

                                                                    +
                                                                    +
                                                                    +
                                                                    +
                                                                    public List<Movie> listMovies() {
                                                                    +    CriteriaBuilder builder = em.getCriteriaBuilder();
                                                                    +    CriteriaQuery<Movie> listCriteria = builder.createQuery(Movie.class);
                                                                    +    Root<Movie> listRoot = listCriteria.from(Movie.class);
                                                                    +    listCriteria.select(listRoot);
                                                                    +    TypedQuery<Movie> query = em.createQuery(listCriteria);
                                                                    +    return query.getResultList();
                                                                    +}
                                                                    +
                                                                    +
                                                                    +
                                                                    +

                                                                    Update all the name of the movies to "INCEPTION" where the name of the movie is "Inception":

                                                                    +
                                                                    +
                                                                    +
                                                                    +
                                                                    public void updateMovie() {
                                                                    +    CriteriaBuilder builder = em.getCriteriaBuilder();
                                                                    +    CriteriaUpdate<Movie> updateCriteria = builder.createCriteriaUpdate(Movie.class);
                                                                    +    Root<Movie> updateRoot = updateCriteria.from(Movie.class);
                                                                    +    updateCriteria.where(builder.equal(updateRoot.get(Movie_.name), "Inception"));
                                                                    +    updateCriteria.set(updateRoot.get(Movie_.name), "INCEPTION");
                                                                    +    Query q = em.createQuery(updateCriteria);
                                                                    +    q.executeUpdate();
                                                                    +    em.flush();
                                                                    +}
                                                                    +
                                                                    +
                                                                    +
                                                                    +

                                                                    Delete all movies where the name of the movie is "Matrix":

                                                                    +
                                                                    +
                                                                    +
                                                                    +
                                                                    public void deleteMovie() {
                                                                    +    CriteriaBuilder builder = em.getCriteriaBuilder();
                                                                    +    CriteriaDelete<Movie> deleteCriteria = builder.createCriteriaDelete(Movie.class);
                                                                    +    Root<Movie> updateRoot = deleteCriteria.from(Movie.class);
                                                                    +    deleteCriteria.where(builder.equal(updateRoot.get(Movie_.name), "The Matrix"));
                                                                    +    Query q = em.createQuery(deleteCriteria);
                                                                    +    q.executeUpdate();
                                                                    +    em.flush();
                                                                    +}
                                                                    +
                                                                    +
                                                                    +

                                                                    We’re just going to deploy the application as a web archive. Note the inclusion of the following files:

                                                                    +
                                                                    +
                                                                    +
                                                                    +
                                                                    /META-INF/persistence.xml
                                                                    +/META-INF/create.sql
                                                                    +/META-INF/drop.sql
                                                                    +/META-INF/load.sql
                                                                    +
                                                                    +
                                                                    +
                                                                    +

                                                                    The persistence.xml file is needed of course for the persistence unit definition. A datasource is not +needed, since we can now use the new default datasource available in JEE7. We’re also using the new +javax.persistence.schema-generation.* propertires to create, populate and drop the database.

                                                                    +
                                                                    +
                                                                    +
                                                                    @Deployment
                                                                    +public static WebArchive createDeployment() {
                                                                    +    WebArchive war = ShrinkWrap.create(WebArchive.class)
                                                                    +                               .addPackage("org.javaee7.jpa.criteria")
                                                                    +                               .addAsResource("META-INF/persistence.xml")
                                                                    +                               .addAsResource("META-INF/create.sql")
                                                                    +                               .addAsResource("META-INF/drop.sql")
                                                                    +                               .addAsResource("META-INF/load.sql");
                                                                    +    System.out.println(war.toString(true));
                                                                    +    return war;
                                                                    +}
                                                                    +
                                                                    +
                                                                    +

                                                                    In the test, we’re just going to invoke the different operations in sequence keeping in mind that each +invocation might be dependent of the previous invoked operation.

                                                                    +
                                                                    +
                                                                    +
                                                                    @Test
                                                                    +public void testCriteria() {
                                                                    +    List<Movie> movies = movieBean.listMovies();        (1)
                                                                    +    assertEquals(4, movies.size());                     (2)
                                                                    +    assertTrue(movies.contains(new Movie(1)));
                                                                    +    assertTrue(movies.contains(new Movie(2)));
                                                                    +    assertTrue(movies.contains(new Movie(3)));
                                                                    +    assertTrue(movies.contains(new Movie(4)));
                                                                    +
                                                                    +    movieBean.updateMovie();                            (3)
                                                                    +    movies = movieBean.listMovies();
                                                                    +    assertEquals(4, movies.size());                     (4)
                                                                    +    assertEquals("INCEPTION", movies.get(2).getName()); (5)
                                                                    +
                                                                    +    movieBean.deleteMovie();                            (6)
                                                                    +    movies = movieBean.listMovies();
                                                                    +    assertFalse(movies.isEmpty());
                                                                    +    assertEquals(3, movies.size());                     (7)
                                                                    +    assertFalse(movies.contains(new Movie(1)));         (8)
                                                                    +}
                                                                    +
                                                                    +
                                                                    +
                                                                    +
                                                                      +
                                                                    1. +

                                                                      Get a list of all the movies in the database.

                                                                      +
                                                                    2. +
                                                                    3. +

                                                                      4 movies loaded on the db, so the size shoud be 4.

                                                                      +
                                                                    4. +
                                                                    5. +

                                                                      Update name to "INCEPTION" where name is "Inception"

                                                                      +
                                                                    6. +
                                                                    7. +

                                                                      Size of movies should still be 4.

                                                                      +
                                                                    8. +
                                                                    9. +

                                                                      Verify the movie name change.

                                                                      +
                                                                    10. +
                                                                    11. +

                                                                      Now delete the movie "Matrix"

                                                                      +
                                                                    12. +
                                                                    13. +

                                                                      Size of movies should be 3 now.

                                                                      +
                                                                    14. +
                                                                    15. +

                                                                      Check if the movie "Matrix" is not on the list.

                                                                      +
                                                                    16. +
                                                                    +

                                                                    Share the Knowledge

                                                                    Find this sample useful? Share on

                                                                    There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                    Help Improve

                                                                    Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                    Recent Changelog

                                                                    • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                                    • Jan 13, 2014: Added javadoc for jpa criteria project by Roberto Cortez
                                                                    • Jan 11, 2014: Added test for jpa criteria project by Roberto Cortez
                                                                    • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                                                    • Aug 29, 2013: Better output messages by Arun Gupta
                                                                    • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                                                    How to help improve this sample
                                                                    The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                    git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                    cd javaee7-samples/jpa/criteria/

                                                                    Do the changes as you see fit and send a pull request!

                                                                    Good Luck!

                                                                    + \ No newline at end of file diff --git a/sample/jpa-datasourcedefinition-annotation-pu/index.html b/sample/jpa-datasourcedefinition-annotation-pu/index.html new file mode 100644 index 0000000..c61b12c --- /dev/null +++ b/sample/jpa-datasourcedefinition-annotation-pu/index.html @@ -0,0 +1,46 @@ +JavaEE Sample::JPA::Datasourcedefinition annotation pu

                                                                    Datasourcedefinition annotation pu

                                                                    Run
                                                                    How to run the sample
                                                                    The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                    git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                    cd javaee7-samples/jpa/datasourcedefinition-annotation-pu/
                                                                    Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                    mvn test
                                                                    Or you can run individual tests by executing one of the following:
                                                                    mvn test -Dtest=DataSourceDefinitionAnnotationPuTest

                                                                    DataSourceDefinitionAnnotationPuTest

                                                                    +

                                                                    This tests that a data source defined via an annotation in {@link DataSourceDefinitionConfig} can be used by JPA. +<p> +The actual JPA code being run is not specifically relevant; any kind of JPA operation that +uses the data source is okay here.

                                                                    +
                                                                    Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                                                    +
                                                                    +
                                                                    @Deployment
                                                                    +public static Archive<?> deploy() {
                                                                    +    return ShrinkWrap.create(WebArchive.class)
                                                                    +            .addPackages(true, DataSourceDefinitionAnnotationPuTest.class.getPackage())
                                                                    +            .addAsResource("META-INF/persistence.xml")
                                                                    +            .addAsLibraries(Maven.resolver()
                                                                    +                .loadPomFromFile("pom.xml")
                                                                    +                .resolve("com.h2database:h2")
                                                                    +                .withoutTransitivity()
                                                                    +                .asSingleFile())
                                                                    +            ;
                                                                    +}
                                                                    +
                                                                    +
                                                                    Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                    +
                                                                    +
                                                                    @Test
                                                                    +public void insertAndQueryEntity() throws Exception {
                                                                    +
                                                                    +    testService.saveNewEntity();
                                                                    +
                                                                    +    List<TestEntity> testEntities = testService.getAllEntities();
                                                                    +
                                                                    +    assertTrue(testEntities.size() == 1);
                                                                    +    assertTrue(testEntities.get(0).getValue().equals("mytest"));
                                                                    +}
                                                                    +
                                                                    +

                                                                    Share the Knowledge

                                                                    Find this sample useful? Share on

                                                                    There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                    Help Improve

                                                                    Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                    Recent Changelog

                                                                    • Jan 28, 2014: Somewhat nasty hack/workaround to get ds work with jpa on wildfly 8 by arjan tijms
                                                                    • Jan 08, 2014: Added tests for using an @datasourcedefinition data source with jpa by arjan tijms
                                                                    How to help improve this sample
                                                                    The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                    git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                    cd javaee7-samples/jpa/datasourcedefinition-annotation-pu/

                                                                    Do the changes as you see fit and send a pull request!

                                                                    Good Luck!

                                                                    + \ No newline at end of file diff --git a/sample/jpa-datasourcedefinition-applicationxml-pu/index.html b/sample/jpa-datasourcedefinition-applicationxml-pu/index.html new file mode 100644 index 0000000..5541275 --- /dev/null +++ b/sample/jpa-datasourcedefinition-applicationxml-pu/index.html @@ -0,0 +1,126 @@ +JavaEE Sample::JPA::Datasourcedefinition applicationxml pu

                                                                    Datasourcedefinition applicationxml pu

                                                                    Run
                                                                    How to run the sample
                                                                    The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                    git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                    cd javaee7-samples/jpa/datasourcedefinition-applicationxml-pu/
                                                                    Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                    mvn test
                                                                    Or you can run individual tests by executing one of the following:
                                                                    mvn test -Dtest=DataSourceDefinitionApplicationXMLPuWebTestmvn test -Dtest=DataSourceDefinitionApplicationXMLPuEJBTest

                                                                    DataSourceDefinitionApplicationXMLPuWebTest

                                                                    +

                                                                    This tests that a data source defined via the data-source element in an EAR’s application.xml can be used by JPA. +<p> +In this test the persistence unit is defined inside a web module (.war)

                                                                    +
                                                                    +
                                                                    +

                                                                    <p> +The actual JPA code being run is not specifically relevant; any kind of JPA operation that +uses the data source is okay here.

                                                                    +
                                                                    Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                                                    +
                                                                    +
                                                                    @Deployment
                                                                    +public static Archive<?> deploy() {
                                                                    +    return
                                                                    +        // EAR archive
                                                                    +        create(EnterpriseArchive.class, "test.ear")
                                                                    +
                                                                    +            // Data-source is defined here
                                                                    +            .setApplicationXML("application-web.xml")
                                                                    +
                                                                    +            // JDBC driver for data source
                                                                    +            .addAsLibraries(Maven.resolver()
                                                                    +                .loadPomFromFile("pom.xml")
                                                                    +                .resolve("com.h2database:h2")
                                                                    +                .withoutTransitivity()
                                                                    +                .asSingleFile())
                                                                    +
                                                                    +            // WAR module
                                                                    +            .addAsModule(
                                                                    +                create(WebArchive.class, "test.war")
                                                                    +
                                                                    +                    // Persistence unit is defined here, references data source
                                                                    +                    .addAsResource("META-INF/persistence.xml")
                                                                    +
                                                                    +                    // Service class that uses persistence unit
                                                                    +                    .addPackages(true, DataSourceDefinitionApplicationXMLPuWebTest.class.getPackage())
                                                                    +        );
                                                                    +}
                                                                    +
                                                                    +
                                                                    Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                    +
                                                                    +
                                                                    @Test
                                                                    +public void insertAndQueryEntity() throws Exception {
                                                                    +
                                                                    +    testService.saveNewEntity();
                                                                    +
                                                                    +    List<TestEntity> testEntities = testService.getAllEntities();
                                                                    +
                                                                    +    assertTrue(testEntities.size() == 1);
                                                                    +    assertTrue(testEntities.get(0).getValue().equals("mytest"));
                                                                    +}
                                                                    +
                                                                    +

                                                                    DataSourceDefinitionApplicationXMLPuEJBTest

                                                                    +

                                                                    This tests that a data source defined via the data-source element in an EAR’s application.xml can be used by JPA. +<p> +In this test the persistence unit is defined inside an EJB module (.jar)

                                                                    +
                                                                    +
                                                                    +

                                                                    <p> +The actual JPA code being run is not specifically relevant; any kind of JPA operation that +uses the data source is okay here.

                                                                    +
                                                                    Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                                                    +
                                                                    +
                                                                    @Deployment
                                                                    +public static Archive<?> deploy() {
                                                                    +    return
                                                                    +        // EAR archive
                                                                    +        create(EnterpriseArchive.class, "test.ear")
                                                                    +
                                                                    +            // Data-source is defined here
                                                                    +            .setApplicationXML("application-ejb.xml")
                                                                    +
                                                                    +            // JDBC driver for data source
                                                                    +            .addAsLibraries(Maven.resolver()
                                                                    +                .loadPomFromFile("pom.xml")
                                                                    +                .resolve("com.h2database:h2")
                                                                    +                .withoutTransitivity()
                                                                    +                .asSingleFile())
                                                                    +
                                                                    +            // EJB module
                                                                    +            .addAsModule(
                                                                    +                create(JavaArchive.class, "test.jar")
                                                                    +
                                                                    +                    // Persistence unit is defined here, references data source
                                                                    +                    .addAsResource("META-INF/persistence.xml")
                                                                    +
                                                                    +                    // Service class that uses persistence unit
                                                                    +                    .addClasses(TestEntity.class, TestService.class)
                                                                    +            )
                                                                    +
                                                                    +            // Web module
                                                                    +            // This is needed to prevent Arquillian generating an illegal application.xml
                                                                    +            .addAsModule(
                                                                    +                create(WebArchive.class, "test.war")
                                                                    +                    // This class containing the test
                                                                    +                    .addClass(DataSourceDefinitionApplicationXMLPuEJBTest.class)
                                                                    +
                                                                    +            );
                                                                    +}
                                                                    +
                                                                    +
                                                                    Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                    +
                                                                    +
                                                                    @Test
                                                                    +public void insertAndQueryEntity() throws Exception {
                                                                    +
                                                                    +    testService.saveNewEntity();
                                                                    +
                                                                    +    List<TestEntity> testEntities = testService.getAllEntities();
                                                                    +
                                                                    +    assertTrue(testEntities.size() == 1);
                                                                    +    assertTrue(testEntities.get(0).getValue().equals("mytest"));
                                                                    +}
                                                                    +
                                                                    +

                                                                    Share the Knowledge

                                                                    Find this sample useful? Share on

                                                                    There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                    Help Improve

                                                                    Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                    Recent Changelog

                                                                    • Jun 10, 2014: Workaround for arquillian creating an illegal application.xml by arjantijms
                                                                    • Jun 10, 2014: Test that data-source can be defined in application.xml and used in by arjan tijms
                                                                    How to help improve this sample
                                                                    The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                    git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                    cd javaee7-samples/jpa/datasourcedefinition-applicationxml-pu/

                                                                    Do the changes as you see fit and send a pull request!

                                                                    Good Luck!

                                                                    + \ No newline at end of file diff --git a/sample/jpa-datasourcedefinition-webxml-pu/index.html b/sample/jpa-datasourcedefinition-webxml-pu/index.html new file mode 100644 index 0000000..cb4887f --- /dev/null +++ b/sample/jpa-datasourcedefinition-webxml-pu/index.html @@ -0,0 +1,47 @@ +JavaEE Sample::JPA::Datasourcedefinition webxml pu

                                                                    Datasourcedefinition webxml pu

                                                                    Run
                                                                    How to run the sample
                                                                    The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                    git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                    cd javaee7-samples/jpa/datasourcedefinition-webxml-pu/
                                                                    Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                    mvn test
                                                                    Or you can run individual tests by executing one of the following:
                                                                    mvn test -Dtest=DataSourceDefinitionWebxmlPuTest

                                                                    DataSourceDefinitionWebxmlPuTest

                                                                    +

                                                                    This tests that a data source defined in web.xml can be used by JPA. +<p> +The actual JPA code being run is not specifically relevant; any kind of JPA operation that +uses the data source is okay here.

                                                                    +
                                                                    Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                                                    +
                                                                    +
                                                                    @Deployment
                                                                    +public static Archive<?> deploy() {
                                                                    +    return ShrinkWrap.create(WebArchive.class)
                                                                    +            .addPackages(true, DataSourceDefinitionWebxmlPuTest.class.getPackage())
                                                                    +            .addAsResource("META-INF/persistence.xml")
                                                                    +            .addAsWebInfResource(resource("web.xml"))
                                                                    +            .addAsLibraries(Maven.resolver()
                                                                    +                .loadPomFromFile("pom.xml")
                                                                    +                .resolve("com.h2database:h2")
                                                                    +                .withoutTransitivity()
                                                                    +                .asSingleFile())
                                                                    +            ;
                                                                    +}
                                                                    +
                                                                    +
                                                                    Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                    +
                                                                    +
                                                                    @Test
                                                                    +public void insertAndQueryEntity() throws Exception {
                                                                    +
                                                                    +    testService.saveNewEntity();
                                                                    +
                                                                    +    List<TestEntity> testEntities = testService.getAllEntities();
                                                                    +
                                                                    +    assertTrue(testEntities.size() == 1);
                                                                    +    assertTrue(testEntities.get(0).getValue().equals("mytest"));
                                                                    +}
                                                                    +
                                                                    +

                                                                    Share the Knowledge

                                                                    Find this sample useful? Share on

                                                                    There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                    Help Improve

                                                                    Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                    Recent Changelog

                                                                    • Jan 28, 2014: Somewhat nasty hack/workaround to get ds work with jpa on wildfly 8 by arjan tijms
                                                                    • Jan 08, 2014: Added tests for using an @datasourcedefinition data source with jpa by arjan tijms
                                                                    How to help improve this sample
                                                                    The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                    git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                    cd javaee7-samples/jpa/datasourcedefinition-webxml-pu/

                                                                    Do the changes as you see fit and send a pull request!

                                                                    Good Luck!

                                                                    + \ No newline at end of file diff --git a/sample/jpa-datasourcedefinition/index.html b/sample/jpa-datasourcedefinition/index.html new file mode 100644 index 0000000..2d8d357 --- /dev/null +++ b/sample/jpa-datasourcedefinition/index.html @@ -0,0 +1,34 @@ +JavaEE Sample::JPA::Datasourcedefinition

                                                                    Datasourcedefinition

                                                                    Run
                                                                    How to run the sample
                                                                    The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                    git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                    cd javaee7-samples/jpa/datasourcedefinition/
                                                                    Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                    mvn test
                                                                    Or you can run individual tests by executing one of the following:
                                                                    mvn test -Dtest=DataSourceDefinitionTest

                                                                    • Specifications in use:
                                                                      • EJB

                                                                      DataSourceDefinitionTest

                                                                      Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                                                      Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                                                      +
                                                                      +
                                                                      @Deployment
                                                                      +public static Archive<?> deploy() {
                                                                      +    File h2Library = Maven.resolver().loadPomFromFile("pom.xml")
                                                                      +            .resolve("com.h2database:h2").withoutTransitivity()
                                                                      +            .asSingleFile();
                                                                      +
                                                                      +    return ShrinkWrap.create(WebArchive.class)
                                                                      +            .addClasses(DataSourceDefinitionHolder.class)
                                                                      +            .addAsLibraries(h2Library);
                                                                      +}
                                                                      +
                                                                      +
                                                                      Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                      +
                                                                      +
                                                                      @Test
                                                                      +public void should_bean_be_injected() throws Exception {
                                                                      +    assertThat(dataSource, is(notNullValue()));
                                                                      +    assertThat(dataSource.getConnection(), is(notNullValue()));
                                                                      +}
                                                                      +
                                                                      +

                                                                      Share the Knowledge

                                                                      Find this sample useful? Share on

                                                                      There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                      Help Improve

                                                                      Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                      Recent Changelog

                                                                      • Oct 05, 2014: #252 fixed arquillian configuration for the jobs by John D. Ament
                                                                      • Mar 20, 2014: Update arquillian.xml cr1 references to final by Aslak Knutsen
                                                                      • Dec 24, 2013: Updated to wildfly 8.0.0.cr1 by Roberto Cortez
                                                                      • Dec 12, 2013: Issue #148 : creating a new datasourcedefinition example, with an arquillian test by Alexis Hassler
                                                                      How to help improve this sample
                                                                      The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                      git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                      cd javaee7-samples/jpa/datasourcedefinition/

                                                                      Do the changes as you see fit and send a pull request!

                                                                      Good Luck!

                                                                      + \ No newline at end of file diff --git a/sample/jpa-default-datasource/index.html b/sample/jpa-default-datasource/index.html new file mode 100644 index 0000000..4377bd5 --- /dev/null +++ b/sample/jpa-default-datasource/index.html @@ -0,0 +1,42 @@ +JavaEE Sample::JPA::Default datasource

                                                                      Default datasource

                                                                      Run
                                                                      How to run the sample
                                                                      The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                      git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                      cd javaee7-samples/jpa/default-datasource/
                                                                      Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                      mvn test
                                                                      Or you can run individual tests by executing one of the following:
                                                                      mvn test -Dtest=EmployeeBeanTest

                                                                      EmployeeBeanTest

                                                                      Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                                                      Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                                                      +
                                                                      +
                                                                      @Deployment
                                                                      +public static WebArchive createDeployment() {
                                                                      +    return ShrinkWrap.create(WebArchive.class)
                                                                      +            .addClasses(Employee.class,
                                                                      +                    EmployeeBean.class)
                                                                      +            .addAsResource("META-INF/persistence.xml")
                                                                      +            .addAsResource("META-INF/load.sql");
                                                                      +}
                                                                      +
                                                                      +
                                                                      Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                      +
                                                                      +
                                                                      @Test
                                                                      +public void testGet() throws Exception {
                                                                      +    assertNotNull(bean);
                                                                      +    List<Employee> list = bean.get();
                                                                      +    assertNotNull(list);
                                                                      +    assertEquals(8, list.size());
                                                                      +    assertFalse(list.contains(new Employee("Penny")));
                                                                      +    assertFalse(list.contains(new Employee("Sheldon")));
                                                                      +    assertFalse(list.contains(new Employee("Amy")));
                                                                      +    assertFalse(list.contains(new Employee("Leonard")));
                                                                      +    assertFalse(list.contains(new Employee("Bernadette")));
                                                                      +    assertFalse(list.contains(new Employee("Raj")));
                                                                      +    assertFalse(list.contains(new Employee("Howard")));
                                                                      +    assertFalse(list.contains(new Employee("Priya")));
                                                                      +}
                                                                      +
                                                                      +

                                                                      Share the Knowledge

                                                                      Find this sample useful? Share on

                                                                      There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                      Help Improve

                                                                      Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                      Recent Changelog

                                                                      • Jul 10, 2014: Adding a new test for default datasource by arun-gupta
                                                                      How to help improve this sample
                                                                      The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                      git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                      cd javaee7-samples/jpa/default-datasource/

                                                                      Do the changes as you see fit and send a pull request!

                                                                      Good Luck!

                                                                      + \ No newline at end of file diff --git a/sample/jpa-dynamic-named-query/index.html b/sample/jpa-dynamic-named-query/index.html new file mode 100644 index 0000000..2ebc48c --- /dev/null +++ b/sample/jpa-dynamic-named-query/index.html @@ -0,0 +1,46 @@ +JavaEE Sample::JPA::Dynamic named query

                                                                      Dynamic named query

                                                                      Run
                                                                      How to run the sample
                                                                      The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                      git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                      cd javaee7-samples/jpa/dynamic-named-query/
                                                                      Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                      mvn test
                                                                      Or you can run individual tests by executing one of the following:
                                                                      mvn test -Dtest=DynamicNamedQueryTest

                                                                      DynamicNamedQueryTest

                                                                      +

                                                                      This tests that queries which have been dynamically (programmatically) added as named queries +can be executed correctly.

                                                                      +
                                                                      Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                                                      +
                                                                      +
                                                                      @Deployment
                                                                      +public static WebArchive createDeployment() {
                                                                      +    return ShrinkWrap.create(WebArchive.class).addPackages(true, "org.javaee7.jpa.dynamicnamedquery")
                                                                      +            .addAsResource("META-INF/persistence.xml");
                                                                      +}
                                                                      +
                                                                      +
                                                                      Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                      +
                                                                      +
                                                                      @Test
                                                                      +public void testDynamicNamedCriteriaQueries() throws IOException, SAXException {
                                                                      +
                                                                      +    // Nothing inserted yet, data base should not contain any entities
                                                                      +    // (this tests that a simple query without parameters works as named query created by Criteria)
                                                                      +    assertTrue(testService.getAll().size() == 0);
                                                                      +
                                                                      +    // Insert one entity
                                                                      +    TestEntity testEntity = new TestEntity();
                                                                      +    testEntity.setValue("myValue");
                                                                      +    testService.save(testEntity);
                                                                      +
                                                                      +    // The total amount of entities should be 1
                                                                      +    assertTrue(testService.getAll().size() == 1);
                                                                      +
                                                                      +    // The entity with "myValue" should be found
                                                                      +    // (this tests that a query with a parameter works as named query created by Criteria)
                                                                      +    assertTrue(testService.getByValue("myValue").size() == 1);
                                                                      +}
                                                                      +
                                                                      +

                                                                      Share the Knowledge

                                                                      Find this sample useful? Share on

                                                                      There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                      Help Improve

                                                                      Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                      Recent Changelog

                                                                      • Dec 22, 2013: Standalone servlet and index.jsp no longer needed for new tests. forgot by arjan tijms
                                                                      • Dec 22, 2013: Added jpa test for the new 2.1 feature of dynamically adding named by arjan tijms
                                                                      How to help improve this sample
                                                                      The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                      git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                      cd javaee7-samples/jpa/dynamic-named-query/

                                                                      Do the changes as you see fit and send a pull request!

                                                                      Good Luck!

                                                                      + \ No newline at end of file diff --git a/sample/jpa-entitygraph/index.html b/sample/jpa-entitygraph/index.html new file mode 100644 index 0000000..c7ce5e6 --- /dev/null +++ b/sample/jpa-entitygraph/index.html @@ -0,0 +1,198 @@ +JavaEE Sample::JPA::Entitygraph

                                                                      Entitygraph

                                                                      Run
                                                                      How to run the sample
                                                                      The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                      git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                      cd javaee7-samples/jpa/entitygraph/
                                                                      Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                      mvn test
                                                                      Or you can run individual tests by executing one of the following:
                                                                      mvn test -Dtest=EntityGraphTest

                                                                      EntityGraphTest

                                                                      +

                                                                      In this sample we’re going to query a JPA Entity and control property loading by providing Hints using the new +JPA Entity Graph API. +<p/> +Entity Graphs are used in the specification of fetch plans for query or find operations.

                                                                      +
                                                                      Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                                                      +
                                                                      +
                                                                      @Deployment
                                                                      +public static WebArchive createDeployment() {
                                                                      +    WebArchive war = ShrinkWrap.create(WebArchive.class)
                                                                      +                               .addPackage("org.javaee7.jpa.entitygraph")
                                                                      +                               .addAsResource("META-INF/persistence.xml")
                                                                      +                               .addAsResource("META-INF/create.sql")
                                                                      +                               .addAsResource("META-INF/drop.sql")
                                                                      +                               .addAsResource("META-INF/load.sql");
                                                                      +    System.out.println(war.toString(true));
                                                                      +    return war;
                                                                      +}
                                                                      +
                                                                      +
                                                                      Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                      +
                                                                      +
                                                                      @Test
                                                                      +public void testEntityGraphMovieDefault() throws Exception {
                                                                      +    PersistenceUnitUtil persistenceUnitUtil = entityManager.getEntityManagerFactory().getPersistenceUnitUtil();
                                                                      +    List<Movie> listMoviesDefaultFetch = movieBean.listMovies();
                                                                      +    for (Movie movie : listMoviesDefaultFetch) {
                                                                      +        assertFalse(persistenceUnitUtil.isLoaded(movie, "movieActors"));
                                                                      +        assertTrue(persistenceUnitUtil.isLoaded(movie, "movieDirectors"));
                                                                      +        assertFalse(persistenceUnitUtil.isLoaded(movie, "movieAwards"));
                                                                      +    }
                                                                      +}
                                                                      +
                                                                      +
                                                                      Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                      +
                                                                      +
                                                                      @Test
                                                                      +public void testEntityGraphMovieWithActors() throws Exception {
                                                                      +    PersistenceUnitUtil persistenceUnitUtil = entityManager.getEntityManagerFactory().getPersistenceUnitUtil();
                                                                      +    List<Movie> listMoviesWithActorsFetch = movieBean.listMovies("javax.persistence.fetchgraph", "movieWithActors");
                                                                      +    for (Movie movie : listMoviesWithActorsFetch) {
                                                                      +        assertTrue(persistenceUnitUtil.isLoaded(movie, "movieActors"));
                                                                      +        assertFalse(movie.getMovieActors().isEmpty());
                                                                      +        for (MovieActor movieActor : movie.getMovieActors()) {
                                                                      +            assertFalse(persistenceUnitUtil.isLoaded(movieActor, "movieActorAwards"));
                                                                      +        }
                                                                      +
                                                                      +        // https://hibernate.atlassian.net/browse/HHH-8776
                                                                      +        // The specification states that by using fetchgraph, attributes should stay unloaded even if defined as
                                                                      +        // EAGER (movieDirectors), but specification also states that the persistence provider is allowed to fetch
                                                                      +        // additional state.
                                                                      +        assertTrue(persistenceUnitUtil.isLoaded(movie, "movieDirectors") ||
                                                                      +                   !persistenceUnitUtil.isLoaded(movie, "movieDirectors"));
                                                                      +        assertFalse(persistenceUnitUtil.isLoaded(movie, "movieAwards"));
                                                                      +    }
                                                                      +
                                                                      +    List<Movie> listMoviesWithActorsLoad = movieBean.listMovies("javax.persistence.loadgraph", "movieWithActors");
                                                                      +    for (Movie movie : listMoviesWithActorsLoad) {
                                                                      +        // https://java.net/jira/browse/GLASSFISH-21200
                                                                      +        // Glassfish is not processing "javax.persistence.loadgraph".
                                                                      +        assertTrue(persistenceUnitUtil.isLoaded(movie, "movieActors"));
                                                                      +        assertFalse(movie.getMovieActors().isEmpty());
                                                                      +        for (MovieActor movieActor : movie.getMovieActors()) {
                                                                      +            assertFalse(persistenceUnitUtil.isLoaded(movieActor, "movieActorAwards"));
                                                                      +        }
                                                                      +
                                                                      +        assertTrue(persistenceUnitUtil.isLoaded(movie, "movieDirectors"));
                                                                      +        assertFalse(persistenceUnitUtil.isLoaded(movie, "movieAwards"));
                                                                      +    }
                                                                      +}
                                                                      +
                                                                      +
                                                                      Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                      +
                                                                      +
                                                                      @Test
                                                                      +public void testEntityGraphMovieWithActorsAndAwards() throws Exception {
                                                                      +    PersistenceUnitUtil persistenceUnitUtil = entityManager.getEntityManagerFactory().getPersistenceUnitUtil();
                                                                      +    List<Movie> listMoviesWithActorsFetch =
                                                                      +            movieBean.listMovies("javax.persistence.fetchgraph", "movieWithActorsAndAwards");
                                                                      +    for (Movie movie : listMoviesWithActorsFetch) {
                                                                      +        assertTrue(persistenceUnitUtil.isLoaded(movie, "movieActors"));
                                                                      +        assertFalse(movie.getMovieActors().isEmpty());
                                                                      +        for (MovieActor movieActor : movie.getMovieActors()) {
                                                                      +            assertTrue(persistenceUnitUtil.isLoaded(movieActor, "movieActorAwards") ||
                                                                      +                       !persistenceUnitUtil.isLoaded(movieActor, "movieActorAwards"));
                                                                      +        }
                                                                      +
                                                                      +        // https://hibernate.atlassian.net/browse/HHH-8776
                                                                      +        // The specification states that by using fetchgraph, attributes should stay unloaded even if defined as
                                                                      +        // EAGER (movieDirectors), but specification also states that the persistence provider is allowed to fetch
                                                                      +        // additional state.
                                                                      +        assertTrue(persistenceUnitUtil.isLoaded(movie, "movieDirectors") ||
                                                                      +                   !persistenceUnitUtil.isLoaded(movie, "movieDirectors"));
                                                                      +        assertFalse(persistenceUnitUtil.isLoaded(movie, "movieAwards"));
                                                                      +    }
                                                                      +
                                                                      +    List<Movie> listMoviesWithActorsLoad =
                                                                      +            movieBean.listMovies("javax.persistence.loadgraph", "movieWithActorsAndAwards");
                                                                      +    for (Movie movie : listMoviesWithActorsLoad) {
                                                                      +        // https://java.net/jira/browse/GLASSFISH-21200
                                                                      +        // Glassfish is not processing "javax.persistence.loadgraph".
                                                                      +        assertTrue(persistenceUnitUtil.isLoaded(movie, "movieActors"));
                                                                      +        assertFalse(movie.getMovieActors().isEmpty());
                                                                      +        for (MovieActor movieActor : movie.getMovieActors()) {
                                                                      +            assertTrue(persistenceUnitUtil.isLoaded(movieActor, "movieActorAwards"));
                                                                      +        }
                                                                      +
                                                                      +        assertTrue(persistenceUnitUtil.isLoaded(movie, "movieDirectors"));
                                                                      +        assertFalse(persistenceUnitUtil.isLoaded(movie, "movieAwards"));
                                                                      +    }
                                                                      +}
                                                                      +
                                                                      +
                                                                      Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                      +
                                                                      +
                                                                      @Test
                                                                      +public void testEntityGraphProgrammatically() throws Exception {
                                                                      +    PersistenceUnitUtil persistenceUnitUtil = entityManager.getEntityManagerFactory().getPersistenceUnitUtil();
                                                                      +
                                                                      +    EntityGraph<Movie> fetchAll = entityManager.createEntityGraph(Movie.class);
                                                                      +    fetchAll.addSubgraph(Movie_.movieActors);
                                                                      +    fetchAll.addSubgraph(Movie_.movieDirectors);
                                                                      +    fetchAll.addSubgraph(Movie_.movieAwards);
                                                                      +
                                                                      +    List<Movie> moviesFetchAll = movieBean.listMovies("javax.persistence.fetchgraph", fetchAll);
                                                                      +    for (Movie movie : moviesFetchAll) {
                                                                      +        assertTrue(persistenceUnitUtil.isLoaded(movie, "movieActors"));
                                                                      +        assertTrue(persistenceUnitUtil.isLoaded(movie, "movieDirectors"));
                                                                      +        assertTrue(persistenceUnitUtil.isLoaded(movie, "movieAwards"));
                                                                      +    }
                                                                      +}
                                                                      +
                                                                      +
                                                                      Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                      +
                                                                      +
                                                                      @Test
                                                                      +public void testEntityGraphWithNamedParameters() throws Exception {
                                                                      +    PersistenceUnitUtil persistenceUnitUtil = entityManager.getEntityManagerFactory().getPersistenceUnitUtil();
                                                                      +    List<Movie> listMovieById = movieBean.listMoviesById(1, "javax.persistence.fetchgraph", "movieWithActors");
                                                                      +    assertFalse(listMovieById.isEmpty());
                                                                      +    assertEquals(1, listMovieById.size());
                                                                      +    for (Movie movie : listMovieById) {
                                                                      +        assertTrue(movie.getId().equals(1));
                                                                      +
                                                                      +        assertTrue(persistenceUnitUtil.isLoaded(movie, "movieActors"));
                                                                      +        assertFalse(movie.getMovieActors().isEmpty());
                                                                      +        for (MovieActor movieActor : movie.getMovieActors()) {
                                                                      +            assertFalse(persistenceUnitUtil.isLoaded(movieActor, "movieActorAwards"));
                                                                      +        }
                                                                      +
                                                                      +        // https://hibernate.atlassian.net/browse/HHH-8776
                                                                      +        // The specification states that by using fetchgraph, attributes should stay unloaded even if defined as
                                                                      +        // EAGER (movieDirectors), but specification also states that the persistence provider is allowed to fetch
                                                                      +        // additional state.
                                                                      +        assertTrue(persistenceUnitUtil.isLoaded(movie, "movieDirectors") ||
                                                                      +                   !persistenceUnitUtil.isLoaded(movie, "movieDirectors"));
                                                                      +        assertFalse(persistenceUnitUtil.isLoaded(movie, "movieAwards"));
                                                                      +    }
                                                                      +}
                                                                      +
                                                                      +
                                                                      Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                      +
                                                                      +
                                                                      @Test
                                                                      +public void testEntityGraphWithNamedParametersList() throws Exception {
                                                                      +    PersistenceUnitUtil persistenceUnitUtil = entityManager.getEntityManagerFactory().getPersistenceUnitUtil();
                                                                      +    // Hibernate fails mixing Entity Graphs and Named Parameters with "IN". Throws NPE
                                                                      +    List<Movie> listMoviesByIds =
                                                                      +            movieBean.listMoviesByIds(Arrays.asList(1, 2), "javax.persistence.fetchgraph", "movieWithActors");
                                                                      +
                                                                      +    assertFalse(listMoviesByIds.isEmpty());
                                                                      +    assertEquals(2, listMoviesByIds.size());
                                                                      +    for (Movie movie : listMoviesByIds) {
                                                                      +        assertTrue(movie.getId().equals(1) || movie.getId().equals(2));
                                                                      +
                                                                      +        assertTrue(persistenceUnitUtil.isLoaded(movie, "movieActors"));
                                                                      +        assertFalse(movie.getMovieActors().isEmpty());
                                                                      +        for (MovieActor movieActor : movie.getMovieActors()) {
                                                                      +            assertFalse(persistenceUnitUtil.isLoaded(movieActor, "movieActorAwards"));
                                                                      +        }
                                                                      +
                                                                      +        // https://hibernate.atlassian.net/browse/HHH-8776
                                                                      +        // The specification states that by using fetchgraph, attributes should stay unloaded even if defined as
                                                                      +        // EAGER (movieDirectors), but specification also states that the persistence provider is allowed to fetch
                                                                      +        // additional state.
                                                                      +        assertTrue(persistenceUnitUtil.isLoaded(movie, "movieDirectors") ||
                                                                      +                   !persistenceUnitUtil.isLoaded(movie, "movieDirectors"));
                                                                      +        assertFalse(persistenceUnitUtil.isLoaded(movie, "movieAwards"));
                                                                      +    }
                                                                      +}
                                                                      +
                                                                      +

                                                                      Share the Knowledge

                                                                      Find this sample useful? Share on

                                                                      There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                      Help Improve

                                                                      Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                      Recent Changelog

                                                                      • Dec 08, 2014: Added tests for entitygraph project by Roberto Cortez
                                                                      • Nov 18, 2014: Added programmatic example by Roberto Cortez
                                                                      • Nov 12, 2014: Added sample for entity graph by Roberto Cortez
                                                                      • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                                      • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                                                      • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                                                      How to help improve this sample
                                                                      The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                      git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                      cd javaee7-samples/jpa/entitygraph/

                                                                      Do the changes as you see fit and send a pull request!

                                                                      Good Luck!

                                                                      + \ No newline at end of file diff --git a/sample/jpa-extended-pc/index.html b/sample/jpa-extended-pc/index.html new file mode 100644 index 0000000..755cecb --- /dev/null +++ b/sample/jpa-extended-pc/index.html @@ -0,0 +1,13 @@ +JavaEE Sample::JPA::Extended pc

                                                                      Extended pc

                                                                      Run
                                                                      How to run the sample
                                                                      The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                      git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                      cd javaee7-samples/jpa/extended-pc/
                                                                      Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                      mvn test
                                                                      Or you can run individual tests by executing one of the following:

                                                                      Missing a story. Add a test case.Show me how!

                                                                      Share the Knowledge

                                                                      Find this sample useful? Share on

                                                                      There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                      Help Improve

                                                                      Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                      Recent Changelog

                                                                      • Feb 03, 2014: Removing licence information by kubamarchwicki
                                                                      • Feb 02, 2014: Simplification. no need for @sesssionscope bean. inject @stateful to arq test by kubamarchwicki
                                                                      • Feb 02, 2014: Jpa extended persistence context test by kubamarchwicki
                                                                      • Nov 09, 2013: Adding extended persistence context sample, need further investigation by Arun Gupta
                                                                      How to help improve this sample
                                                                      The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                      git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                      cd javaee7-samples/jpa/extended-pc/

                                                                      Do the changes as you see fit and send a pull request!

                                                                      Good Luck!

                                                                      + \ No newline at end of file diff --git a/sample/jpa-jndi-context/index.html b/sample/jpa-jndi-context/index.html new file mode 100644 index 0000000..0630fad --- /dev/null +++ b/sample/jpa-jndi-context/index.html @@ -0,0 +1,47 @@ +JavaEE Sample::JPA::Jndi context

                                                                      Jndi context

                                                                      Run
                                                                      How to run the sample
                                                                      The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                      git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                      cd javaee7-samples/jpa/jndi-context/
                                                                      Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                      mvn test
                                                                      Or you can run individual tests by executing one of the following:
                                                                      mvn test -Dtest=EntityManagerJndiContextTest

                                                                      EntityManagerJndiContextTest

                                                                      Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                                                      Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                                                      +
                                                                      +
                                                                      @Deployment
                                                                      +public static WebArchive createDeployment() {
                                                                      +    WebArchive war = ShrinkWrap.create(WebArchive.class)
                                                                      +                               .addPackage("org.javaee7.jpa.jndi.context")
                                                                      +                               .addAsResource("META-INF/persistence.xml")
                                                                      +                               .addAsResource("META-INF/load.sql");
                                                                      +    System.out.println(war.toString(true));
                                                                      +    return war;
                                                                      +}
                                                                      +
                                                                      +
                                                                      Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                      +
                                                                      +
                                                                      @Test
                                                                      +public void testEntityManagerLookup() throws Exception {
                                                                      +    InitialContext context = new InitialContext();
                                                                      +    EntityManager entityManager = (EntityManager) context.lookup("java:comp/env/persistence/myJNDI");
                                                                      +    assertNotNull(entityManager);
                                                                      +
                                                                      +    List<Employee> employees = entityManager.createNamedQuery("Employee.findAll", Employee.class).getResultList();
                                                                      +    assertFalse(employees.isEmpty());
                                                                      +    assertEquals(8, employees.size());
                                                                      +}
                                                                      +
                                                                      +
                                                                      Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                      +
                                                                      +
                                                                      @Test
                                                                      +public void testEntityManagerLookupBean() throws Exception {
                                                                      +    List<Employee> employees = employeeBean.get();
                                                                      +    assertFalse(employees.isEmpty());
                                                                      +    assertEquals(8, employees.size());
                                                                      +}
                                                                      +
                                                                      +

                                                                      Share the Knowledge

                                                                      Find this sample useful? Share on

                                                                      There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                      Help Improve

                                                                      Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                      Recent Changelog

                                                                      • Dec 01, 2014: Added tests for jndi-context project by Roberto Cortez
                                                                      • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                                      • Oct 30, 2013: Using the typical employee class and other *.sql scripts to generate/load database tables. entitymanager is still not getting resolved correctly and needs further debugging by Arun Gupta
                                                                      • Oct 30, 2013: Removing redundant imports by Arun Gupta
                                                                      • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                                                      How to help improve this sample
                                                                      The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                      git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                      cd javaee7-samples/jpa/jndi-context/

                                                                      Do the changes as you see fit and send a pull request!

                                                                      Good Luck!

                                                                      + \ No newline at end of file diff --git a/sample/jpa-jpa-converter/index.html b/sample/jpa-jpa-converter/index.html new file mode 100644 index 0000000..5ba92ef --- /dev/null +++ b/sample/jpa-jpa-converter/index.html @@ -0,0 +1,46 @@ +JavaEE Sample::JPA::Jpa converter

                                                                      Jpa converter

                                                                      Run
                                                                      How to run the sample
                                                                      The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                      git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                      cd javaee7-samples/jpa/jpa-converter/
                                                                      Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                      mvn test
                                                                      Or you can run individual tests by executing one of the following:
                                                                      mvn test -Dtest=EmployeeRepositoryTest

                                                                      EmployeeRepositoryTest

                                                                      Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                                                      Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                                                      +
                                                                      +
                                                                      @Deployment
                                                                      +public static Archive<?> createDeployment() {
                                                                      +    final File[] assertJ = Maven.resolver().loadPomFromFile("pom.xml")
                                                                      +                                           .resolve("org.assertj:assertj-core")
                                                                      +                                           .withTransitivity()
                                                                      +                                           .asFile();
                                                                      +
                                                                      +    final JavaArchive archive = ShrinkWrap.create(JavaArchive.class, "employee-card-converter-sample.jar")
                                                                      +                                          .addPackage(Employee.class.getPackage())
                                                                      +                                          .addAsManifestResource("test-persistence.xml", "persistence.xml")
                                                                      +                                          .merge(metaInfFolder(), "/META-INF", Filters.include(".*\\.sql"));
                                                                      +    mergeDependencies(archive, assertJ);
                                                                      +
                                                                      +    return archive;
                                                                      +
                                                                      +}
                                                                      +
                                                                      +
                                                                      Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                      +
                                                                      +
                                                                      @Test
                                                                      +public void should_return_all_employee_records() throws Exception {
                                                                      +    // when
                                                                      +    final List<Employee> employees = repository.all();
                                                                      +
                                                                      +    // then
                                                                      +    assertThat(employees).hasSize(6)
                                                                      +                         .contains(employee("Leonard", "11-22-33-44"), employee("Sheldon", "22-33-44-55"),
                                                                      +                                   employee("Penny", "33-44-55-66"), employee("Raj", "44-55-66-77"),
                                                                      +                                   employee("Howard", "55-66-77-88"), employee("Bernadette", "66-77-88-99"));
                                                                      +}
                                                                      +
                                                                      +

                                                                      Share the Knowledge

                                                                      Find this sample useful? Share on

                                                                      There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                      Help Improve

                                                                      Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                      Recent Changelog

                                                                      • Oct 05, 2014: #252 fixed arquillian configuration for the jobs by John D. Ament
                                                                      • Jul 15, 2014: Removed default header by Roberto Cortez
                                                                      • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                                      • May 03, 2014: Introduced arquillian-based example for jpa 2.1 custom converter feature by Bartosz Majsak
                                                                      • Nov 09, 2013: Sample is now working by Arun Gupta
                                                                      • Nov 09, 2013: Temporal attributes cannot be used with @convert and so changing to creditcard based upon antonio's slide deck by Arun Gupta
                                                                      • Nov 09, 2013: Starting a new sample for @converter and @convert by Arun Gupta
                                                                      How to help improve this sample
                                                                      The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                      git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                      cd javaee7-samples/jpa/jpa-converter/

                                                                      Do the changes as you see fit and send a pull request!

                                                                      Good Luck!

                                                                      + \ No newline at end of file diff --git a/sample/jpa-listeners-injection/index.html b/sample/jpa-listeners-injection/index.html new file mode 100644 index 0000000..9e8465e --- /dev/null +++ b/sample/jpa-listeners-injection/index.html @@ -0,0 +1,13 @@ +JavaEE Sample::JPA::JPA Listeners Injection

                                                                      JPA Listeners Injection

                                                                      Run
                                                                      How to run the sample
                                                                      The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                      git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                      cd javaee7-samples/jpa/listeners-injection/
                                                                      Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                      mvn test
                                                                      Or you can run individual tests by executing one of the following:

                                                                      JPA 2.1 Entity Listeners injection

                                                                      Missing a story. Add a test case.Show me how!

                                                                      Share the Knowledge

                                                                      Find this sample useful? Share on

                                                                      There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                      Help Improve

                                                                      Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                      Recent Changelog

                                                                      • Feb 03, 2014: Removing licence information by kubamarchwicki
                                                                      • Feb 01, 2014: Jpa listener injection test by kubamarchwicki
                                                                      How to help improve this sample
                                                                      The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                      git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                      cd javaee7-samples/jpa/listeners-injection/

                                                                      Do the changes as you see fit and send a pull request!

                                                                      Good Luck!

                                                                      + \ No newline at end of file diff --git a/sample/jpa-listeners/index.html b/sample/jpa-listeners/index.html new file mode 100644 index 0000000..c055c7c --- /dev/null +++ b/sample/jpa-listeners/index.html @@ -0,0 +1,205 @@ +JavaEE Sample::JPA::JPA Listeners

                                                                      JPA Listeners

                                                                      Run
                                                                      How to run the sample
                                                                      The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                      git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                      cd javaee7-samples/jpa/listeners/
                                                                      Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                      mvn test
                                                                      Or you can run individual tests by executing one of the following:
                                                                      mvn test -Dtest=JpaListenersTest

                                                                      Invocation examples of all the available Entity Listeners

                                                                      JpaListenersTest

                                                                      +

                                                                      In this sample we’re going to query a simple JPA Entity, using the JPA EntityManager and perform a findAll, +persist, merge, and remove operations. By calling these operations we want to demonstrate the behaviour of Entity +Listener Methods: @PostLoad, @PrePersist, @PostPersist, @PreUpdate, @PostUpdate, @PreRemove, +@PostRemove defined on MovieListener:

                                                                      +
                                                                      +
                                                                      +
                                                                      +
                                                                      public class MovieListener {
                                                                      +
                                                                      +    public MovieListener();
                                                                      +    public static CountDownLatch entityListenersCountDownLatch;
                                                                      +    public static boolean postLoadInvoked;
                                                                      +    public static boolean prePersistInvoked;
                                                                      +    public static boolean postPersistInvoked;
                                                                      +    public static boolean preUpdateInvoked;
                                                                      +    public static boolean postUpdateInvoked;
                                                                      +    public static boolean preRemoveInvoked;
                                                                      +    public static boolean postRemoveInvoked;
                                                                      +
                                                                      +    @PostLoad()
                                                                      +    public void newMovieLoad(Movie movie);
                                                                      +
                                                                      +    @PrePersist()
                                                                      +    public void newMovieAlertBefore(Movie movie);
                                                                      +
                                                                      +    @PostPersist()
                                                                      +    public void newMovieAlertAfter(Movie movie);
                                                                      +
                                                                      +    @PreUpdate()
                                                                      +    public void updateMovieAlertBefore(Movie movie);
                                                                      +
                                                                      +    @PostUpdate()
                                                                      +    public void updateMovieAlertAfter(Movie movie);
                                                                      +
                                                                      +    @PreRemove()
                                                                      +    public void deleteMovieAlertBefore(Movie movie);
                                                                      +
                                                                      +    @PostRemove()
                                                                      +    public void deleteMovieAlertAfter(Movie movie);
                                                                      +}
                                                                      +
                                                                      +
                                                                      +
                                                                      +

                                                                      The following JPA Entity, represents a Movie which has a name and a comma separated list of actors:

                                                                      +
                                                                      +
                                                                      +
                                                                      +
                                                                      @Entity()
                                                                      +@Table(name = "MOVIE_LISTENER")
                                                                      +@XmlRootElement()
                                                                      +@NamedQueries({@NamedQuery(name = "Movie.findAll", query = "SELECT m FROM Movie m"), @NamedQuery(name = "Movie.findById", query = "SELECT m FROM Movie m WHERE m.id = :id"), @NamedQuery(name = "Movie.findByName", query = "SELECT m FROM Movie m WHERE m.name = :name"), @NamedQuery(name = "Movie.findByActors", query = "SELECT m FROM Movie m WHERE m.actors = :actors")})
                                                                      +@EntityListeners(MovieListener.class)
                                                                      +public class Movie implements Serializable {
                                                                      +    private static final long serialVersionUID = 1L;
                                                                      +    @Id()
                                                                      +    @NotNull()
                                                                      +    private Integer id;
                                                                      +    @NotNull()
                                                                      +    @Size(min = 1, max = 50)
                                                                      +    private String name;
                                                                      +    @NotNull()
                                                                      +    @Size(min = 1, max = 200)
                                                                      +    private String actors;
                                                                      +
                                                                      +    public Movie();
                                                                      +
                                                                      +    public Movie(Integer id);
                                                                      +
                                                                      +    public Movie(Integer id, String name, String actors);
                                                                      +
                                                                      +    public Integer getId();
                                                                      +
                                                                      +    public void setId(Integer id);
                                                                      +
                                                                      +    public String getName();
                                                                      +
                                                                      +    public void setName(String name);
                                                                      +
                                                                      +    public String getActors();
                                                                      +
                                                                      +    public void setActors(String actors);
                                                                      +
                                                                      +    @Override()
                                                                      +    public boolean equals(Object o);
                                                                      +
                                                                      +    @Override()
                                                                      +    public int hashCode();
                                                                      +
                                                                      +    @Override()
                                                                      +    public String toString();
                                                                      +}
                                                                      +
                                                                      +
                                                                      +

                                                                      We’re just going to deploy the application as a web archive. Note the inclusion of the following files:

                                                                      +
                                                                      +
                                                                      +
                                                                      +
                                                                      /META-INF/persistence.xml
                                                                      +/META-INF/create.sql
                                                                      +/META-INF/drop.sql
                                                                      +/META-INF/load.sql
                                                                      +
                                                                      +
                                                                      +
                                                                      +

                                                                      The persistence.xml file is needed of course for the persistence unit definition. A datasource is not +needed, since we can now use the new default datasource available in JEE7. We’re also using the new +javax.persistence.schema-generation.* propertires to create, populate and drop the database.

                                                                      +
                                                                      +
                                                                      +
                                                                      @Deployment
                                                                      +public static WebArchive createDeployment() {
                                                                      +    WebArchive war = ShrinkWrap.create(WebArchive.class)
                                                                      +                               .addPackage("org.javaee7.jpa.listeners")
                                                                      +                               .addAsResource("META-INF/persistence.xml")
                                                                      +                               .addAsResource("META-INF/create.sql")
                                                                      +                               .addAsResource("META-INF/drop.sql")
                                                                      +                               .addAsResource("META-INF/load.sql");
                                                                      +    System.out.println(war.toString(true));
                                                                      +    return war;
                                                                      +}
                                                                      +
                                                                      +
                                                                      +

                                                                      In the test, we’re just going to invoke the different operations in sequence keeping in mind that each +invocation might be dependent of the previous invoked operation.

                                                                      +
                                                                      +
                                                                      +
                                                                      @Test
                                                                      +public void testListeners() throws Exception {
                                                                      +    List<Movie> movies = movieBean.listMovies();    (1)
                                                                      +    assertEquals(4, movies.size());
                                                                      +
                                                                      +    assertFalse(prePersistInvoked);
                                                                      +    assertFalse(postPersistInvoked);
                                                                      +    movieBean.createMovie();                        (2)
                                                                      +    assertTrue(prePersistInvoked);
                                                                      +    assertTrue(postPersistInvoked);
                                                                      +
                                                                      +    movies = movieBean.listMovies();                (3)
                                                                      +    assertEquals(5, movies.size());
                                                                      +    assertTrue(movies.contains(new Movie(5)));
                                                                      +
                                                                      +
                                                                      +    assertFalse(preUpdateInvoked);
                                                                      +    assertFalse(postUpdateInvoked);
                                                                      +    movieBean.updateMovie();                        (4)
                                                                      +    assertTrue(preUpdateInvoked);
                                                                      +    assertTrue(postUpdateInvoked);
                                                                      +
                                                                      +    movies = movieBean.listMovies();                (5)
                                                                      +    assertEquals(5, movies.size());
                                                                      +    assertEquals("Inception2", movies.get(2).getName());
                                                                      +
                                                                      +    assertFalse(preRemoveInvoked);
                                                                      +    assertFalse(postRemoveInvoked);
                                                                      +    movieBean.deleteMovie();                        (6)
                                                                      +    assertTrue(preRemoveInvoked);
                                                                      +    assertTrue(postRemoveInvoked);
                                                                      +
                                                                      +    movies = movieBean.listMovies();                (7)
                                                                      +    assertFalse(movies.isEmpty());
                                                                      +    assertEquals(4, movies.size());
                                                                      +    assertFalse(movies.contains(new Movie(3)));
                                                                      +
                                                                      +    assertTrue(MovieListener.entityListenersCountDownLatch.await(0, TimeUnit.SECONDS));
                                                                      +}
                                                                      +
                                                                      +
                                                                      +
                                                                      +
                                                                        +
                                                                      1. +

                                                                        4 movies in the database, so @PostLoad method called 4x

                                                                        +
                                                                      2. +
                                                                      3. +

                                                                        On persist both @PrePersist and @PostPersist are called

                                                                        +
                                                                      4. +
                                                                      5. +

                                                                        5 movies now, so @PostLoad method called 5x

                                                                        +
                                                                      6. +
                                                                      7. +

                                                                        On merge both @PreUpdate and @PostUpdate are called

                                                                        +
                                                                      8. +
                                                                      9. +

                                                                        Still 5 mpvies, so @PostLoad method called again 5x

                                                                        +
                                                                      10. +
                                                                      11. +

                                                                        On remove both @PreRemove and @PostRemove are called

                                                                        +
                                                                      12. +
                                                                      13. +

                                                                        4 movies now, so @PostLoad method called 4x

                                                                        +
                                                                      14. +
                                                                      +

                                                                      Share the Knowledge

                                                                      Find this sample useful? Share on

                                                                      There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                      Help Improve

                                                                      Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                      Recent Changelog

                                                                      • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                                      • Jan 21, 2014: Updated javadoc by Roberto Cortez
                                                                      • Jan 16, 2014: Added test for jpa listeners project by Roberto Cortez
                                                                      • Nov 09, 2013: Removing try-with-resources to allow any errors to show up on servletoutputstream by Arun Gupta
                                                                      • Oct 30, 2013: Fixing the namespace and version by Arun Gupta
                                                                      • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                                                      • Sep 12, 2013: Fixing namespace from java.sun.com -> xmlns.jcp.org by Arun Gupta
                                                                      • Sep 12, 2013: Fixing namespace from java.sun.com -> xmlns.jcp.org by Arun Gupta
                                                                      • Sep 12, 2013: Better output message by Arun Gupta
                                                                      • Sep 12, 2013: Using cdi 1.1 "all" style beans.xml by Arun Gupta
                                                                      How to help improve this sample
                                                                      The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                      git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                      cd javaee7-samples/jpa/listeners/

                                                                      Do the changes as you see fit and send a pull request!

                                                                      Good Luck!

                                                                      + \ No newline at end of file diff --git a/sample/jpa-locking-optimistic/index.html b/sample/jpa-locking-optimistic/index.html new file mode 100644 index 0000000..95462dd --- /dev/null +++ b/sample/jpa-locking-optimistic/index.html @@ -0,0 +1,127 @@ +JavaEE Sample::JPA::Locking optimistic

                                                                      Locking optimistic

                                                                      Run
                                                                      How to run the sample
                                                                      The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                      git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                      cd javaee7-samples/jpa/locking-optimistic/
                                                                      Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                      mvn test
                                                                      Or you can run individual tests by executing one of the following:
                                                                      mvn test -Dtest=LockingOptimisticTest

                                                                      LockingOptimisticTest

                                                                      Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                                                      Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                                                      +
                                                                      +
                                                                      @Deployment
                                                                      +public static WebArchive createDeployment() {
                                                                      +    BeansDescriptor beansXml = Descriptors.create(BeansDescriptor.class);
                                                                      +
                                                                      +    WebArchive war = ShrinkWrap.create(WebArchive.class)
                                                                      +            .addPackage("org.javaee7.jpa.locking.optimistic")
                                                                      +            .addAsResource("META-INF/persistence.xml")
                                                                      +            .addAsResource("META-INF/load.sql")
                                                                      +            .addAsWebInfResource(
                                                                      +                    new StringAsset(beansXml.createAlternatives()
                                                                      +                            .clazz(MovieBeanAlternative.class.getName()).up().exportAsString()),
                                                                      +                    beansXml.getDescriptorName());
                                                                      +    System.out.println(war.toString(true));
                                                                      +    return war;
                                                                      +}
                                                                      +
                                                                      +
                                                                      Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                      +
                                                                      +
                                                                      @Test
                                                                      +public void testLockingOptimisticUpdateAndRead() throws Exception {
                                                                      +    resetCountDownLatches();
                                                                      +    List<Movie> movies = movieBean.listMovies();
                                                                      +    assertFalse(movies.isEmpty());
                                                                      +
                                                                      +    final CountDownLatch testCountDownLatch = new CountDownLatch(1);
                                                                      +
                                                                      +    executor.execute(new Runnable() {
                                                                      +        @Override
                                                                      +        public void run() {
                                                                      +            movieBean.updateMovie(3, "INCEPTION UR");
                                                                      +            testCountDownLatch.countDown();
                                                                      +        }
                                                                      +    });
                                                                      +
                                                                      +    executor.execute(new Runnable() {
                                                                      +        @Override
                                                                      +        public void run() {
                                                                      +            movieBean.findMovie(3);
                                                                      +            MovieBeanAlternative.lockCountDownLatch.countDown();
                                                                      +        }
                                                                      +    });
                                                                      +
                                                                      +    assertTrue(testCountDownLatch.await(10, TimeUnit.SECONDS));
                                                                      +    assertEquals("INCEPTION UR", movieBean.findMovie(3).getName());
                                                                      +}
                                                                      +
                                                                      +
                                                                      Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                      +
                                                                      +
                                                                      @Test
                                                                      +public void testLockingOptimisticReadAndUpdate() throws Exception {
                                                                      +    resetCountDownLatches();
                                                                      +    List<Movie> movies = movieBean.listMovies();
                                                                      +    assertFalse(movies.isEmpty());
                                                                      +
                                                                      +    final CountDownLatch testCountDownLatch = new CountDownLatch(1);
                                                                      +
                                                                      +    executor.execute(new Runnable() {
                                                                      +        @Override
                                                                      +        public void run() {
                                                                      +            try {
                                                                      +                movieBean.readMovie(3);
                                                                      +            } catch (RuntimeException e) { // Should throw an javax.persistence.OptimisticLockException? Hibernate is throwing org.hibernate.OptimisticLockException. Investigate!
                                                                      +                testCountDownLatch.countDown();
                                                                      +            }
                                                                      +        }
                                                                      +    });
                                                                      +
                                                                      +    executor.execute(new Runnable() {
                                                                      +        @Override
                                                                      +        public void run() {
                                                                      +            MovieBeanAlternative.lockCountDownLatch.countDown();
                                                                      +            movieBean.updateMovie(3, "INCEPTION RU");
                                                                      +            MovieBeanAlternative.readCountDownLatch.countDown();
                                                                      +        }
                                                                      +    });
                                                                      +
                                                                      +    assertTrue(testCountDownLatch.await(10, TimeUnit.SECONDS));
                                                                      +    assertEquals("INCEPTION RU", movieBean.findMovie(3).getName());
                                                                      +}
                                                                      +
                                                                      +
                                                                      Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                      +
                                                                      +
                                                                      @Test
                                                                      +public void testLockingOptimisticDelete() throws Exception {
                                                                      +    resetCountDownLatches();
                                                                      +    List<Movie> movies = movieBean.listMovies();
                                                                      +    assertFalse(movies.isEmpty());
                                                                      +
                                                                      +    final CountDownLatch testCountDownLatch = new CountDownLatch(1);
                                                                      +
                                                                      +    executor.execute(new Runnable() {
                                                                      +        @Override
                                                                      +        public void run() {
                                                                      +            try {
                                                                      +                movieBean.updateMovie(3, "INCEPTION");
                                                                      +            } catch (RuntimeException e) { // Should throw an javax.persistence.OptimisticLockException? The Exception is wrapped around an javax.ejb.EJBException
                                                                      +                testCountDownLatch.countDown();
                                                                      +            }
                                                                      +        }
                                                                      +    });
                                                                      +
                                                                      +    executor.execute(new Runnable() {
                                                                      +        @Override
                                                                      +        public void run() {
                                                                      +            movieBean.deleteMovie(3);
                                                                      +            MovieBeanAlternative.lockCountDownLatch.countDown();
                                                                      +        }
                                                                      +    });
                                                                      +
                                                                      +    assertTrue(testCountDownLatch.await(10, TimeUnit.SECONDS));
                                                                      +}
                                                                      +
                                                                      +

                                                                      Share the Knowledge

                                                                      Find this sample useful? Share on

                                                                      There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                      Help Improve

                                                                      Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                      Recent Changelog

                                                                      • Dec 05, 2014: Added tests for locking-optimistic project by Roberto Cortez
                                                                      • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                                      • Oct 30, 2013: Removing load.sql as data needs to be persisted using entitymanager.persist instead of insert into. this allows the version column to be updated for optimistic locking to work. eclipselink was lenient about it but hibernate caught it by Arun Gupta
                                                                      • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                                                      • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                                                      How to help improve this sample
                                                                      The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                      git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                      cd javaee7-samples/jpa/locking-optimistic/

                                                                      Do the changes as you see fit and send a pull request!

                                                                      Good Luck!

                                                                      + \ No newline at end of file diff --git a/sample/jpa-locking-pessimistic/index.html b/sample/jpa-locking-pessimistic/index.html new file mode 100644 index 0000000..2be7def --- /dev/null +++ b/sample/jpa-locking-pessimistic/index.html @@ -0,0 +1,13 @@ +JavaEE Sample::JPA::Locking pessimistic

                                                                      Locking pessimistic

                                                                      Run
                                                                      How to run the sample
                                                                      The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                      git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                      cd javaee7-samples/jpa/locking-pessimistic/
                                                                      Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                      mvn test
                                                                      Or you can run individual tests by executing one of the following:

                                                                      Missing a story. Add a test case.Show me how!

                                                                      Share the Knowledge

                                                                      Find this sample useful? Share on

                                                                      There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                      Help Improve

                                                                      Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                      Recent Changelog

                                                                      • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                                      • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                                                      • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                                                      How to help improve this sample
                                                                      The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                      git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                      cd javaee7-samples/jpa/locking-pessimistic/

                                                                      Do the changes as you see fit and send a pull request!

                                                                      Good Luck!

                                                                      + \ No newline at end of file diff --git a/sample/jpa-multiple-pu/index.html b/sample/jpa-multiple-pu/index.html new file mode 100644 index 0000000..7394ded --- /dev/null +++ b/sample/jpa-multiple-pu/index.html @@ -0,0 +1,38 @@ +JavaEE Sample::JPA::Multiple pu

                                                                      Multiple pu

                                                                      Run
                                                                      How to run the sample
                                                                      The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                      git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                      cd javaee7-samples/jpa/multiple-pu/
                                                                      Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                      mvn test
                                                                      Or you can run individual tests by executing one of the following:
                                                                      mvn test -Dtest=MultiplePuTest

                                                                      MultiplePuTest

                                                                      Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                                                      Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                                                      +
                                                                      +
                                                                      @Deployment
                                                                      +public static WebArchive createDeployment() {
                                                                      +    WebArchive war = ShrinkWrap.create(WebArchive.class)
                                                                      +                               .addPackage("org.javaee7.jpa.multiple.pu")
                                                                      +                               .addAsResource("META-INF/persistence.xml")
                                                                      +                               .addAsResource("META-INF/create.sql")
                                                                      +                               .addAsResource("META-INF/drop.sql")
                                                                      +                               .addAsResource("META-INF/load.sql");
                                                                      +    System.out.println(war.toString(true));
                                                                      +    return war;
                                                                      +}
                                                                      +
                                                                      +
                                                                      Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                      +
                                                                      +
                                                                      @Test
                                                                      +public void testMultiplePu() throws Exception {
                                                                      +    List<Movie> movies = bean.listMovies();
                                                                      +    assertFalse(movies.isEmpty());
                                                                      +
                                                                      +    List<ProductCode> productCodes = bean.listProductCode();
                                                                      +    assertTrue(productCodes.isEmpty());
                                                                      +}
                                                                      +
                                                                      +

                                                                      Share the Knowledge

                                                                      Find this sample useful? Share on

                                                                      There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                      Help Improve

                                                                      Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                      Recent Changelog

                                                                      • Dec 04, 2014: Added tests for multiple-pu project by Roberto Cortez
                                                                      • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                                      • Oct 24, 2013: Fixing the namespace by Arun Gupta
                                                                      • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                                                      • Sep 12, 2013: Using cdi 1.1 "all" style beans.xml by Arun Gupta
                                                                      • Sep 12, 2013: Better output message by Arun Gupta
                                                                      • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                                                      How to help improve this sample
                                                                      The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                      git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                      cd javaee7-samples/jpa/multiple-pu/

                                                                      Do the changes as you see fit and send a pull request!

                                                                      Good Luck!

                                                                      + \ No newline at end of file diff --git a/sample/jpa-native-sql-resultset-mapping/index.html b/sample/jpa-native-sql-resultset-mapping/index.html new file mode 100644 index 0000000..e89ae01 --- /dev/null +++ b/sample/jpa-native-sql-resultset-mapping/index.html @@ -0,0 +1,97 @@ +JavaEE Sample::JPA::JPA Native SQL ResultSet Mapping

                                                                      JPA Native SQL ResultSet Mapping

                                                                      Run
                                                                      How to run the sample
                                                                      The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                      git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                      cd javaee7-samples/jpa/native-sql-resultset-mapping/
                                                                      Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                      mvn test
                                                                      Or you can run individual tests by executing one of the following:
                                                                      mvn test -Dtest=JpaNativeSqlResultSetMappingTest

                                                                      Using the EntityManager API to perform native SQL queries and map the result with @SqlResultSetMapping + annotation +

                                                                      JpaNativeSqlResultSetMappingTest

                                                                      +

                                                                      In this sample we’re going to query a simple JPA Entity, using the JPA EntityManager Native Query, perform +a select operation and map the query result using @SqlResultSetMapping.

                                                                      +
                                                                      +
                                                                      +
                                                                      +
                                                                      @Entity()
                                                                      +@Table(name = "EMPLOYEE_NATIVE_SQL_RESULTSET_MAPPING")
                                                                      +@SqlResultSetMapping(name = "myMapping", entities = {@EntityResult(entityClass = Employee.class, fields = {@FieldResult(name = "identifier", column = "id"), @FieldResult(name = "simpleName", column = "name")})})
                                                                      +public class Employee implements Serializable {
                                                                      +
                                                                      +    public Employee();
                                                                      +    private static final long serialVersionUID = 1L;
                                                                      +    @Id()
                                                                      +    private int identifier;
                                                                      +    @Column(length = 50)
                                                                      +    private String simpleName;
                                                                      +
                                                                      +    public int getIdentifier();
                                                                      +
                                                                      +    public void setIdentifier(int identifier);
                                                                      +
                                                                      +    public String getSimpleName();
                                                                      +
                                                                      +    public void setSimpleName(String simpleName);
                                                                      +}
                                                                      +
                                                                      +
                                                                      +
                                                                      +

                                                                      The select operation is very simple. We just need to call the API method createNativeQuery on the EntityManager +and use the mapping defined on Employee by the @SqlResultSetMapping annotation.

                                                                      +
                                                                      +
                                                                      +
                                                                      +
                                                                      @SuppressWarnings("unchecked")
                                                                      +public List<Employee> get() {
                                                                      +    return em.createNativeQuery("select * from EMPLOYEE_NATIVE_SQL_RESULTSET_MAPPING", "myMapping").getResultList();
                                                                      +}
                                                                      +
                                                                      +
                                                                      +

                                                                      We’re just going to deploy the application as a web archive. Note the inclusion of the following files:

                                                                      +
                                                                      +
                                                                      +
                                                                      +
                                                                      /META-INF/persistence.xml
                                                                      +/META-INF/create.sql
                                                                      +/META-INF/drop.sql
                                                                      +/META-INF/load.sql
                                                                      +
                                                                      +
                                                                      +
                                                                      +

                                                                      The persistence.xml file is needed of course for the persistence unit definition. A datasource is not +needed, since we can now use the new default datasource available in JEE7. We’re also using the new +javax.persistence.schema-generation.* propertires to create, populate and drop the database.

                                                                      +
                                                                      +
                                                                      +
                                                                      @Deployment
                                                                      +public static WebArchive createDeployment() {
                                                                      +    WebArchive war = ShrinkWrap.create(WebArchive.class)
                                                                      +                               .addPackage("org.javaee7.jpa.nativesql.resultset.mapping")
                                                                      +                               .addAsResource("META-INF/persistence.xml")
                                                                      +                               .addAsResource("META-INF/create.sql")
                                                                      +                               .addAsResource("META-INF/drop.sql")
                                                                      +                               .addAsResource("META-INF/load.sql");
                                                                      +    System.out.println(war.toString(true));
                                                                      +    return war;
                                                                      +}
                                                                      +
                                                                      +
                                                                      +

                                                                      In the test, we’re just going to invoke the only available operation in the EmployeeBean and assert a few +details to confirm that the native query was successfully executed.

                                                                      +
                                                                      +
                                                                      +
                                                                      @Test
                                                                      +public void testJpaNativeSqlResultSetMapping() {
                                                                      +    List<Employee> employees = employeeBean.get();
                                                                      +    assertFalse(employees.isEmpty());
                                                                      +    assertEquals(8, employees.size());
                                                                      +}
                                                                      +
                                                                      +

                                                                      Share the Knowledge

                                                                      Find this sample useful? Share on

                                                                      There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                      Help Improve

                                                                      Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                      Recent Changelog

                                                                      • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                                      • Feb 02, 2014: Fix include expression in test case by Aslak Knutsen
                                                                      • Jan 28, 2014: Added name and description to pom files by Roberto Cortez
                                                                      • Jan 28, 2014: Added test for native-sql-resultset-mapping project by Roberto Cortez
                                                                      • Nov 06, 2013: Update employeebean.java by fotofinder
                                                                      • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                                                      • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                                                      How to help improve this sample
                                                                      The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                      git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                      cd javaee7-samples/jpa/native-sql-resultset-mapping/

                                                                      Do the changes as you see fit and send a pull request!

                                                                      Good Luck!

                                                                      + \ No newline at end of file diff --git a/sample/jpa-native-sql/index.html b/sample/jpa-native-sql/index.html new file mode 100644 index 0000000..e60414c --- /dev/null +++ b/sample/jpa-native-sql/index.html @@ -0,0 +1,93 @@ +JavaEE Sample::JPA::JPA Native SQL

                                                                      JPA Native SQL

                                                                      Run
                                                                      How to run the sample
                                                                      The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                      git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                      cd javaee7-samples/jpa/native-sql/
                                                                      Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                      mvn test
                                                                      Or you can run individual tests by executing one of the following:
                                                                      mvn test -Dtest=JpaNativeSqlTest

                                                                      Using the EntityManager API to perform native SQL queries

                                                                      JpaNativeSqlTest

                                                                      +

                                                                      In this sample we’re going to query a simple JPA Entity, using the JPA EntityManager Native Query and perform +a select operation.

                                                                      +
                                                                      +
                                                                      +
                                                                      +
                                                                      @Entity()
                                                                      +@Table(name = "EMPLOYEE_NATIVE_SQL")
                                                                      +public class Employee implements Serializable {
                                                                      +    private static final long serialVersionUID = 1L;
                                                                      +    @Id()
                                                                      +    private int id;
                                                                      +    @Column(length = 50)
                                                                      +    private String name;
                                                                      +
                                                                      +    public Employee();
                                                                      +
                                                                      +    public Employee(String name);
                                                                      +
                                                                      +    public int getId();
                                                                      +
                                                                      +    public void setId(int id);
                                                                      +
                                                                      +    public String getName();
                                                                      +
                                                                      +    public void setName(String name);
                                                                      +}
                                                                      +
                                                                      +
                                                                      +
                                                                      +

                                                                      The select operation is very simple. We just need to call the API method createNativeQuery on the EntityManager.

                                                                      +
                                                                      +
                                                                      +
                                                                      +
                                                                      @SuppressWarnings("unchecked")
                                                                      +public List<Employee> get() {
                                                                      +    return em.createNativeQuery("select * from EMPLOYEE_NATIVE_SQL", Employee.class).getResultList();
                                                                      +}
                                                                      +
                                                                      +
                                                                      +

                                                                      We’re just going to deploy the application as a web archive. Note the inclusion of the following files:

                                                                      +
                                                                      +
                                                                      +
                                                                      +
                                                                      /META-INF/persistence.xml
                                                                      +/META-INF/create.sql
                                                                      +/META-INF/drop.sql
                                                                      +/META-INF/load.sql
                                                                      +
                                                                      +
                                                                      +
                                                                      +

                                                                      The persistence.xml file is needed of course for the persistence unit definition. A datasource is not +needed, since we can now use the new default datasource available in JEE7. We’re also using the new +javax.persistence.schema-generation.* propertires to create, populate and drop the database.

                                                                      +
                                                                      +
                                                                      +
                                                                      @Deployment
                                                                      +public static WebArchive createDeployment() {
                                                                      +    WebArchive war = ShrinkWrap.create(WebArchive.class)
                                                                      +                               .addPackage("org.javaee7.jpa.nativesql")
                                                                      +                               .addAsResource("META-INF/persistence.xml")
                                                                      +                               .addAsResource("META-INF/create.sql")
                                                                      +                               .addAsResource("META-INF/drop.sql")
                                                                      +                               .addAsResource("META-INF/load.sql");
                                                                      +    System.out.println(war.toString(true));
                                                                      +    return war;
                                                                      +}
                                                                      +
                                                                      +
                                                                      +

                                                                      In the test, we’re just going to invoke the only available operation in the EmployeeBean and assert a few +details to confirm that the native query was successfully executed.

                                                                      +
                                                                      +
                                                                      +
                                                                      @Test
                                                                      +public void testNativeSql() {
                                                                      +    List<Employee> employees = employeeBean.get();
                                                                      +    assertFalse(employees.isEmpty());
                                                                      +    assertEquals(8, employees.size());
                                                                      +}
                                                                      +
                                                                      +

                                                                      Share the Knowledge

                                                                      Find this sample useful? Share on

                                                                      There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                      Help Improve

                                                                      Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                      Recent Changelog

                                                                      • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                                      • Feb 02, 2014: Fix include expression in test case by Aslak Knutsen
                                                                      • Jan 28, 2014: Added name and description to pom files by Roberto Cortez
                                                                      • Jan 28, 2014: Added test for native-sql project by Roberto Cortez
                                                                      • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                                                      • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                                                      How to help improve this sample
                                                                      The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                      git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                      cd javaee7-samples/jpa/native-sql/

                                                                      Do the changes as you see fit and send a pull request!

                                                                      Good Luck!

                                                                      + \ No newline at end of file diff --git a/sample/jpa-ordercolumn/index.html b/sample/jpa-ordercolumn/index.html new file mode 100644 index 0000000..d16ea68 --- /dev/null +++ b/sample/jpa-ordercolumn/index.html @@ -0,0 +1,465 @@ +JavaEE Sample::JPA::Ordercolumn

                                                                      Ordercolumn

                                                                      Run
                                                                      How to run the sample
                                                                      The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                      git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                      cd javaee7-samples/jpa/ordercolumn/
                                                                      Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                      mvn test
                                                                      Or you can run individual tests by executing one of the following:
                                                                      mvn test -Dtest=OrderColumnBiJoinTestmvn test -Dtest=OrderColumnBiMappedByTestmvn test -Dtest=OrderColumnUniTest

                                                                      OrderColumnBiJoinTest

                                                                      +

                                                                      This tests and demonstrates the {@link OrderColumn} annotation when used together with a +bi-directional parent-child mapping, where the child holds a foreign key to the parent.

                                                                      +
                                                                      +
                                                                      +

                                                                      <p> +This is a variation on the normal oneToMany mapping using two {@link JoinColumn} annotations +instead of using the <code>mappedBy</code> attribute.

                                                                      +
                                                                      +
                                                                      +

                                                                      <p> +In this mapping the position each child has in the parent’s list is stored in the +child table and fully managed by JPA. This means that this position index does +not explicitly show up in the object model.

                                                                      +
                                                                      +
                                                                      +

                                                                      <p> +Example SQL DDL (h2 syntax) +<pre> +create table Parent ( +id bigint generated by default as identity,

                                                                      +
                                                                      +
                                                                      +

                                                                      primary key (id) +);

                                                                      +
                                                                      +
                                                                      +

                                                                      create table Child ( +id bigint generated by default as identity, +parent_id bigint, +children_ORDER integer,

                                                                      +
                                                                      +
                                                                      +

                                                                      primary key (id), +foreign key (parent_id) references Parent +); +</pre>

                                                                      +
                                                                      Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                                                      +
                                                                      +
                                                                      @Deployment
                                                                      +private static Archive<?> createDeployment() {
                                                                      +    return ShrinkWrap.create(WebArchive.class)
                                                                      +                     .addPackages(true, Child.class.getPackage())
                                                                      +                     .addPackages(true, OrderColumnTesterService.class.getPackage())
                                                                      +                     .addAsResource("META-INF/persistence.xml");
                                                                      +}
                                                                      +
                                                                      +
                                                                      Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                      +
                                                                      +
                                                                      @Test
                                                                      +public void saveInOneGo() {
                                                                      +    Parent parent = new Parent();
                                                                      +
                                                                      +    Child child1 = new Child();
                                                                      +    child1.setParent(parent);
                                                                      +
                                                                      +    Child child2 = new Child();
                                                                      +    child2.setParent(parent);
                                                                      +
                                                                      +    parent.getChildren().add(child1);
                                                                      +    parent.getChildren().add(child2);
                                                                      +
                                                                      +    parent = indexColumnTesterService.save(parent);
                                                                      +
                                                                      +    // Reload parent fresh from data source again
                                                                      +    Parent savedParent = indexColumnTesterService.getParentById(parent.getId());
                                                                      +
                                                                      +    assertEquals("2 children added to parent and saved, but after re-loading number of chilren different",
                                                                      +        2, savedParent.getChildren().size()
                                                                      +    );
                                                                      +}
                                                                      +
                                                                      +
                                                                      +

                                                                      Saves a parent instance first, then adds two children instances and saves again.

                                                                      +
                                                                      +
                                                                      +

                                                                      <p> +Example sequence of insert/update statements that may be generated to accomplish this: +<pre> +insert into Parent (id) values (null) +insert into Child (id) values (null) +insert into Child (id) values (null)

                                                                      +
                                                                      +
                                                                      +

                                                                      update Child set parent_id = 1, children_ORDER = 0 where id = 1 +update Child set parent_id = 1, children_ORDER = 1 where id = 2 +</pre>

                                                                      +
                                                                      +
                                                                      +
                                                                      @Test
                                                                      +public void saveParentSeparatelyFirst() {
                                                                      +
                                                                      +    Parent parent = indexColumnTesterService.save(new Parent());
                                                                      +
                                                                      +    Child child1 = new Child();
                                                                      +    child1.setParent(parent);
                                                                      +
                                                                      +    Child child2 = new Child();
                                                                      +    child2.setParent(parent);
                                                                      +
                                                                      +    parent.getChildren().add(child1);
                                                                      +    parent.getChildren().add(child2);
                                                                      +
                                                                      +    parent = indexColumnTesterService.save(parent);
                                                                      +
                                                                      +    Parent savedParent = indexColumnTesterService.getParentById(parent.getId());
                                                                      +
                                                                      +    assertEquals("2 children added to parent and saved, but after re-loading number of chilren different",
                                                                      +        2, savedParent.getChildren().size()
                                                                      +    );
                                                                      +
                                                                      +}
                                                                      +
                                                                      +
                                                                      Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                      +
                                                                      +
                                                                      @Test
                                                                      +public void saveParentWithOneChildFirst() {
                                                                      +
                                                                      +    Parent parent = new Parent();
                                                                      +    Child child1 = new Child();
                                                                      +    child1.setParent(parent);
                                                                      +    parent.getChildren().add(child1);
                                                                      +
                                                                      +    // Save parent with 1 child in one go
                                                                      +    parent = indexColumnTesterService.save(parent);
                                                                      +
                                                                      +    Child child2 = new Child();
                                                                      +    child2.setParent(parent);
                                                                      +    parent.getChildren().add(child2);
                                                                      +
                                                                      +    // Save parent again with second child
                                                                      +    parent = indexColumnTesterService.save(parent);
                                                                      +
                                                                      +    Parent savedParent = indexColumnTesterService.getParentById(parent.getId());
                                                                      +
                                                                      +    assertEquals("2 children added to parent and saved, but after re-loading number of chilren different",
                                                                      +        2, savedParent.getChildren().size()
                                                                      +    );
                                                                      +}
                                                                      +
                                                                      +
                                                                      Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                      +
                                                                      +
                                                                      @Test
                                                                      +public void saveParentWithChildrenThenDeleteOned() {
                                                                      +
                                                                      +    Parent parent = new Parent();
                                                                      +
                                                                      +    Child child1 = new Child();
                                                                      +    child1.setParent(parent);
                                                                      +    parent.getChildren().add(child1);
                                                                      +
                                                                      +    Child child2 = new Child();
                                                                      +    child2.setParent(parent);
                                                                      +    parent.getChildren().add(child2);
                                                                      +
                                                                      +    Child child3 = new Child();
                                                                      +    child3.setParent(parent);
                                                                      +    parent.getChildren().add(child3);
                                                                      +
                                                                      +    // Save parent with 3 children
                                                                      +    parent = indexColumnTesterService.save(parent);
                                                                      +
                                                                      +    Parent savedParent = indexColumnTesterService.getParentById(parent.getId());
                                                                      +
                                                                      +    assertEquals("3 children added to parent and saved, but after re-loading number of chilren different",
                                                                      +        3, savedParent.getChildren().size()
                                                                      +    );
                                                                      +
                                                                      +    // Removing child at position 1 and saving again
                                                                      +    savedParent.getChildren().remove(1);
                                                                      +
                                                                      +    savedParent = indexColumnTesterService.save(savedParent);
                                                                      +    savedParent = indexColumnTesterService.getParentById(savedParent.getId());
                                                                      +
                                                                      +    assertEquals("2 children added to parent and saved, but after re-loading number of chilren different",
                                                                      +        2, savedParent.getChildren().size()
                                                                      +    );
                                                                      +
                                                                      +}
                                                                      +
                                                                      +

                                                                      OrderColumnBiMappedByTest

                                                                      +

                                                                      This tests and demonstrates the {@link OrderColumn} annotation when used together with a +bi-directional parent-child mapping, where the child holds a foreign key to the parent.

                                                                      +
                                                                      +
                                                                      +

                                                                      <p> +This is the normal oneToMany mapping using the <code>mappedBy</code> attribute. +Even though this is the most straightforward mapping, because of a mis-interpretation +in the JPA spec it was believed for years that this mapping did not have to be +supported (see https://hibernate.atlassian.net/browse/HHH-5732 among others)

                                                                      +
                                                                      +
                                                                      +

                                                                      <p> +In this mapping the position each child has in the parent’s list is stored in the +child table and fully managed by JPA. This means that this position index does +not explicitly show up in the object model.

                                                                      +
                                                                      +
                                                                      +

                                                                      <p> +Example SQL DDL (h2 syntax) +<pre> +create table Parent ( +id bigint generated by default as identity,

                                                                      +
                                                                      +
                                                                      +

                                                                      primary key (id) +);

                                                                      +
                                                                      +
                                                                      +

                                                                      create table Child ( +id bigint generated by default as identity, +parent_id bigint, +children_ORDER integer,

                                                                      +
                                                                      +
                                                                      +

                                                                      primary key (id), +foreign key (parent_id) references Parent +); +</pre>

                                                                      +
                                                                      Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                                                      +
                                                                      +
                                                                      @Deployment
                                                                      +private static Archive<?> createDeployment() {
                                                                      +    return ShrinkWrap.create(WebArchive.class)
                                                                      +                     .addPackages(true, Parent.class.getPackage())
                                                                      +                     .addPackages(true, OrderColumnTesterService.class.getPackage())
                                                                      +                     .addAsResource("META-INF/persistence.xml");
                                                                      +}
                                                                      +
                                                                      +
                                                                      Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                      +
                                                                      +
                                                                      @Test
                                                                      +public void saveInOneGo() {
                                                                      +
                                                                      +    Parent parent = new Parent();
                                                                      +
                                                                      +    Child child1 = new Child();
                                                                      +    child1.setParent(parent);
                                                                      +
                                                                      +    Child child2 = new Child();
                                                                      +    child2.setParent(parent);
                                                                      +
                                                                      +    parent.getChildren().add(child1);
                                                                      +    parent.getChildren().add(child2);
                                                                      +
                                                                      +    parent = indexColumnTesterService.save(parent);
                                                                      +
                                                                      +    Parent savedParent = indexColumnTesterService.getParentById(parent.getId());
                                                                      +
                                                                      +    assertEquals("2 children added to parent and saved, but after re-loading number of chilren different",
                                                                      +        2, savedParent.getChildren().size()
                                                                      +    );
                                                                      +}
                                                                      +
                                                                      +
                                                                      +

                                                                      Saves a parent instance first, then adds two children instances and saves again.

                                                                      +
                                                                      +
                                                                      +

                                                                      <p> +Example sequence of insert/update statements that may be generated to accomplish this: +<pre> +insert into Parent (id) values (null) +insert into Child (id, parent_id) values (null, 1) +insert into Child (id, parent_id) values (null, 1)

                                                                      +
                                                                      +
                                                                      +

                                                                      update Child set children_ORDER = 0 where id = 1 +update Child set children_ORDER = 1 where id = 2 +</pre>

                                                                      +
                                                                      +
                                                                      +
                                                                      @Test
                                                                      +public void saveParentSeparatelyFirst() {
                                                                      +
                                                                      +    Parent parent = indexColumnTesterService.save(new Parent());
                                                                      +
                                                                      +    Child child1 = new Child();
                                                                      +    child1.setParent(parent);
                                                                      +
                                                                      +    Child child2 = new Child();
                                                                      +    child2.setParent(parent);
                                                                      +
                                                                      +    parent.getChildren().add(child1);
                                                                      +    parent.getChildren().add(child2);
                                                                      +
                                                                      +    parent = indexColumnTesterService.save(parent);
                                                                      +
                                                                      +    Parent savedParent = indexColumnTesterService.getParentById(parent.getId());
                                                                      +
                                                                      +    assertEquals("2 children added to parent and saved, but after re-loading number of chilren different",
                                                                      +        2, savedParent.getChildren().size()
                                                                      +    );
                                                                      +
                                                                      +}
                                                                      +
                                                                      +

                                                                      OrderColumnUniTest

                                                                      +

                                                                      This tests and demonstrates the {@link OrderColumn} annotation when used together with a +uni-directional parent-child mapping, where the child table holds a foreign key to the parent.

                                                                      +
                                                                      +
                                                                      +

                                                                      <p> +In this mapping the position each child has in the parent’s list is stored in the +child table and fully managed by JPA. This means that this position index does +not explicitly show up in the object model.

                                                                      +
                                                                      +
                                                                      +

                                                                      <p> +Example SQL DDL (h2 syntax) +<pre> +create table Parent ( +id bigint generated by default as identity,

                                                                      +
                                                                      +
                                                                      +

                                                                      primary key (id) +);

                                                                      +
                                                                      +
                                                                      +

                                                                      create table Child ( +id bigint generated by default as identity, +children_id bigint, +children_ORDER integer,

                                                                      +
                                                                      +
                                                                      +

                                                                      primary key (id), +foreign key (children_id) references Parent +); +</pre>

                                                                      +
                                                                      Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                                                      +
                                                                      +
                                                                      @Deployment
                                                                      +private static Archive<?> createDeployment() {
                                                                      +    return ShrinkWrap.create(WebArchive.class)
                                                                      +                     .addPackages(true, Child.class.getPackage())
                                                                      +                     .addPackages(true, OrderColumnTesterService.class.getPackage())
                                                                      +                     .addAsResource("META-INF/persistence.xml");
                                                                      +}
                                                                      +
                                                                      +
                                                                      +

                                                                      Saves a parent instance with 2 children in its children collection in one operation.

                                                                      +
                                                                      +
                                                                      +

                                                                      <p> +Example sequence of insert/update statements that may be generated to accomplish this: +<pre> +insert into Parent (id) values (null) +insert into Child (id) values (null) +insert into Child (id) values (null)

                                                                      +
                                                                      +
                                                                      +

                                                                      update Child set children_id = 1, children_ORDER = 0 where id = 1 +update Child set children_id = 1, children_ORDER = 1 where id = 2 +</pre>

                                                                      +
                                                                      +
                                                                      +
                                                                      @Test
                                                                      +public void saveInOneGo() {
                                                                      +
                                                                      +    Parent parent = new Parent();
                                                                      +    Child child1 = new Child();
                                                                      +    Child child2 = new Child();
                                                                      +
                                                                      +    parent.getChildren().add(child1);
                                                                      +    parent.getChildren().add(child2);
                                                                      +
                                                                      +    parent = indexColumnTesterService.save(parent);
                                                                      +
                                                                      +    Parent savedParent = indexColumnTesterService.getParentById(parent.getId());
                                                                      +
                                                                      +    assertEquals("2 children added to parent and saved, but after re-loading number of chilren different",
                                                                      +        2, savedParent.getChildren().size()
                                                                      +    );
                                                                      +}
                                                                      +
                                                                      +
                                                                      +

                                                                      Saves a parent instance first, then adds two children instances and saves again.

                                                                      +
                                                                      +
                                                                      +

                                                                      <p> +Example sequence of insert/update statements that may be generated to accomplish this: +<pre> +insert into Parent (id) values (null) +insert into Child (id) values (null) +insert into Child (id) values (null)

                                                                      +
                                                                      +
                                                                      +

                                                                      update Child set children_id = 1, children_ORDER = 0 where id = 1 +update Child set children_id = 1, children_ORDER = 1 where id = 2 +</pre>

                                                                      +
                                                                      +
                                                                      +
                                                                      @Test
                                                                      +public void saveParentSeparatelyFirst() {
                                                                      +
                                                                      +    Parent parent = indexColumnTesterService.save(new Parent());
                                                                      +
                                                                      +    Child child1 = new Child();
                                                                      +    Child child2 = new Child();
                                                                      +
                                                                      +    parent.getChildren().add(child1);
                                                                      +    parent.getChildren().add(child2);
                                                                      +
                                                                      +    parent = indexColumnTesterService.save(parent);
                                                                      +
                                                                      +    Parent savedParent = indexColumnTesterService.getParentById(parent.getId());
                                                                      +
                                                                      +    assertEquals("2 children added to parent and saved, but after re-loading number of chilren different",
                                                                      +        2, savedParent.getChildren().size()
                                                                      +    );
                                                                      +
                                                                      +}
                                                                      +
                                                                      +
                                                                      +

                                                                      Saves a parent with one child in its children collection first, then adds another child and saves again.

                                                                      +
                                                                      +
                                                                      +

                                                                      <p> +Example sequence of insert/update statements that may be generated to accomplish this: +<pre> +insert into Parent (id) values (null) +insert into Child (id) values (null) +update Child set children_id = 1, children_ORDER = 0 where id = 1

                                                                      +
                                                                      +
                                                                      +

                                                                      insert into Child (id) values (null) +update Child set children_id = 1, children_ORDER = 1 where id = 2 +</pre>

                                                                      +
                                                                      +
                                                                      +
                                                                      @Test
                                                                      +public void saveParentWithOneChildFirst() {
                                                                      +
                                                                      +    Parent parent = new Parent();
                                                                      +    Child child1 = new Child();
                                                                      +    parent.getChildren().add(child1);
                                                                      +
                                                                      +    // Save parent with 1 child in one go
                                                                      +    parent = indexColumnTesterService.save(parent);
                                                                      +
                                                                      +    Child child2 = new Child();
                                                                      +    parent.getChildren().add(child2);
                                                                      +
                                                                      +    // Save parent again with second child
                                                                      +    parent = indexColumnTesterService.save(parent);
                                                                      +
                                                                      +    Parent savedParent = indexColumnTesterService.getParentById(parent.getId());
                                                                      +
                                                                      +    assertEquals("2 children added to parent and saved, but after re-loading number of chilren different",
                                                                      +        2, savedParent.getChildren().size()
                                                                      +    );
                                                                      +
                                                                      +}
                                                                      +
                                                                      +

                                                                      Share the Knowledge

                                                                      Find this sample useful? Share on

                                                                      There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                      Help Improve

                                                                      Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                      Recent Changelog

                                                                      • Oct 05, 2014: Tests for the @ordercolumn annotation by arjan tijms
                                                                      How to help improve this sample
                                                                      The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                      git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                      cd javaee7-samples/jpa/ordercolumn/

                                                                      Do the changes as you see fit and send a pull request!

                                                                      Good Luck!

                                                                      + \ No newline at end of file diff --git a/sample/jpa-pu-typesafe/index.html b/sample/jpa-pu-typesafe/index.html new file mode 100644 index 0000000..be826a2 --- /dev/null +++ b/sample/jpa-pu-typesafe/index.html @@ -0,0 +1,47 @@ +JavaEE Sample::JPA::Pu typesafe

                                                                      Pu typesafe

                                                                      Run
                                                                      How to run the sample
                                                                      The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                      git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                      cd javaee7-samples/jpa/pu-typesafe/
                                                                      Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                      mvn test
                                                                      Or you can run individual tests by executing one of the following:
                                                                      mvn test -Dtest=PuTypesafeTest

                                                                      PuTypesafeTest

                                                                      Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                                                      Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                                                      +
                                                                      +
                                                                      @Deployment
                                                                      +public static WebArchive createDeployment() {
                                                                      +    WebArchive war = ShrinkWrap.create(WebArchive.class)
                                                                      +                               .addPackage("org.javaee7.jpa.pu.typesafe")
                                                                      +                               .addAsResource("META-INF/persistence.xml")
                                                                      +                               .addAsResource("META-INF/create.sql")
                                                                      +                               .addAsResource("META-INF/drop.sql")
                                                                      +                               .addAsResource("META-INF/load.sql");
                                                                      +    System.out.println(war.toString(true));
                                                                      +    return war;
                                                                      +}
                                                                      +
                                                                      +
                                                                      Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                      +
                                                                      +
                                                                      @Test
                                                                      +public void testPuTypesafe() throws Exception {
                                                                      +    List<Movie> movies = bean.listMovies();
                                                                      +    assertFalse(movies.isEmpty());
                                                                      +
                                                                      +    assertNotNull(defaultEM);
                                                                      +
                                                                      +    List<Movie> defaultFindAll = defaultEM.createNamedQuery("Movie.findAll", Movie.class).getResultList();
                                                                      +    assertFalse(defaultFindAll.isEmpty());
                                                                      +
                                                                      +    assertArrayEquals(movies.toArray(), defaultFindAll.toArray());
                                                                      +
                                                                      +    List<Movie> persistenceContextFindAll =
                                                                      +            persistenceContextEM.createNamedQuery("Movie.findAll", Movie.class).getResultList();
                                                                      +
                                                                      +    assertArrayEquals(movies.toArray(), persistenceContextFindAll.toArray());
                                                                      +}
                                                                      +
                                                                      +

                                                                      Share the Knowledge

                                                                      Find this sample useful? Share on

                                                                      There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                      Help Improve

                                                                      Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                      Recent Changelog

                                                                      • Dec 04, 2014: Added tests for pu-typesafe project by Roberto Cortez
                                                                      • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                                      • Oct 30, 2013: Fixed persistence.xml by adding by Arun Gupta
                                                                      • Oct 24, 2013: Fixing the namespace by Arun Gupta
                                                                      • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                                                      • Sep 05, 2013: Redundant file by Arun Gupta
                                                                      • Aug 29, 2013: Using only one pu, better titles by Arun Gupta
                                                                      • Aug 29, 2013: Using only one pu, no need to show two to demonstrate this feature by Arun Gupta
                                                                      • Aug 29, 2013: Using only one database by Arun Gupta
                                                                      • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                                                      How to help improve this sample
                                                                      The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                      git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                      cd javaee7-samples/jpa/pu-typesafe/

                                                                      Do the changes as you see fit and send a pull request!

                                                                      Good Luck!

                                                                      + \ No newline at end of file diff --git a/sample/jpa-schema-gen-index/index.html b/sample/jpa-schema-gen-index/index.html new file mode 100644 index 0000000..5d15727 --- /dev/null +++ b/sample/jpa-schema-gen-index/index.html @@ -0,0 +1,62 @@ +JavaEE Sample::JPA::Schema gen index

                                                                      Schema gen index

                                                                      Run
                                                                      How to run the sample
                                                                      The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                      git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                      cd javaee7-samples/jpa/schema-gen-index/
                                                                      Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                      mvn test
                                                                      Or you can run individual tests by executing one of the following:
                                                                      mvn test -Dtest=SchemaGenIndexTest

                                                                      • Specifications in use:
                                                                        • JPA

                                                                        SchemaGenIndexTest

                                                                        Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                                                        Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                                                        +
                                                                        +
                                                                        @Deployment
                                                                        +public static WebArchive createDeployment() {
                                                                        +    WebArchive war = ShrinkWrap.create(WebArchive.class)
                                                                        +                               .addPackage("org.javaee7.jpa.index")
                                                                        +                               .addAsResource("META-INF/persistence.xml");
                                                                        +    System.out.println(war.toString(true));
                                                                        +    return war;
                                                                        +}
                                                                        +
                                                                        +
                                                                        Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                        +
                                                                        +
                                                                        @Test
                                                                        +public void testSchemaGenIndex() throws Exception {
                                                                        +    Path create = Paths.get("/tmp/create.sql");
                                                                        +    assertTrue(Files.exists(create));
                                                                        +
                                                                        +    Path drop = Paths.get("/tmp/drop.sql");
                                                                        +    assertTrue(Files.exists(create));
                                                                        +
                                                                        +    String line;
                                                                        +    BufferedReader reader = Files.newBufferedReader(create, Charset.defaultCharset());
                                                                        +    boolean createGenerated = false;
                                                                        +    boolean createIndex = false;
                                                                        +    while ((line = reader.readLine()) != null) {
                                                                        +        if (line.toLowerCase().contains("create table employee_schema_gen_index")) {
                                                                        +            createGenerated = true;
                                                                        +        }
                                                                        +
                                                                        +        if (line.toLowerCase().contains("create index")) {
                                                                        +            createIndex = true;
                                                                        +        }
                                                                        +    }
                                                                        +
                                                                        +    reader = Files.newBufferedReader(drop, Charset.defaultCharset());
                                                                        +    boolean dropGenerated = false;
                                                                        +    while ((line = reader.readLine()) != null) {
                                                                        +        if (line.toLowerCase().contains("drop table employee_schema_gen_index")) {
                                                                        +            dropGenerated = true;
                                                                        +            break;
                                                                        +        }
                                                                        +    }
                                                                        +
                                                                        +    assertTrue(createGenerated);
                                                                        +    assertTrue(createIndex);
                                                                        +    assertTrue(dropGenerated);
                                                                        +}
                                                                        +
                                                                        +

                                                                        Share the Knowledge

                                                                        Find this sample useful? Share on

                                                                        There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                        Help Improve

                                                                        Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                        Recent Changelog

                                                                        • Dec 04, 2014: Added tests for schema-gen-index project by Roberto Cortez
                                                                        • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                                        • Nov 09, 2013: New sample to show @index usage by Arun Gupta
                                                                        How to help improve this sample
                                                                        The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                        git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                        cd javaee7-samples/jpa/schema-gen-index/

                                                                        Do the changes as you see fit and send a pull request!

                                                                        Good Luck!

                                                                        + \ No newline at end of file diff --git a/sample/jpa-schema-gen-metadata/index.html b/sample/jpa-schema-gen-metadata/index.html new file mode 100644 index 0000000..ddc4992 --- /dev/null +++ b/sample/jpa-schema-gen-metadata/index.html @@ -0,0 +1,42 @@ +JavaEE Sample::JPA::Schema gen metadata

                                                                        Schema gen metadata

                                                                        Run
                                                                        How to run the sample
                                                                        The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                        git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                        cd javaee7-samples/jpa/schema-gen-metadata/
                                                                        Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                        mvn test
                                                                        Or you can run individual tests by executing one of the following:
                                                                        mvn test -Dtest=EmployeeBeanTest

                                                                        EmployeeBeanTest

                                                                        Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                                                        Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                                                        +
                                                                        +
                                                                        @Deployment
                                                                        +public static WebArchive createDeployment() {
                                                                        +    return ShrinkWrap.create(WebArchive.class)
                                                                        +            .addClasses(Employee.class,
                                                                        +                    EmployeeBean.class)
                                                                        +            .addAsResource("META-INF/persistence.xml")
                                                                        +            .addAsResource("META-INF/load.sql");
                                                                        +}
                                                                        +
                                                                        +
                                                                        Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                        +
                                                                        +
                                                                        @Test
                                                                        +public void testGet() throws Exception {
                                                                        +    assertNotNull(bean);
                                                                        +    List<Employee> list = bean.get();
                                                                        +    assertNotNull(list);
                                                                        +    assertEquals(8, list.size());
                                                                        +    assertFalse(list.contains(new Employee("Penny")));
                                                                        +    assertFalse(list.contains(new Employee("Sheldon")));
                                                                        +    assertFalse(list.contains(new Employee("Amy")));
                                                                        +    assertFalse(list.contains(new Employee("Leonard")));
                                                                        +    assertFalse(list.contains(new Employee("Bernadette")));
                                                                        +    assertFalse(list.contains(new Employee("Raj")));
                                                                        +    assertFalse(list.contains(new Employee("Howard")));
                                                                        +    assertFalse(list.contains(new Employee("Priya")));
                                                                        +}
                                                                        +
                                                                        +

                                                                        Share the Knowledge

                                                                        Find this sample useful? Share on

                                                                        There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                        Help Improve

                                                                        Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                        Recent Changelog

                                                                        • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                                        • Dec 07, 2013: Adding a test for table generation using jpa metadata by arun-gupta
                                                                        • Nov 09, 2013: Removing redundant attributes by Arun Gupta
                                                                        • Nov 09, 2013: Fixing the table name by Arun Gupta
                                                                        • Oct 30, 2013: Renaming schema-gen to schema-gen-metadata to be more meaningful by Arun Gupta
                                                                        How to help improve this sample
                                                                        The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                        git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                        cd javaee7-samples/jpa/schema-gen-metadata/

                                                                        Do the changes as you see fit and send a pull request!

                                                                        Good Luck!

                                                                        + \ No newline at end of file diff --git a/sample/jpa-schema-gen-scripts-external/index.html b/sample/jpa-schema-gen-scripts-external/index.html new file mode 100644 index 0000000..ad281f6 --- /dev/null +++ b/sample/jpa-schema-gen-scripts-external/index.html @@ -0,0 +1,41 @@ +JavaEE Sample::JPA::Schema gen scripts external

                                                                        Schema gen scripts external

                                                                        Run
                                                                        How to run the sample
                                                                        The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                        git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                        cd javaee7-samples/jpa/schema-gen-scripts-external/
                                                                        Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                        mvn test
                                                                        Or you can run individual tests by executing one of the following:
                                                                        mvn test -Dtest=SchemaGenScriptsExternalTest

                                                                        SchemaGenScriptsExternalTest

                                                                        Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                                                        Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                                                        +
                                                                        +
                                                                        @Deployment
                                                                        +public static WebArchive createDeployment() throws Exception {
                                                                        +    copyURLToFile(currentThread().getContextClassLoader().getResource("META-INF/create.sql"),
                                                                        +                  new File("/tmp/create.sql"));
                                                                        +    copyURLToFile(currentThread().getContextClassLoader().getResource("META-INF/drop.sql"),
                                                                        +                  new File("/tmp/drop.sql"));
                                                                        +    copyURLToFile(currentThread().getContextClassLoader().getResource("META-INF/load.sql"),
                                                                        +                  new File("/tmp/load.sql"));
                                                                        +
                                                                        +    WebArchive war = ShrinkWrap.create(WebArchive.class)
                                                                        +                               .addPackage("org.javaee7.jpasamples.schema.gen.scripts.external")
                                                                        +                               .addAsResource("META-INF/persistence.xml")
                                                                        +                               .addAsResource("META-INF/create.sql")
                                                                        +                               .addAsResource("META-INF/drop.sql")
                                                                        +                               .addAsResource("META-INF/load.sql");
                                                                        +    System.out.println(war.toString(true));
                                                                        +    return war;
                                                                        +}
                                                                        +
                                                                        +
                                                                        Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                        +
                                                                        +
                                                                        @Test
                                                                        +public void testSchemaGenScriptExternal() throws Exception {
                                                                        +    Assert.assertFalse(employeeBean.get().isEmpty());
                                                                        +}
                                                                        +
                                                                        +

                                                                        Share the Knowledge

                                                                        Find this sample useful? Share on

                                                                        There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                        Help Improve

                                                                        Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                        Recent Changelog

                                                                        • Dec 05, 2014: Added tests for schema-gen-scripts-external project by Roberto Cortez
                                                                        • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                                        • Oct 30, 2013: Adding more descriptive output statement by Arun Gupta
                                                                        • Oct 30, 2013: Changing the location to match local machine by Arun Gupta
                                                                        • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                                                        • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                                                        How to help improve this sample
                                                                        The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                        git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                        cd javaee7-samples/jpa/schema-gen-scripts-external/

                                                                        Do the changes as you see fit and send a pull request!

                                                                        Good Luck!

                                                                        + \ No newline at end of file diff --git a/sample/jpa-schema-gen-scripts-generate/index.html b/sample/jpa-schema-gen-scripts-generate/index.html new file mode 100644 index 0000000..2dd6885 --- /dev/null +++ b/sample/jpa-schema-gen-scripts-generate/index.html @@ -0,0 +1,56 @@ +JavaEE Sample::JPA::Schema gen scripts generate

                                                                        Schema gen scripts generate

                                                                        Run
                                                                        How to run the sample
                                                                        The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                        git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                        cd javaee7-samples/jpa/schema-gen-scripts-generate/
                                                                        Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                        mvn test
                                                                        Or you can run individual tests by executing one of the following:
                                                                        mvn test -Dtest=SchemaGenScriptsTest

                                                                        • Specifications in use:
                                                                          • JPA

                                                                          SchemaGenScriptsTest

                                                                          Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                                                          Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                                                          +
                                                                          +
                                                                          @Deployment
                                                                          +public static WebArchive createDeployment() {
                                                                          +    WebArchive war = ShrinkWrap.create(WebArchive.class)
                                                                          +                               .addPackage("org.javaee7.jpasamples.schema.gen.scripts.generate")
                                                                          +                               .addAsResource("META-INF/persistence.xml");
                                                                          +    System.out.println(war.toString(true));
                                                                          +    return war;
                                                                          +}
                                                                          +
                                                                          +
                                                                          Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                          +
                                                                          +
                                                                          @Test
                                                                          +public void testSchemaGenIndex() throws Exception {
                                                                          +    Path create = Paths.get("/tmp/create.sql");
                                                                          +    assertTrue(Files.exists(create));
                                                                          +
                                                                          +    Path drop = Paths.get("/tmp/drop.sql");
                                                                          +    assertTrue(Files.exists(create));
                                                                          +
                                                                          +    String line;
                                                                          +    BufferedReader reader = Files.newBufferedReader(create, Charset.defaultCharset());
                                                                          +    boolean createGenerated = false;
                                                                          +    while ((line = reader.readLine()) != null) {
                                                                          +        if (line.toLowerCase().contains("create table employee_schema_gen_scripts_generate")) {
                                                                          +            createGenerated = true;
                                                                          +        }
                                                                          +    }
                                                                          +
                                                                          +    reader = Files.newBufferedReader(drop, Charset.defaultCharset());
                                                                          +    boolean dropGenerated = false;
                                                                          +    while ((line = reader.readLine()) != null) {
                                                                          +        if (line.toLowerCase().contains("drop table employee_schema_gen_scripts_generate")) {
                                                                          +            dropGenerated = true;
                                                                          +            break;
                                                                          +        }
                                                                          +    }
                                                                          +
                                                                          +    assertTrue(createGenerated);
                                                                          +    assertTrue(dropGenerated);
                                                                          +}
                                                                          +
                                                                          +

                                                                          Share the Knowledge

                                                                          Find this sample useful? Share on

                                                                          There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                          Help Improve

                                                                          Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                          Recent Changelog

                                                                          • Dec 05, 2014: Added tests for schema-gen-scripts-generate project by Roberto Cortez
                                                                          • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                                          • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                                                          • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                                                          How to help improve this sample
                                                                          The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                          git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                          cd javaee7-samples/jpa/schema-gen-scripts-generate/

                                                                          Do the changes as you see fit and send a pull request!

                                                                          Good Luck!

                                                                          + \ No newline at end of file diff --git a/sample/jpa-schema-gen-scripts/index.html b/sample/jpa-schema-gen-scripts/index.html new file mode 100644 index 0000000..30bf175 --- /dev/null +++ b/sample/jpa-schema-gen-scripts/index.html @@ -0,0 +1,44 @@ +JavaEE Sample::JPA::Schema gen scripts

                                                                          Schema gen scripts

                                                                          Run
                                                                          How to run the sample
                                                                          The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                          git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                          cd javaee7-samples/jpa/schema-gen-scripts/
                                                                          Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                          mvn test
                                                                          Or you can run individual tests by executing one of the following:
                                                                          mvn test -Dtest=EmployeeBeanTest

                                                                          EmployeeBeanTest

                                                                          Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                                                          Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                                                          +
                                                                          +
                                                                          @Deployment
                                                                          +public static WebArchive createDeployment() {
                                                                          +    return ShrinkWrap.create(WebArchive.class)
                                                                          +            .addClasses(Employee.class,
                                                                          +                    EmployeeBean.class)
                                                                          +            .addAsResource("META-INF/persistence.xml")
                                                                          +            .addAsResource("META-INF/create.sql")
                                                                          +            .addAsResource("META-INF/load.sql")
                                                                          +            .addAsResource("META-INF/drop.sql");
                                                                          +}
                                                                          +
                                                                          +
                                                                          Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                          +
                                                                          +
                                                                          @Test
                                                                          +public void testGet() throws Exception {
                                                                          +    assertNotNull(bean);
                                                                          +    List<Employee> list = bean.get();
                                                                          +    assertNotNull(list);
                                                                          +    assertEquals(8, list.size());
                                                                          +    assertFalse(list.contains(new Employee("Penny")));
                                                                          +    assertFalse(list.contains(new Employee("Sheldon")));
                                                                          +    assertFalse(list.contains(new Employee("Amy")));
                                                                          +    assertFalse(list.contains(new Employee("Leonard")));
                                                                          +    assertFalse(list.contains(new Employee("Bernadette")));
                                                                          +    assertFalse(list.contains(new Employee("Raj")));
                                                                          +    assertFalse(list.contains(new Employee("Howard")));
                                                                          +    assertFalse(list.contains(new Employee("Priya")));
                                                                          +}
                                                                          +
                                                                          +

                                                                          Share the Knowledge

                                                                          Find this sample useful? Share on

                                                                          There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                          Help Improve

                                                                          Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                          Recent Changelog

                                                                          • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                                          • Dec 05, 2013: Adding arquillian test by arun-gupta
                                                                          • Nov 09, 2013: Removing a redundant method by Arun Gupta
                                                                          • Nov 09, 2013: Removing try-with-resources to allow any errors to show up on servletoutputstream by Arun Gupta
                                                                          • Nov 09, 2013: Fixed a typo by Arun Gupta
                                                                          • Oct 30, 2013: Adding more descriptive output statement by Arun Gupta
                                                                          • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                                                          • Aug 29, 2013: Better output messages by Arun Gupta
                                                                          • Aug 29, 2013: Fixed the schema-generation.database.action property value by Arun Gupta
                                                                          • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                                                          How to help improve this sample
                                                                          The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                          git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                          cd javaee7-samples/jpa/schema-gen-scripts/

                                                                          Do the changes as you see fit and send a pull request!

                                                                          Good Luck!

                                                                          + \ No newline at end of file diff --git a/sample/jpa-storedprocedure/index.html b/sample/jpa-storedprocedure/index.html new file mode 100644 index 0000000..1765204 --- /dev/null +++ b/sample/jpa-storedprocedure/index.html @@ -0,0 +1,37 @@ +JavaEE Sample::JPA::Storedprocedure

                                                                          Storedprocedure

                                                                          Run
                                                                          How to run the sample
                                                                          The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                          git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                          cd javaee7-samples/jpa/storedprocedure/
                                                                          Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                          mvn test
                                                                          Or you can run individual tests by executing one of the following:
                                                                          mvn test -Dtest=StoredProcedureTest

                                                                          StoredProcedureTest

                                                                          Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                                                          Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                                                          +
                                                                          +
                                                                          @Deployment
                                                                          +public static WebArchive createDeployment() {
                                                                          +    WebArchive war = ShrinkWrap.create(WebArchive.class)
                                                                          +                               .addPackage("org.javaee7.jpa.storedprocedure")
                                                                          +                               .addAsResource("META-INF/persistence.xml")
                                                                          +                               .addAsResource("META-INF/create.sql")
                                                                          +                               .addAsResource("META-INF/drop.sql")
                                                                          +                               .addAsResource("META-INF/load.sql");
                                                                          +    System.out.println(war.toString(true));
                                                                          +    return war;
                                                                          +}
                                                                          +
                                                                          +
                                                                          Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                          +
                                                                          +
                                                                          @Test
                                                                          +public void testStoredProcedure() throws Exception {
                                                                          +    List<Movie> movies = movieBean.listMovies();
                                                                          +    assertFalse(movies.isEmpty());
                                                                          +
                                                                          +    //movieBean.executeStoredProcedure();
                                                                          +}
                                                                          +
                                                                          +

                                                                          Share the Knowledge

                                                                          Find this sample useful? Share on

                                                                          There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                          Help Improve

                                                                          Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                          Recent Changelog

                                                                          • Dec 08, 2014: Added tests for storedprocedure project by Roberto Cortez
                                                                          • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                                          • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                                                          • Sep 15, 2013: Adding netbeans confgiguration file by Arun Gupta
                                                                          • Sep 12, 2013: Adding a boilerplate testservlet, tbd: how to invoke storedprocedure by Arun Gupta
                                                                          • Sep 12, 2013: Fixing namespace from java.sun.com -> xmlns.jcp.org by Arun Gupta
                                                                          • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                                                          How to help improve this sample
                                                                          The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                          git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                          cd javaee7-samples/jpa/storedprocedure/

                                                                          Do the changes as you see fit and send a pull request!

                                                                          Good Luck!

                                                                          + \ No newline at end of file diff --git a/sample/jpa-unsynchronized-pc/index.html b/sample/jpa-unsynchronized-pc/index.html new file mode 100644 index 0000000..f652b40 --- /dev/null +++ b/sample/jpa-unsynchronized-pc/index.html @@ -0,0 +1,13 @@ +JavaEE Sample::JPA::Unsynchronized pc

                                                                          Unsynchronized pc

                                                                          Run
                                                                          How to run the sample
                                                                          The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                          git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                          cd javaee7-samples/jpa/unsynchronized-pc/
                                                                          Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                          mvn test
                                                                          Or you can run individual tests by executing one of the following:

                                                                          Missing a story. Add a test case.Show me how!

                                                                          Share the Knowledge

                                                                          Find this sample useful? Share on

                                                                          There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                          Help Improve

                                                                          Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                          Recent Changelog

                                                                          • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                                          • Nov 09, 2013: Better output statements by Arun Gupta
                                                                          • Nov 09, 2013: Adding a new sample to demonstrate unsynchronized pc by Arun Gupta
                                                                          How to help improve this sample
                                                                          The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                          git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                          cd javaee7-samples/jpa/unsynchronized-pc/

                                                                          Do the changes as you see fit and send a pull request!

                                                                          Good Luck!

                                                                          + \ No newline at end of file diff --git a/sample/jsf-ajax/index.html b/sample/jsf-ajax/index.html new file mode 100644 index 0000000..b1d35cf --- /dev/null +++ b/sample/jsf-ajax/index.html @@ -0,0 +1,13 @@ +JavaEE Sample::JSF::Ajax

                                                                          Ajax

                                                                          Run
                                                                          How to run the sample
                                                                          The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                          git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                          cd javaee7-samples/jsf/ajax/
                                                                          Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                          mvn test
                                                                          Or you can run individual tests by executing one of the following:

                                                                          Missing a story. Add a test case.Show me how!

                                                                          Share the Knowledge

                                                                          Find this sample useful? Share on

                                                                          There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                          Help Improve

                                                                          Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                          Recent Changelog

                                                                          • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                                          • Oct 27, 2013: Adding prompts on what needs to be entered by Arun Gupta
                                                                          • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                                                          • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                                                          How to help improve this sample
                                                                          The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                          git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                          cd javaee7-samples/jsf/ajax/

                                                                          Do the changes as you see fit and send a pull request!

                                                                          Good Luck!

                                                                          + \ No newline at end of file diff --git a/sample/jsf-bean-validation/index.html b/sample/jsf-bean-validation/index.html new file mode 100644 index 0000000..ab60177 --- /dev/null +++ b/sample/jsf-bean-validation/index.html @@ -0,0 +1,143 @@ +JavaEE Sample::JSF::Bean validation

                                                                          Bean validation

                                                                          Run
                                                                          How to run the sample
                                                                          The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                          git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                          cd javaee7-samples/jsf/bean-validation/
                                                                          Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                          mvn test
                                                                          Or you can run individual tests by executing one of the following:
                                                                          mvn test -Dtest=MyBeanTest

                                                                          MyBeanTest

                                                                          Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                                                          Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                                                          +
                                                                          +
                                                                          @Deployment(testable = false)
                                                                          +public static WebArchive createDeployment() {
                                                                          +    return ShrinkWrap.create(WebArchive.class).
                                                                          +            addClass(MyBean.class)
                                                                          +            .addAsWebResource(new File(WEBAPP_SRC, "index.xhtml"))
                                                                          +            .addAsWebInfResource(new File(WEBAPP_SRC + "/WEB-INF", "web.xml"));
                                                                          +}
                                                                          +
                                                                          +
                                                                          Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                          +
                                                                          +
                                                                          @Test
                                                                          +public void testNameLessCharacters() throws IOException {
                                                                          +    nameInputText.setText("ab");
                                                                          +    ageInputText.setText("20");
                                                                          +    zipInputText.setText("12345");
                                                                          +    HtmlPage result = button.click();
                                                                          +    HtmlSpan span = (HtmlSpan)result.getElementById("nameMessage");
                                                                          +    assertEquals("At least 3 characters", span.asText());
                                                                          +}
                                                                          +
                                                                          +
                                                                          Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                          +
                                                                          +
                                                                          @Test
                                                                          +public void testNameBoundary() throws IOException {
                                                                          +    nameInputText.setText("abc");
                                                                          +    ageInputText.setText("20");
                                                                          +    zipInputText.setText("12345");
                                                                          +    HtmlPage result = button.click();
                                                                          +    HtmlSpan span = (HtmlSpan)result.getElementById("nameMessage");
                                                                          +    assertEquals("", span.asText());
                                                                          +}
                                                                          +
                                                                          +
                                                                          Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                          +
                                                                          +
                                                                          @Test
                                                                          +public void testAgeLessThan() throws IOException {
                                                                          +    nameInputText.setText("abc");
                                                                          +    ageInputText.setText("16");
                                                                          +    zipInputText.setText("12345");
                                                                          +    HtmlPage result = button.click();
                                                                          +    HtmlSpan span = (HtmlSpan)result.getElementById("ageMessage");
                                                                          +    assertEquals("must be greater than or equal to 18", span.asText());
                                                                          +}
                                                                          +
                                                                          +
                                                                          Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                          +
                                                                          +
                                                                          @Test
                                                                          +public void testAgeLowBoundary() throws IOException {
                                                                          +    nameInputText.setText("abc");
                                                                          +    ageInputText.setText("18");
                                                                          +    zipInputText.setText("12345");
                                                                          +    HtmlPage result = button.click();
                                                                          +    HtmlSpan span = (HtmlSpan)result.getElementById("ageMessage");
                                                                          +    assertEquals("", span.asText());
                                                                          +}
                                                                          +
                                                                          +
                                                                          Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                          +
                                                                          +
                                                                          @Test
                                                                          +public void testAgeHighBoundary() throws IOException {
                                                                          +    nameInputText.setText("abc");
                                                                          +    ageInputText.setText("25");
                                                                          +    zipInputText.setText("12345");
                                                                          +    HtmlPage result = button.click();
                                                                          +    HtmlSpan span = (HtmlSpan)result.getElementById("ageMessage");
                                                                          +    assertEquals("", span.asText());
                                                                          +}
                                                                          +
                                                                          +
                                                                          Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                          +
                                                                          +
                                                                          @Test
                                                                          +public void testAgeGreaterThan() throws IOException {
                                                                          +    nameInputText.setText("abc");
                                                                          +    ageInputText.setText("26");
                                                                          +    zipInputText.setText("12345");
                                                                          +    HtmlPage result = button.click();
                                                                          +    HtmlSpan span = (HtmlSpan)result.getElementById("ageMessage");
                                                                          +    assertEquals("must be less than or equal to 25", span.asText());
                                                                          +}
                                                                          +
                                                                          +
                                                                          Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                          +
                                                                          +
                                                                          @Test
                                                                          +public void testZipAlphabets() throws IOException {
                                                                          +    nameInputText.setText("abc");
                                                                          +    ageInputText.setText("20");
                                                                          +    zipInputText.setText("abcde");
                                                                          +    HtmlPage result = button.click();
                                                                          +    HtmlSpan span = (HtmlSpan)result.getElementById("zipMessage");
                                                                          +    assertEquals("must match \"[0-9]{5}\"", span.asText());
                                                                          +}
                                                                          +
                                                                          +
                                                                          Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                          +
                                                                          +
                                                                          @Test
                                                                          +public void testZipLessNumbers() throws IOException {
                                                                          +    nameInputText.setText("abc");
                                                                          +    ageInputText.setText("20");
                                                                          +    zipInputText.setText("1234");
                                                                          +    HtmlPage result = button.click();
                                                                          +    HtmlSpan span = (HtmlSpan)result.getElementById("zipMessage");
                                                                          +    assertEquals("must match \"[0-9]{5}\"", span.asText());
                                                                          +}
                                                                          +
                                                                          +
                                                                          Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                          +
                                                                          +
                                                                          @Test
                                                                          +public void testZipMoreNumbers() throws IOException {
                                                                          +    nameInputText.setText("abc");
                                                                          +    ageInputText.setText("20");
                                                                          +    zipInputText.setText("123456");
                                                                          +    HtmlPage result = button.click();
                                                                          +    HtmlSpan span = (HtmlSpan)result.getElementById("zipMessage");
                                                                          +    assertEquals("must match \"[0-9]{5}\"", span.asText());
                                                                          +}
                                                                          +
                                                                          +
                                                                          Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                          +
                                                                          +
                                                                          @Test
                                                                          +public void testZipBoundary() throws IOException {
                                                                          +    nameInputText.setText("abc");
                                                                          +    ageInputText.setText("20");
                                                                          +    zipInputText.setText("12345");
                                                                          +    HtmlPage result = button.click();
                                                                          +    HtmlSpan span = (HtmlSpan)result.getElementById("zipMessage");
                                                                          +    assertEquals("", span.asText());
                                                                          +}
                                                                          +
                                                                          +

                                                                          Share the Knowledge

                                                                          Find this sample useful? Share on

                                                                          There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                          Help Improve

                                                                          Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                          Recent Changelog

                                                                          • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                                          • Dec 20, 2013: Added new tests by arun-gupta
                                                                          • Oct 27, 2013: Adding prompts on what needs to be entered by Arun Gupta
                                                                          • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                                                          • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                                                          How to help improve this sample
                                                                          The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                          git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                          cd javaee7-samples/jsf/bean-validation/

                                                                          Do the changes as you see fit and send a pull request!

                                                                          Good Luck!

                                                                          + \ No newline at end of file diff --git a/sample/jsf-components/index.html b/sample/jsf-components/index.html new file mode 100644 index 0000000..5940ea8 --- /dev/null +++ b/sample/jsf-components/index.html @@ -0,0 +1,13 @@ +JavaEE Sample::JSF::Components

                                                                          Components

                                                                          Run
                                                                          How to run the sample
                                                                          The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                          git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                          cd javaee7-samples/jsf/components/
                                                                          Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                          mvn test
                                                                          Or you can run individual tests by executing one of the following:

                                                                          • Specifications in use:
                                                                            • CDI
                                                                            Missing a story. Add a test case.Show me how!

                                                                            Share the Knowledge

                                                                            Find this sample useful? Share on

                                                                            There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                            Help Improve

                                                                            Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                            Recent Changelog

                                                                            • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                                                            • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                                                            How to help improve this sample
                                                                            The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                            git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                            cd javaee7-samples/jsf/components/

                                                                            Do the changes as you see fit and send a pull request!

                                                                            Good Luck!

                                                                            + \ No newline at end of file diff --git a/sample/jsf-composite-component/index.html b/sample/jsf-composite-component/index.html new file mode 100644 index 0000000..a2a8236 --- /dev/null +++ b/sample/jsf-composite-component/index.html @@ -0,0 +1,13 @@ +JavaEE Sample::JSF::Composite component

                                                                            Composite component

                                                                            Run
                                                                            How to run the sample
                                                                            The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                            git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                            cd javaee7-samples/jsf/composite-component/
                                                                            Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                            mvn test
                                                                            Or you can run individual tests by executing one of the following:

                                                                            • Specifications in use:
                                                                              • CDI
                                                                              Missing a story. Add a test case.Show me how!

                                                                              Share the Knowledge

                                                                              Find this sample useful? Share on

                                                                              There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                              Help Improve

                                                                              Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                              Recent Changelog

                                                                              • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                                              • Jan 31, 2014: Some minor jsf fixes by Tomas Remes
                                                                              • Nov 19, 2013: Minor changes to get rid out of red code in intellij idea by cheptsov
                                                                              • Oct 27, 2013: Added better titles by Arun Gupta
                                                                              • Oct 27, 2013: Fixed a composite component parameter name by Arun Gupta
                                                                              • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                                                              • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                                                              How to help improve this sample
                                                                              The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                              git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                              cd javaee7-samples/jsf/composite-component/

                                                                              Do the changes as you see fit and send a pull request!

                                                                              Good Luck!

                                                                              + \ No newline at end of file diff --git a/sample/jsf-contracts-library-impl/index.html b/sample/jsf-contracts-library-impl/index.html new file mode 100644 index 0000000..f376cbe --- /dev/null +++ b/sample/jsf-contracts-library-impl/index.html @@ -0,0 +1,13 @@ +JavaEE Sample::JSF::Contracts library impl

                                                                              Contracts library impl

                                                                              Run
                                                                              How to run the sample
                                                                              The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                              git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                              cd javaee7-samples/jsf/contracts-library-impl/
                                                                              Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                              mvn test
                                                                              Or you can run individual tests by executing one of the following:

                                                                              Missing a story. Add a test case.Show me how!

                                                                              Share the Knowledge

                                                                              Find this sample useful? Share on

                                                                              There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                              Help Improve

                                                                              Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                              Recent Changelog

                                                                              • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                                                              How to help improve this sample
                                                                              The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                              git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                              cd javaee7-samples/jsf/contracts-library-impl/

                                                                              Do the changes as you see fit and send a pull request!

                                                                              Good Luck!

                                                                              + \ No newline at end of file diff --git a/sample/jsf-contracts-library/index.html b/sample/jsf-contracts-library/index.html new file mode 100644 index 0000000..7c517c4 --- /dev/null +++ b/sample/jsf-contracts-library/index.html @@ -0,0 +1,13 @@ +JavaEE Sample::JSF::Contracts library

                                                                              Contracts library

                                                                              Run
                                                                              How to run the sample
                                                                              The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                              git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                              cd javaee7-samples/jsf/contracts-library/
                                                                              Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                              mvn test
                                                                              Or you can run individual tests by executing one of the following:

                                                                              Missing a story. Add a test case.Show me how!

                                                                              Share the Knowledge

                                                                              Find this sample useful? Share on

                                                                              There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                              Help Improve

                                                                              Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                              Recent Changelog

                                                                              • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                                              • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                                                              • Sep 12, 2013: Fixing namespace from java.sun.com -> xmlns.jcp.org and using servlet 3.1 schema by Arun Gupta
                                                                              • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                                                              How to help improve this sample
                                                                              The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                              git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                              cd javaee7-samples/jsf/contracts-library/

                                                                              Do the changes as you see fit and send a pull request!

                                                                              Good Luck!

                                                                              + \ No newline at end of file diff --git a/sample/jsf-contracts/index.html b/sample/jsf-contracts/index.html new file mode 100644 index 0000000..4dcdb8a --- /dev/null +++ b/sample/jsf-contracts/index.html @@ -0,0 +1,13 @@ +JavaEE Sample::JSF::Contracts

                                                                              Contracts

                                                                              Run
                                                                              How to run the sample
                                                                              The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                              git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                              cd javaee7-samples/jsf/contracts/
                                                                              Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                              mvn test
                                                                              Or you can run individual tests by executing one of the following:

                                                                              • Specifications in use:
                                                                                • CDI
                                                                                Missing a story. Add a test case.Show me how!

                                                                                Share the Knowledge

                                                                                Find this sample useful? Share on

                                                                                There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                                Help Improve

                                                                                Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                                Recent Changelog

                                                                                • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                                                • Nov 19, 2013: Minor changes to get rid out of red code in intellij idea by cheptsov
                                                                                • Sep 12, 2013: Fixing a typo by Arun Gupta
                                                                                • Sep 12, 2013: Fixing namespace from java.sun.com -> xmlns.jcp.org and using servlet 3.1 schema by Arun Gupta
                                                                                • Sep 12, 2013: Using cdi 1.1 "all" style beans.xml by Arun Gupta
                                                                                • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                                                                How to help improve this sample
                                                                                The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                cd javaee7-samples/jsf/contracts/

                                                                                Do the changes as you see fit and send a pull request!

                                                                                Good Luck!

                                                                                + \ No newline at end of file diff --git a/sample/jsf-file-upload/index.html b/sample/jsf-file-upload/index.html new file mode 100644 index 0000000..54f250c --- /dev/null +++ b/sample/jsf-file-upload/index.html @@ -0,0 +1,13 @@ +JavaEE Sample::JSF::File upload

                                                                                File upload

                                                                                Run
                                                                                How to run the sample
                                                                                The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                cd javaee7-samples/jsf/file-upload/
                                                                                Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                                mvn test
                                                                                Or you can run individual tests by executing one of the following:

                                                                                Missing a story. Add a test case.Show me how!

                                                                                Share the Knowledge

                                                                                Find this sample useful? Share on

                                                                                There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                                Help Improve

                                                                                Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                                Recent Changelog

                                                                                • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                                                • Oct 27, 2013: Added more debugging statements by Arun Gupta
                                                                                • Oct 27, 2013: Fixing the action of a button by Arun Gupta
                                                                                • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                                                                • Sep 12, 2013: Fixing namespace from java.sun.com -> xmlns.jcp.org and using servlet 3.1 schema. also added copyright by Arun Gupta
                                                                                • Sep 12, 2013: Using cdi 1.1 "all" style beans.xml by Arun Gupta
                                                                                • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                                                                How to help improve this sample
                                                                                The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                cd javaee7-samples/jsf/file-upload/

                                                                                Do the changes as you see fit and send a pull request!

                                                                                Good Luck!

                                                                                + \ No newline at end of file diff --git a/sample/jsf-flows-declarative/index.html b/sample/jsf-flows-declarative/index.html new file mode 100644 index 0000000..5e7e1fa --- /dev/null +++ b/sample/jsf-flows-declarative/index.html @@ -0,0 +1,13 @@ +JavaEE Sample::JSF::Flows declarative

                                                                                Flows declarative

                                                                                Run
                                                                                How to run the sample
                                                                                The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                cd javaee7-samples/jsf/flows-declarative/
                                                                                Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                                mvn test
                                                                                Or you can run individual tests by executing one of the following:

                                                                                Missing a story. Add a test case.Show me how!

                                                                                Share the Knowledge

                                                                                Find this sample useful? Share on

                                                                                There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                                Help Improve

                                                                                Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                                Recent Changelog

                                                                                • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                                                • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                                                                • Sep 12, 2013: Fixing namespace from java.sun.com -> xmlns.jcp.org and using servlet 3.1 schema by Arun Gupta
                                                                                • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                                                                How to help improve this sample
                                                                                The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                cd javaee7-samples/jsf/flows-declarative/

                                                                                Do the changes as you see fit and send a pull request!

                                                                                Good Luck!

                                                                                + \ No newline at end of file diff --git a/sample/jsf-flows-mixed/index.html b/sample/jsf-flows-mixed/index.html new file mode 100644 index 0000000..578bab5 --- /dev/null +++ b/sample/jsf-flows-mixed/index.html @@ -0,0 +1,13 @@ +JavaEE Sample::JSF::Flows mixed

                                                                                Flows mixed

                                                                                Run
                                                                                How to run the sample
                                                                                The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                cd javaee7-samples/jsf/flows-mixed/
                                                                                Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                                mvn test
                                                                                Or you can run individual tests by executing one of the following:

                                                                                Missing a story. Add a test case.Show me how!

                                                                                Share the Knowledge

                                                                                Find this sample useful? Share on

                                                                                There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                                Help Improve

                                                                                Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                                Recent Changelog

                                                                                • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                                                • Nov 19, 2013: Minor changes to get rid out of red code in intellij idea by cheptsov
                                                                                • Sep 12, 2013: Fixing namespace from java.sun.com -> xmlns.jcp.org and using servlet 3.1 schema by Arun Gupta
                                                                                • Sep 12, 2013: Using cdi 1.1 "all" style beans.xml and fixing namespace from java.sun.com -> xmlns.jcp.org by Arun Gupta
                                                                                • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                                                                How to help improve this sample
                                                                                The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                cd javaee7-samples/jsf/flows-mixed/

                                                                                Do the changes as you see fit and send a pull request!

                                                                                Good Luck!

                                                                                + \ No newline at end of file diff --git a/sample/jsf-flows-programmatic/index.html b/sample/jsf-flows-programmatic/index.html new file mode 100644 index 0000000..973b5f1 --- /dev/null +++ b/sample/jsf-flows-programmatic/index.html @@ -0,0 +1,13 @@ +JavaEE Sample::JSF::Flows programmatic

                                                                                Flows programmatic

                                                                                Run
                                                                                How to run the sample
                                                                                The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                cd javaee7-samples/jsf/flows-programmatic/
                                                                                Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                                mvn test
                                                                                Or you can run individual tests by executing one of the following:

                                                                                Missing a story. Add a test case.Show me how!

                                                                                Share the Knowledge

                                                                                Find this sample useful? Share on

                                                                                There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                                Help Improve

                                                                                Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                                Recent Changelog

                                                                                • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                                                • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                                                                • Sep 12, 2013: Fixing namespace from java.sun.com -> xmlns.jcp.org and using servlet 3.1 schema by Arun Gupta
                                                                                • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                                                                How to help improve this sample
                                                                                The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                cd javaee7-samples/jsf/flows-programmatic/

                                                                                Do the changes as you see fit and send a pull request!

                                                                                Good Luck!

                                                                                + \ No newline at end of file diff --git a/sample/jsf-flows-simple/index.html b/sample/jsf-flows-simple/index.html new file mode 100644 index 0000000..afb4c94 --- /dev/null +++ b/sample/jsf-flows-simple/index.html @@ -0,0 +1,13 @@ +JavaEE Sample::JSF::Flows simple

                                                                                Flows simple

                                                                                Run
                                                                                How to run the sample
                                                                                The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                cd javaee7-samples/jsf/flows-simple/
                                                                                Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                                mvn test
                                                                                Or you can run individual tests by executing one of the following:

                                                                                Missing a story. Add a test case.Show me how!

                                                                                Share the Knowledge

                                                                                Find this sample useful? Share on

                                                                                There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                                Help Improve

                                                                                Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                                Recent Changelog

                                                                                • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                                                • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                                                                • Sep 12, 2013: Fixing namespace from java.sun.com -> xmlns.jcp.org and using servlet 3.1 schema by Arun Gupta
                                                                                • Aug 30, 2013: Added netbeans configuration file by Arun Gupta
                                                                                • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                                                                How to help improve this sample
                                                                                The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                cd javaee7-samples/jsf/flows-simple/

                                                                                Do the changes as you see fit and send a pull request!

                                                                                Good Luck!

                                                                                + \ No newline at end of file diff --git a/sample/jsf-http-get/index.html b/sample/jsf-http-get/index.html new file mode 100644 index 0000000..8d80432 --- /dev/null +++ b/sample/jsf-http-get/index.html @@ -0,0 +1,72 @@ +JavaEE Sample::JSF::Http get

                                                                                Http get

                                                                                Run
                                                                                How to run the sample
                                                                                The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                cd javaee7-samples/jsf/http-get/
                                                                                Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                                mvn test
                                                                                Or you can run individual tests by executing one of the following:
                                                                                mvn test -Dtest=UserTest

                                                                                UserTest

                                                                                Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                                                                Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                                                                +
                                                                                +
                                                                                @Deployment(testable = false)
                                                                                +public static WebArchive createDeployment() {
                                                                                +    return ShrinkWrap.create(WebArchive.class).
                                                                                +            addClass(User.class)
                                                                                +            .addAsWebResource(new File(WEBAPP_SRC, "index.xhtml"))
                                                                                +            .addAsWebResource(new File(WEBAPP_SRC, "index2.xhtml"))
                                                                                +            .addAsWebResource(new File(WEBAPP_SRC, "login.xhtml"))
                                                                                +            .addAsWebInfResource(new File(WEBAPP_SRC + "/WEB-INF", "web.xml"))
                                                                                +            .addAsWebInfResource(new File(WEBAPP_SRC + "/WEB-INF", "beans.xml"));
                                                                                +}
                                                                                +
                                                                                +
                                                                                Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                +
                                                                                +
                                                                                @Test
                                                                                +public void testLink() throws IOException {
                                                                                +    HtmlAnchor anchor = (HtmlAnchor)page.getElementById("link1");
                                                                                +    assertTrue(anchor.getHrefAttribute().contains("faces/login.xhtml"));
                                                                                +    assertEquals("Login1", anchor.asText());
                                                                                +
                                                                                +    HtmlPage output = anchor.click();
                                                                                +    assertEquals("HTTP GET (Login)", output.getTitleText());
                                                                                +}
                                                                                +
                                                                                +
                                                                                Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                +
                                                                                +
                                                                                @Test
                                                                                +public void testLinkWithParam() throws IOException {
                                                                                +    HtmlAnchor anchor = (HtmlAnchor)page.getElementById("link2");
                                                                                +    assertTrue(anchor.getHrefAttribute().contains("faces/login.xhtml"));
                                                                                +    assertTrue(anchor.getHrefAttribute().contains("?name=Jack"));
                                                                                +    assertEquals("Login2", anchor.asText());
                                                                                +
                                                                                +    HtmlPage output = anchor.click();
                                                                                +    assertEquals("HTTP GET (Login)", output.getTitleText());
                                                                                +}
                                                                                +
                                                                                +
                                                                                Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                +
                                                                                +
                                                                                @Test
                                                                                +public void testLinkWithPreProcessParams() {
                                                                                +    HtmlAnchor anchor = (HtmlAnchor)page.getElementById("link3");
                                                                                +    assertEquals("Login3", anchor.asText());
                                                                                +    assertTrue(anchor.getHrefAttribute().contains("faces/index2.xhtml"));
                                                                                +    assertTrue(anchor.getHrefAttribute().contains("?name=Jack"));
                                                                                +}
                                                                                +
                                                                                +
                                                                                Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                +
                                                                                +
                                                                                @Test
                                                                                +public void testButton() throws IOException {
                                                                                +    HtmlButtonInput button = (HtmlButtonInput)page.getElementById("button1");
                                                                                +    assertEquals("Login4", button.asText());
                                                                                +
                                                                                +    HtmlPage output = button.click();
                                                                                +    assertEquals("HTTP GET (Login)", output.getTitleText());
                                                                                +}
                                                                                +
                                                                                +

                                                                                Share the Knowledge

                                                                                Find this sample useful? Share on

                                                                                There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                                Help Improve

                                                                                Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                                Recent Changelog

                                                                                • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                                                • Dec 20, 2013: Added new tests by arun-gupta
                                                                                • Dec 20, 2013: Removing and by arun-gupta
                                                                                • Oct 27, 2013: Adding more descriptive output statement by Arun Gupta
                                                                                • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                                                                • Aug 29, 2013: Reordered some elements for a logical order by Arun Gupta
                                                                                • Aug 29, 2013: Added a comment about method signatures by Arun Gupta
                                                                                • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                                                                How to help improve this sample
                                                                                The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                cd javaee7-samples/jsf/http-get/

                                                                                Do the changes as you see fit and send a pull request!

                                                                                Good Luck!

                                                                                + \ No newline at end of file diff --git a/sample/jsf-passthrough/index.html b/sample/jsf-passthrough/index.html new file mode 100644 index 0000000..3259c9b --- /dev/null +++ b/sample/jsf-passthrough/index.html @@ -0,0 +1,13 @@ +JavaEE Sample::JSF::Passthrough

                                                                                Passthrough

                                                                                Run
                                                                                How to run the sample
                                                                                The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                cd javaee7-samples/jsf/passthrough/
                                                                                Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                                mvn test
                                                                                Or you can run individual tests by executing one of the following:

                                                                                • Specifications in use:
                                                                                  • CDI
                                                                                  Missing a story. Add a test case.Show me how!

                                                                                  Share the Knowledge

                                                                                  Find this sample useful? Share on

                                                                                  There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                                  Help Improve

                                                                                  Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                                  Recent Changelog

                                                                                  • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                                                  • Nov 08, 2013: Fixing typo by Arun Gupta
                                                                                  • Oct 27, 2013: Adding more descriptive output statement by Arun Gupta
                                                                                  • Oct 27, 2013: Adding more descriptive output statement by Arun Gupta
                                                                                  • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                                                                  • Sep 12, 2013: Fixing namespace from java.sun.com -> xmlns.jcp.org and using servlet 3.1 schema. also added copyright by Arun Gupta
                                                                                  • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                                                                  How to help improve this sample
                                                                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                  cd javaee7-samples/jsf/passthrough/

                                                                                  Do the changes as you see fit and send a pull request!

                                                                                  Good Luck!

                                                                                  + \ No newline at end of file diff --git a/sample/jsf-radio-buttons/index.html b/sample/jsf-radio-buttons/index.html new file mode 100644 index 0000000..d2d1669 --- /dev/null +++ b/sample/jsf-radio-buttons/index.html @@ -0,0 +1,13 @@ +JavaEE Sample::JSF::Radio buttons

                                                                                  Radio buttons

                                                                                  Run
                                                                                  How to run the sample
                                                                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                  cd javaee7-samples/jsf/radio-buttons/
                                                                                  Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                                  mvn test
                                                                                  Or you can run individual tests by executing one of the following:

                                                                                  Missing a story. Add a test case.Show me how!

                                                                                  Share the Knowledge

                                                                                  Find this sample useful? Share on

                                                                                  There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                                  Help Improve

                                                                                  Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                                  Recent Changelog

                                                                                  • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                                                  • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                                                                  • Sep 12, 2013: Removing metadata-complete by Arun Gupta
                                                                                  • Sep 12, 2013: Fixing namespace from java.sun.com -> xmlns.jcp.org and using servlet 3.1 schema. also added copyright by Arun Gupta
                                                                                  • Sep 12, 2013: Using cdi 1.1 "all" style beans.xml by Arun Gupta
                                                                                  • Sep 12, 2013: Fixed the package name by Arun Gupta
                                                                                  • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                                                                  How to help improve this sample
                                                                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                  cd javaee7-samples/jsf/radio-buttons/

                                                                                  Do the changes as you see fit and send a pull request!

                                                                                  Good Luck!

                                                                                  + \ No newline at end of file diff --git a/sample/jsf-resource-handling/index.html b/sample/jsf-resource-handling/index.html new file mode 100644 index 0000000..5959283 --- /dev/null +++ b/sample/jsf-resource-handling/index.html @@ -0,0 +1,13 @@ +JavaEE Sample::JSF::Resource handling

                                                                                  Resource handling

                                                                                  Run
                                                                                  How to run the sample
                                                                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                  cd javaee7-samples/jsf/resource-handling/
                                                                                  Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                                  mvn test
                                                                                  Or you can run individual tests by executing one of the following:

                                                                                  Missing a story. Add a test case.Show me how!

                                                                                  Share the Knowledge

                                                                                  Find this sample useful? Share on

                                                                                  There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                                  Help Improve

                                                                                  Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                                  Recent Changelog

                                                                                  • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                                                  • Nov 19, 2013: Minor changes to get rid out of red code in intellij idea by cheptsov
                                                                                  • Oct 27, 2013: Changed the text from glassfish to wildfly by Arun Gupta
                                                                                  • Oct 27, 2013: Replacing glassfish logo with wildfly by Arun Gupta
                                                                                  • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                                                                  • Sep 12, 2013: Removing metadata-complete and slight formatting by Arun Gupta
                                                                                  • Sep 12, 2013: Fixing namespace from java.sun.com -> xmlns.jcp.org and using servlet 3.1 schema. also added copyright by Arun Gupta
                                                                                  • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                                                                  How to help improve this sample
                                                                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                  cd javaee7-samples/jsf/resource-handling/

                                                                                  Do the changes as you see fit and send a pull request!

                                                                                  Good Luck!

                                                                                  + \ No newline at end of file diff --git a/sample/jsf-server-extension/index.html b/sample/jsf-server-extension/index.html new file mode 100644 index 0000000..b2fda5b --- /dev/null +++ b/sample/jsf-server-extension/index.html @@ -0,0 +1,13 @@ +JavaEE Sample::JSF::Server extension

                                                                                  Server extension

                                                                                  Run
                                                                                  How to run the sample
                                                                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                  cd javaee7-samples/jsf/server-extension/
                                                                                  Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                                  mvn test
                                                                                  Or you can run individual tests by executing one of the following:

                                                                                  Missing a story. Add a test case.Show me how!

                                                                                  Share the Knowledge

                                                                                  Find this sample useful? Share on

                                                                                  There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                                  Help Improve

                                                                                  Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                                  Recent Changelog

                                                                                  • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                                                  • Oct 27, 2013: Adding some debugging statements by Arun Gupta
                                                                                  • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                                                                  • Aug 28, 2013: Throwing appropriate converterexception by Arun Gupta
                                                                                  • Aug 28, 2013: Throwing appropriate validatorexception by Arun Gupta
                                                                                  • Aug 28, 2013: Adding better prompts by Arun Gupta
                                                                                  • Aug 28, 2013: Fixed the attribute from "id" to "validatorid" by Arun Gupta
                                                                                  • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                                                                  How to help improve this sample
                                                                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                  cd javaee7-samples/jsf/server-extension/

                                                                                  Do the changes as you see fit and send a pull request!

                                                                                  Good Luck!

                                                                                  + \ No newline at end of file diff --git a/sample/jsf-simple-facelet/index.html b/sample/jsf-simple-facelet/index.html new file mode 100644 index 0000000..1c6b595 --- /dev/null +++ b/sample/jsf-simple-facelet/index.html @@ -0,0 +1,36 @@ +JavaEE Sample::JSF::Simple facelet

                                                                                  Simple facelet

                                                                                  Run
                                                                                  How to run the sample
                                                                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                  cd javaee7-samples/jsf/simple-facelet/
                                                                                  Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                                  mvn test
                                                                                  Or you can run individual tests by executing one of the following:
                                                                                  mvn test -Dtest=SimpleFaceletTest

                                                                                  SimpleFaceletTest

                                                                                  Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                                                                  Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                                                                  +
                                                                                  +
                                                                                  @Deployment
                                                                                  +public static WebArchive createDeployment() {
                                                                                  +    return ShrinkWrap.create(WebArchive.class)
                                                                                  +            .addClass(CustomerSessionBean.class)
                                                                                  +            .addClass(Name.class)
                                                                                  +            .addAsWebResource(new File(WEBAPP_SRC, "index.xhtml"))
                                                                                  +            .addAsWebResource(new File(WEBAPP_SRC + "resources/css/cssLayout.css"), "resources/css/cssLayout.css")
                                                                                  +            .addAsWebResource(new File(WEBAPP_SRC + "resources/css/default.css"), "resources/css/default.css")
                                                                                  +            .addAsWebInfResource(new File(WEBAPP_SRC, "/WEB-INF/template.xhtml"))
                                                                                  +            .addAsWebInfResource(new File(WEBAPP_SRC + "/WEB-INF", "web.xml"));
                                                                                  +}
                                                                                  +
                                                                                  +
                                                                                  Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                  +
                                                                                  +
                                                                                  @Test
                                                                                  +public void testDataTableRendered(@InitialPage SimpleFaceletPage simpleFaceletPage) {
                                                                                  +    Assert.assertEquals(
                                                                                  +            "The simple facelet was not rendered correctly!",
                                                                                  +            EXPECTED_TABLE_NAMES, simpleFaceletPage.getNames());
                                                                                  +}
                                                                                  +
                                                                                  +

                                                                                  Share the Knowledge

                                                                                  Find this sample useful? Share on

                                                                                  There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                                  Help Improve

                                                                                  Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                                  Recent Changelog

                                                                                  • Oct 05, 2014: #252 fixed arquillian configuration for the jobs by John D. Ament
                                                                                  • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                                                  • Mar 31, 2014: Jsf/simple-facelet - redundant licence header removed by Juraj Huska
                                                                                  • Mar 31, 2014: Profiles for major browsers added by Juraj Huska
                                                                                  • Mar 31, 2014: Graphene dependency moved higher to jsf/pom.xml by Juraj Huska
                                                                                  • Mar 28, 2014: Tests for jsf/simple-facelet added by Juraj Huska
                                                                                  • Oct 27, 2013: Changing glassfish to wildfly by Arun Gupta
                                                                                  • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                                                                  • Sep 12, 2013: Removing metadata-complete and slight formatting by Arun Gupta
                                                                                  • Sep 12, 2013: Fixing namespace from java.sun.com -> xmlns.jcp.org and using servlet 3.1 schema. also added copyright by Arun Gupta
                                                                                  How to help improve this sample
                                                                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                  cd javaee7-samples/jsf/simple-facelet/

                                                                                  Do the changes as you see fit and send a pull request!

                                                                                  Good Luck!

                                                                                  + \ No newline at end of file diff --git a/sample/jsf-viewscoped/index.html b/sample/jsf-viewscoped/index.html new file mode 100644 index 0000000..4f150af --- /dev/null +++ b/sample/jsf-viewscoped/index.html @@ -0,0 +1,13 @@ +JavaEE Sample::JSF::Viewscoped

                                                                                  Viewscoped

                                                                                  Run
                                                                                  How to run the sample
                                                                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                  cd javaee7-samples/jsf/viewscoped/
                                                                                  Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                                  mvn test
                                                                                  Or you can run individual tests by executing one of the following:

                                                                                  • Specifications in use:
                                                                                    • JSF
                                                                                    Missing a story. Add a test case.Show me how!

                                                                                    Share the Knowledge

                                                                                    Find this sample useful? Share on

                                                                                    There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                                    Help Improve

                                                                                    Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                                    Recent Changelog

                                                                                    • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                                                    • Jan 31, 2014: Some minor jsf fixes by Tomas Remes
                                                                                    • Oct 27, 2013: Made the bean serializable by Arun Gupta
                                                                                    • Oct 27, 2013: Fixing next and refresh actions by Arun Gupta
                                                                                    • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                                                                    • Sep 12, 2013: Removing metadata-complete and slight formatting by Arun Gupta
                                                                                    • Sep 12, 2013: Fixing namespace from java.sun.com -> xmlns.jcp.org and using servlet 3.1 schema. also added copyright by Arun Gupta
                                                                                    • Sep 12, 2013: Using cdi 1.1 "all" style beans.xml and fixing namespace from java.sun.com -> xmlns.jcp.org by Arun Gupta
                                                                                    • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                                                                    How to help improve this sample
                                                                                    The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                    git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                    cd javaee7-samples/jsf/viewscoped/

                                                                                    Do the changes as you see fit and send a pull request!

                                                                                    Good Luck!

                                                                                    + \ No newline at end of file diff --git a/sample/json-object-builder/index.html b/sample/json-object-builder/index.html new file mode 100644 index 0000000..eb8d0bc --- /dev/null +++ b/sample/json-object-builder/index.html @@ -0,0 +1,86 @@ +JavaEE Sample::JSON::Object builder

                                                                                    Object builder

                                                                                    Run
                                                                                    How to run the sample
                                                                                    The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                    git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                    cd javaee7-samples/json/object-builder/
                                                                                    Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                                    mvn test
                                                                                    Or you can run individual tests by executing one of the following:
                                                                                    mvn test -Dtest=DOMGeneratorTest

                                                                                    • Specifications in use:
                                                                                      • JSON

                                                                                      DOMGeneratorTest

                                                                                      Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                                                                      Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                                                                      +
                                                                                      +
                                                                                      @Deployment
                                                                                      +public static Archive<?> deploy() {
                                                                                      +    File[] requiredLibraries = Maven.resolver().loadPomFromFile("pom.xml")
                                                                                      +            .resolve("org.json:json", "org.skyscreamer:jsonassert")
                                                                                      +            .withTransitivity().asFile();
                                                                                      +
                                                                                      +    return ShrinkWrap.create(WebArchive.class)
                                                                                      +            .addAsLibraries(requiredLibraries);
                                                                                      +}
                                                                                      +
                                                                                      +
                                                                                      Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                      +
                                                                                      +
                                                                                      @Test
                                                                                      +public void testEmptyObject() throws JSONException {
                                                                                      +    JsonObject jsonObject = Json.createObjectBuilder().build();
                                                                                      +    StringWriter w = new StringWriter();
                                                                                      +    try (JsonWriter writer = Json.createWriter(w)) {
                                                                                      +        writer.write(jsonObject);
                                                                                      +    }
                                                                                      +    JSONAssert.assertEquals("{}", w.toString(), JSONCompareMode.STRICT);
                                                                                      +}
                                                                                      +
                                                                                      +
                                                                                      Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                      +
                                                                                      +
                                                                                      @Test
                                                                                      +public void testSimpleObject() throws JSONException {
                                                                                      +    JsonObject jsonObject = Json.createObjectBuilder()
                                                                                      +            .add("apple", "red")
                                                                                      +            .add("banana", "yellow")
                                                                                      +            .build();
                                                                                      +    StringWriter w = new StringWriter();
                                                                                      +    try (JsonWriter writer = Json.createWriter(w)) {
                                                                                      +        writer.write(jsonObject);
                                                                                      +    }
                                                                                      +    JSONAssert.assertEquals("{\"apple\" : \"red\", \"banana\" : \"yellow\" }", w.toString(), JSONCompareMode.STRICT);
                                                                                      +}
                                                                                      +
                                                                                      +
                                                                                      Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                      +
                                                                                      +
                                                                                      @Test
                                                                                      +public void testArray() throws JSONException {
                                                                                      +    JsonArray jsonArray = Json.createArrayBuilder()
                                                                                      +            .add(Json.createObjectBuilder().add("apple", "red"))
                                                                                      +            .add(Json.createObjectBuilder().add("banana", "yellow"))
                                                                                      +            .build();
                                                                                      +    StringWriter w = new StringWriter();
                                                                                      +    try (JsonWriter writer = Json.createWriter(w)) {
                                                                                      +        writer.write(jsonArray);
                                                                                      +    }
                                                                                      +    JSONAssert.assertEquals("[{\"apple\":\"red\"},{\"banana\":\"yellow\"}]", w.toString(), JSONCompareMode.STRICT);
                                                                                      +}
                                                                                      +
                                                                                      +
                                                                                      Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                      +
                                                                                      +
                                                                                      @Test
                                                                                      +public void testNestedStructure() throws JSONException {
                                                                                      +    JsonObject jsonObject = Json.createObjectBuilder()
                                                                                      +            .add("title", "The Matrix")
                                                                                      +            .add("year", 1999)
                                                                                      +            .add("cast", Json.createArrayBuilder()
                                                                                      +                    .add("Keanu Reaves")
                                                                                      +                    .add("Laurence Fishburne")
                                                                                      +                    .add("Carrie-Anne Moss"))
                                                                                      +            .build();
                                                                                      +    StringWriter w = new StringWriter();
                                                                                      +    try (JsonWriter writer = Json.createWriter(w)) {
                                                                                      +        writer.write(jsonObject);
                                                                                      +    }
                                                                                      +    JSONAssert.assertEquals("{\"title\":\"The Matrix\",\"year\":1999,\"cast\":[\"Keanu Reaves\",\"Laurence Fishburne\",\"Carrie-Anne Moss\"]}", w.toString(), JSONCompareMode.STRICT);
                                                                                      +}
                                                                                      +
                                                                                      +

                                                                                      Share the Knowledge

                                                                                      Find this sample useful? Share on

                                                                                      There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                                      Help Improve

                                                                                      Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                                      Recent Changelog

                                                                                      • Oct 05, 2014: #252 fixed arquillian configuration for the jobs by John D. Ament
                                                                                      • Jul 15, 2014: Removed default header by Roberto Cortez
                                                                                      • Mar 20, 2014: Update arquillian.xml cr1 references to final by Aslak Knutsen
                                                                                      • Dec 24, 2013: Updated to wildfly 8.0.0.cr1 by Roberto Cortez
                                                                                      • Nov 12, 2013: Enabling one more test by Arun Gupta
                                                                                      • Nov 12, 2013: Adding unit tests by Arun Gupta
                                                                                      • Nov 12, 2013: Converting to unit tests by Arun Gupta
                                                                                      • Nov 12, 2013: Removing redundant and by Arun Gupta
                                                                                      • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                                                                      • Aug 28, 2013: Improved the title by Arun Gupta
                                                                                      How to help improve this sample
                                                                                      The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                      git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                      cd javaee7-samples/json/object-builder/

                                                                                      Do the changes as you see fit and send a pull request!

                                                                                      Good Luck!

                                                                                      + \ No newline at end of file diff --git a/sample/json-object-reader/index.html b/sample/json-object-reader/index.html new file mode 100644 index 0000000..f4462b6 --- /dev/null +++ b/sample/json-object-reader/index.html @@ -0,0 +1,195 @@ +JavaEE Sample::JSON::Object reader

                                                                                      Object reader

                                                                                      Run
                                                                                      How to run the sample
                                                                                      The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                      git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                      cd javaee7-samples/json/object-reader/
                                                                                      Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                                      mvn test
                                                                                      Or you can run individual tests by executing one of the following:
                                                                                      mvn test -Dtest=JsonReaderFromReaderTestmvn test -Dtest=JsonReaderFromStreamTest

                                                                                      • Specifications in use:
                                                                                        • JSON

                                                                                        JsonReaderFromReaderTest

                                                                                        Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                                                                        Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                                                                        +
                                                                                        +
                                                                                        @Deployment
                                                                                        +public static Archive<?> deploy() {
                                                                                        +    File[] requiredLibraries = Maven.resolver().loadPomFromFile("pom.xml")
                                                                                        +            .resolve("org.json:json", "org.skyscreamer:jsonassert")
                                                                                        +            .withTransitivity().asFile();
                                                                                        +
                                                                                        +    return ShrinkWrap.create(WebArchive.class)
                                                                                        +            .addAsLibraries(requiredLibraries);
                                                                                        +}
                                                                                        +
                                                                                        +
                                                                                        Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                        +
                                                                                        +
                                                                                        @Test
                                                                                        +public void testEmptyObject() throws JSONException {
                                                                                        +    JsonReader jsonReader = Json.createReader(new StringReader("{}"));
                                                                                        +    JsonObject json = jsonReader.readObject();
                                                                                        +
                                                                                        +    assertNotNull(json);
                                                                                        +    assertTrue(json.isEmpty());
                                                                                        +}
                                                                                        +
                                                                                        +
                                                                                        Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                        +
                                                                                        +
                                                                                        @Test
                                                                                        +public void testSimpleObjectWithTwoElements() throws JSONException {
                                                                                        +    JsonReader jsonReader = Json.createReader(new StringReader("{"
                                                                                        +            + "  \"apple\":\"red\","
                                                                                        +            + "  \"banana\":\"yellow\""
                                                                                        +            + "}"));
                                                                                        +    JsonObject json = jsonReader.readObject();
                                                                                        +
                                                                                        +    assertNotNull(json);
                                                                                        +    assertFalse(json.isEmpty());
                                                                                        +    assertTrue(json.containsKey("apple"));
                                                                                        +    assertEquals("red", json.getString("apple"));
                                                                                        +    assertTrue(json.containsKey("banana"));
                                                                                        +    assertEquals("yellow", json.getString("banana"));
                                                                                        +}
                                                                                        +
                                                                                        +
                                                                                        Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                        +
                                                                                        +
                                                                                        @Test
                                                                                        +public void testArray() throws JSONException {
                                                                                        +    JsonReader jsonReader = Json.createReader(new StringReader("["
                                                                                        +            + "  { \"apple\":\"red\" },"
                                                                                        +            + "  { \"banana\":\"yellow\" }"
                                                                                        +            + "]"));
                                                                                        +    JsonArray jsonArr = jsonReader.readArray();
                                                                                        +    assertNotNull(jsonArr);
                                                                                        +    assertEquals(2, jsonArr.size());
                                                                                        +
                                                                                        +    JSONAssert.assertEquals("{\"apple\":\"red\"}", jsonArr.get(0).toString(), JSONCompareMode.STRICT);
                                                                                        +    JSONAssert.assertEquals("{\"banana\":\"yellow\"}", jsonArr.get(1).toString(), JSONCompareMode.STRICT);
                                                                                        +}
                                                                                        +
                                                                                        +
                                                                                        Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                        +
                                                                                        +
                                                                                        @Test
                                                                                        +public void testNestedStructure() throws JSONException {
                                                                                        +    JsonReader jsonReader = Json.createReader(new StringReader("{"
                                                                                        +            + "  \"title\":\"The Matrix\","
                                                                                        +            + "  \"year\":1999,"
                                                                                        +            + "  \"cast\":["
                                                                                        +            + "    \"Keanu Reaves\","
                                                                                        +            + "    \"Laurence Fishburne\","
                                                                                        +            + "    \"Carrie-Anne Moss\""
                                                                                        +            + "  ]"
                                                                                        +            + "}"));
                                                                                        +    JsonObject json = jsonReader.readObject();
                                                                                        +
                                                                                        +    assertNotNull(json);
                                                                                        +    assertFalse(json.isEmpty());
                                                                                        +    assertTrue(json.containsKey("title"));
                                                                                        +    assertEquals("The Matrix", json.getString("title"));
                                                                                        +    assertTrue(json.containsKey("year"));
                                                                                        +    assertEquals(1999, json.getInt("year"));
                                                                                        +    assertTrue(json.containsKey("cast"));
                                                                                        +    JsonArray jsonArr = json.getJsonArray("cast");
                                                                                        +    assertNotNull(jsonArr);
                                                                                        +    assertEquals(3, jsonArr.size());
                                                                                        +
                                                                                        +    JSONAssert.assertEquals("["
                                                                                        +            + "    \"Keanu Reaves\","
                                                                                        +            + "    \"Laurence Fishburne\","
                                                                                        +            + "    \"Carrie-Anne Moss\""
                                                                                        +            + "  ]", jsonArr.toString(), JSONCompareMode.STRICT);
                                                                                        +}
                                                                                        +
                                                                                        +

                                                                                        JsonReaderFromStreamTest

                                                                                        Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                                                                        Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                                                                        +
                                                                                        +
                                                                                        @Deployment
                                                                                        +public static Archive<?> deploy() {
                                                                                        +    File[] requiredLibraries = Maven.resolver().loadPomFromFile("pom.xml")
                                                                                        +            .resolve("org.json:json", "org.skyscreamer:jsonassert")
                                                                                        +            .withTransitivity().asFile();
                                                                                        +
                                                                                        +    return ShrinkWrap.create(WebArchive.class)
                                                                                        +            .addAsResource("1.json")
                                                                                        +            .addAsResource("2.json")
                                                                                        +            .addAsResource("3.json")
                                                                                        +            .addAsResource("4.json")
                                                                                        +            .addAsLibraries(requiredLibraries);
                                                                                        +}
                                                                                        +
                                                                                        +
                                                                                        Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                        +
                                                                                        +
                                                                                        @Test
                                                                                        +public void testEmptyObject() throws JSONException {
                                                                                        +    JsonReader jsonReader = Json.createReader(Thread
                                                                                        +            .currentThread()
                                                                                        +            .getContextClassLoader()
                                                                                        +            .getResourceAsStream("/1.json"));
                                                                                        +    JsonObject json = jsonReader.readObject();
                                                                                        +
                                                                                        +    assertNotNull(json);
                                                                                        +    assertTrue(json.isEmpty());
                                                                                        +}
                                                                                        +
                                                                                        +
                                                                                        Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                        +
                                                                                        +
                                                                                        @Test
                                                                                        +public void testSimpleObjectWithTwoElements() throws JSONException {
                                                                                        +    JsonReader jsonReader = Json.createReader(Thread
                                                                                        +            .currentThread()
                                                                                        +            .getContextClassLoader()
                                                                                        +            .getResourceAsStream("/2.json"));
                                                                                        +    JsonObject json = jsonReader.readObject();
                                                                                        +
                                                                                        +    assertNotNull(json);
                                                                                        +    assertFalse(json.isEmpty());
                                                                                        +    assertTrue(json.containsKey("apple"));
                                                                                        +    assertEquals("red", json.getString("apple"));
                                                                                        +    assertTrue(json.containsKey("banana"));
                                                                                        +    assertEquals("yellow", json.getString("banana"));
                                                                                        +}
                                                                                        +
                                                                                        +
                                                                                        Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                        +
                                                                                        +
                                                                                        @Test
                                                                                        +public void testArray() throws JSONException {
                                                                                        +    JsonReader jsonReader = Json.createReader(Thread
                                                                                        +            .currentThread()
                                                                                        +            .getContextClassLoader()
                                                                                        +            .getResourceAsStream("/3.json"));
                                                                                        +    JsonArray jsonArr = jsonReader.readArray();
                                                                                        +    assertNotNull(jsonArr);
                                                                                        +    assertEquals(2, jsonArr.size());
                                                                                        +
                                                                                        +    JSONAssert.assertEquals("{\"apple\":\"red\"}", jsonArr.get(0).toString(), JSONCompareMode.STRICT);
                                                                                        +    JSONAssert.assertEquals("{\"banana\":\"yellow\"}", jsonArr.get(1).toString(), JSONCompareMode.STRICT);
                                                                                        +}
                                                                                        +
                                                                                        +
                                                                                        Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                        +
                                                                                        +
                                                                                        @Test
                                                                                        +public void testNestedStructure() throws JSONException {
                                                                                        +    JsonReader jsonReader = Json.createReader(Thread
                                                                                        +            .currentThread()
                                                                                        +            .getContextClassLoader()
                                                                                        +            .getResourceAsStream("/4.json"));
                                                                                        +    JsonObject json = jsonReader.readObject();
                                                                                        +
                                                                                        +    assertNotNull(json);
                                                                                        +    assertFalse(json.isEmpty());
                                                                                        +    assertTrue(json.containsKey("title"));
                                                                                        +    assertEquals("The Matrix", json.getString("title"));
                                                                                        +    assertTrue(json.containsKey("year"));
                                                                                        +    assertEquals(1999, json.getInt("year"));
                                                                                        +    assertTrue(json.containsKey("cast"));
                                                                                        +    JsonArray jsonArr = json.getJsonArray("cast");
                                                                                        +    assertNotNull(jsonArr);
                                                                                        +    assertEquals(3, jsonArr.size());
                                                                                        +
                                                                                        +    JSONAssert.assertEquals("["
                                                                                        +            + "    \"Keanu Reaves\","
                                                                                        +            + "    \"Laurence Fishburne\","
                                                                                        +            + "    \"Carrie-Anne Moss\""
                                                                                        +            + "  ]", jsonArr.toString(), JSONCompareMode.STRICT);
                                                                                        +}
                                                                                        +
                                                                                        +

                                                                                        Share the Knowledge

                                                                                        Find this sample useful? Share on

                                                                                        There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                                        Help Improve

                                                                                        Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                                        Recent Changelog

                                                                                        • Jul 15, 2014: Removed default header by Roberto Cortez
                                                                                        • Nov 12, 2013: Converting to unit tests by Arun Gupta
                                                                                        • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                                                                        • Aug 28, 2013: Fixed title by Arun Gupta
                                                                                        • Aug 28, 2013: Cleaned up output by Arun Gupta
                                                                                        • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                                                                        How to help improve this sample
                                                                                        The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                        git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                        cd javaee7-samples/json/object-reader/

                                                                                        Do the changes as you see fit and send a pull request!

                                                                                        Good Luck!

                                                                                        + \ No newline at end of file diff --git a/sample/json-streaming-generate/index.html b/sample/json-streaming-generate/index.html new file mode 100644 index 0000000..43e2c48 --- /dev/null +++ b/sample/json-streaming-generate/index.html @@ -0,0 +1,98 @@ +JavaEE Sample::JSON::Streaming generate

                                                                                        Streaming generate

                                                                                        Run
                                                                                        How to run the sample
                                                                                        The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                        git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                        cd javaee7-samples/json/streaming-generate/
                                                                                        Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                                        mvn test
                                                                                        Or you can run individual tests by executing one of the following:
                                                                                        mvn test -Dtest=StreamingGeneratorTest

                                                                                        • Specifications in use:
                                                                                          • JSON

                                                                                          StreamingGeneratorTest

                                                                                          Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                                                                          Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                                                                          +
                                                                                          +
                                                                                          @Deployment
                                                                                          +public static Archive<?> deploy() {
                                                                                          +    File[] requiredLibraries = Maven.resolver().loadPomFromFile("pom.xml")
                                                                                          +            .resolve("org.json:json", "org.skyscreamer:jsonassert")
                                                                                          +            .withTransitivity().asFile();
                                                                                          +
                                                                                          +    return ShrinkWrap.create(WebArchive.class)
                                                                                          +            .addAsLibraries(requiredLibraries);
                                                                                          +}
                                                                                          +
                                                                                          +
                                                                                          Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                          +
                                                                                          +
                                                                                          @Test
                                                                                          +public void testEmptyObject() throws JSONException {
                                                                                          +    JsonGeneratorFactory factory = Json.createGeneratorFactory(null);
                                                                                          +    StringWriter w = new StringWriter();
                                                                                          +    JsonGenerator gen = factory.createGenerator(w);
                                                                                          +    gen.writeStartObject().writeEnd();
                                                                                          +    gen.flush();
                                                                                          +
                                                                                          +    JSONAssert.assertEquals("{}", w.toString(), JSONCompareMode.STRICT);
                                                                                          +}
                                                                                          +
                                                                                          +
                                                                                          Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                          +
                                                                                          +
                                                                                          @Test
                                                                                          +public void testSimpleObject() throws JSONException {
                                                                                          +    JsonGeneratorFactory factory = Json.createGeneratorFactory(null);
                                                                                          +    StringWriter w = new StringWriter();
                                                                                          +    JsonGenerator gen = factory.createGenerator(w);
                                                                                          +
                                                                                          +    gen
                                                                                          +            .writeStartObject()
                                                                                          +            .write("apple", "red")
                                                                                          +            .write("banana", "yellow")
                                                                                          +            .writeEnd();
                                                                                          +    gen.flush();
                                                                                          +    JSONAssert.assertEquals("{\"apple\" : \"red\", \"banana\" : \"yellow\" }", w.toString(), JSONCompareMode.STRICT);
                                                                                          +}
                                                                                          +
                                                                                          +
                                                                                          Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                          +
                                                                                          +
                                                                                          @Test
                                                                                          +public void testArray() throws JSONException {
                                                                                          +    JsonGeneratorFactory factory = Json.createGeneratorFactory(null);
                                                                                          +    StringWriter w = new StringWriter();
                                                                                          +    JsonGenerator gen = factory.createGenerator(w);
                                                                                          +
                                                                                          +    gen
                                                                                          +            .writeStartArray()
                                                                                          +            .writeStartObject()
                                                                                          +            .write("apple", "red")
                                                                                          +            .writeEnd()
                                                                                          +            .writeStartObject()
                                                                                          +            .write("banana", "yellow")
                                                                                          +            .writeEnd()
                                                                                          +            .writeEnd();
                                                                                          +    gen.flush();
                                                                                          +    JSONAssert.assertEquals("[{\"apple\":\"red\"},{\"banana\":\"yellow\"}]", w.toString(), JSONCompareMode.STRICT);
                                                                                          +}
                                                                                          +
                                                                                          +
                                                                                          Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                          +
                                                                                          +
                                                                                          @Test
                                                                                          +public void testNestedStructure() throws JSONException {
                                                                                          +    JsonGeneratorFactory factory = Json.createGeneratorFactory(null);
                                                                                          +    StringWriter w = new StringWriter();
                                                                                          +    JsonGenerator gen = factory.createGenerator(w);
                                                                                          +
                                                                                          +    gen
                                                                                          +            .writeStartObject()
                                                                                          +            .write("title", "The Matrix")
                                                                                          +            .write("year", 1999)
                                                                                          +            .writeStartArray("cast")
                                                                                          +            .write("Keanu Reaves")
                                                                                          +            .write("Laurence Fishburne")
                                                                                          +            .write("Carrie-Anne Moss")
                                                                                          +            .writeEnd()
                                                                                          +            .writeEnd();
                                                                                          +    gen.flush();
                                                                                          +    JSONAssert.assertEquals("{\"title\":\"The Matrix\",\"year\":1999,\"cast\":[\"Keanu Reaves\",\"Laurence Fishburne\",\"Carrie-Anne Moss\"]}", w.toString(), JSONCompareMode.STRICT);
                                                                                          +}
                                                                                          +
                                                                                          +

                                                                                          Share the Knowledge

                                                                                          Find this sample useful? Share on

                                                                                          There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                                          Help Improve

                                                                                          Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                                          Recent Changelog

                                                                                          • Jul 15, 2014: Removed default header by Roberto Cortez
                                                                                          • Nov 12, 2013: Converting to unit tests by Arun Gupta
                                                                                          • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                                                                          • Aug 28, 2013: Slightly more indicative title by Arun Gupta
                                                                                          • Aug 28, 2013: Fixed titles by Arun Gupta
                                                                                          • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                                                                          How to help improve this sample
                                                                                          The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                          git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                          cd javaee7-samples/json/streaming-generate/

                                                                                          Do the changes as you see fit and send a pull request!

                                                                                          Good Luck!

                                                                                          + \ No newline at end of file diff --git a/sample/json-streaming-parser/index.html b/sample/json-streaming-parser/index.html new file mode 100644 index 0000000..8bed6d4 --- /dev/null +++ b/sample/json-streaming-parser/index.html @@ -0,0 +1,180 @@ +JavaEE Sample::JSON::Streaming parser

                                                                                          Streaming parser

                                                                                          Run
                                                                                          How to run the sample
                                                                                          The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                          git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                          cd javaee7-samples/json/streaming-parser/
                                                                                          Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                                          mvn test
                                                                                          Or you can run individual tests by executing one of the following:
                                                                                          mvn test -Dtest=JsonParserFromReaderTestmvn test -Dtest=JsonParserFromStreamTest

                                                                                          • Specifications in use:
                                                                                            • JSON

                                                                                            JsonParserFromReaderTest

                                                                                            Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                                                                            Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                                                                            +
                                                                                            +
                                                                                            @Deployment
                                                                                            +public static Archive<?> deploy() {
                                                                                            +    File[] requiredLibraries = Maven.resolver().loadPomFromFile("pom.xml")
                                                                                            +            .resolve("org.json:json")
                                                                                            +            .withTransitivity().asFile();
                                                                                            +
                                                                                            +    return ShrinkWrap.create(WebArchive.class)
                                                                                            +            .addAsLibraries(requiredLibraries);
                                                                                            +}
                                                                                            +
                                                                                            +
                                                                                            Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                            +
                                                                                            +
                                                                                            @Test
                                                                                            +public void testEmptyObject() throws JSONException {
                                                                                            +    String json = "{}";
                                                                                            +    JsonParser parser = Json.createParser(new StringReader(json));
                                                                                            +    assertEquals(JsonParser.Event.START_OBJECT, parser.next());
                                                                                            +    assertEquals(JsonParser.Event.END_OBJECT, parser.next());
                                                                                            +}
                                                                                            +
                                                                                            +
                                                                                            Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                            +
                                                                                            +
                                                                                            @Test
                                                                                            +public void testSimpleObject() throws JSONException {
                                                                                            +    String json = "{"
                                                                                            +            + "  \"apple\":\"red\","
                                                                                            +            + "  \"banana\":\"yellow\""
                                                                                            +            + "}";
                                                                                            +    JsonParser parser = Json.createParser(new StringReader(json));
                                                                                            +    assertEquals(JsonParser.Event.START_OBJECT, parser.next());
                                                                                            +    assertEquals(JsonParser.Event.KEY_NAME, parser.next());
                                                                                            +    assertEquals(JsonParser.Event.VALUE_STRING, parser.next());
                                                                                            +    assertEquals(JsonParser.Event.KEY_NAME, parser.next());
                                                                                            +    assertEquals(JsonParser.Event.VALUE_STRING, parser.next());
                                                                                            +    assertEquals(JsonParser.Event.END_OBJECT, parser.next());
                                                                                            +}
                                                                                            +
                                                                                            +
                                                                                            Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                            +
                                                                                            +
                                                                                            @Test
                                                                                            +public void testArray() throws JSONException {
                                                                                            +    String json = "[{\"apple\":\"red\"},{\"banana\":\"yellow\"}]";
                                                                                            +    JsonParser parser = Json.createParser(new StringReader(json));
                                                                                            +    assertEquals(JsonParser.Event.START_ARRAY, parser.next());
                                                                                            +    assertEquals(JsonParser.Event.START_OBJECT, parser.next());
                                                                                            +    assertEquals(JsonParser.Event.KEY_NAME, parser.next());
                                                                                            +    assertEquals(JsonParser.Event.VALUE_STRING, parser.next());
                                                                                            +    assertEquals(JsonParser.Event.END_OBJECT, parser.next());
                                                                                            +    assertEquals(JsonParser.Event.START_OBJECT, parser.next());
                                                                                            +    assertEquals(JsonParser.Event.KEY_NAME, parser.next());
                                                                                            +    assertEquals(JsonParser.Event.VALUE_STRING, parser.next());
                                                                                            +    assertEquals(JsonParser.Event.END_OBJECT, parser.next());
                                                                                            +    assertEquals(JsonParser.Event.END_ARRAY, parser.next());
                                                                                            +}
                                                                                            +
                                                                                            +
                                                                                            Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                            +
                                                                                            +
                                                                                            @Test
                                                                                            +public void testNestedStructure() throws JSONException {
                                                                                            +    String json = "{\"title\":\"The Matrix\",\"year\":1999,\"cast\":[\"Keanu Reaves\",\"Laurence Fishburne\",\"Carrie-Anne Moss\"]}";
                                                                                            +    JsonParser parser = Json.createParser(new StringReader(json));
                                                                                            +    assertEquals(JsonParser.Event.START_OBJECT, parser.next());
                                                                                            +    assertEquals(JsonParser.Event.KEY_NAME, parser.next());
                                                                                            +    assertEquals(JsonParser.Event.VALUE_STRING, parser.next());
                                                                                            +    assertEquals(JsonParser.Event.KEY_NAME, parser.next());
                                                                                            +    assertEquals(JsonParser.Event.VALUE_NUMBER, parser.next());
                                                                                            +    assertEquals(JsonParser.Event.KEY_NAME, parser.next());
                                                                                            +    assertEquals(JsonParser.Event.START_ARRAY, parser.next());
                                                                                            +    assertEquals(JsonParser.Event.VALUE_STRING, parser.next());
                                                                                            +    assertEquals(JsonParser.Event.VALUE_STRING, parser.next());
                                                                                            +    assertEquals(JsonParser.Event.VALUE_STRING, parser.next());
                                                                                            +    assertEquals(JsonParser.Event.END_ARRAY, parser.next());
                                                                                            +    assertEquals(JsonParser.Event.END_OBJECT, parser.next());
                                                                                            +}
                                                                                            +
                                                                                            +

                                                                                            JsonParserFromStreamTest

                                                                                            Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                                                                            Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                                                                            +
                                                                                            +
                                                                                            @Deployment
                                                                                            +public static Archive<?> deploy() {
                                                                                            +    File[] requiredLibraries = Maven.resolver().loadPomFromFile("pom.xml")
                                                                                            +            .resolve("org.json:json")
                                                                                            +            .withTransitivity().asFile();
                                                                                            +
                                                                                            +    return ShrinkWrap.create(WebArchive.class)
                                                                                            +            .addAsResource("1.json")
                                                                                            +            .addAsResource("2.json")
                                                                                            +            .addAsResource("3.json")
                                                                                            +            .addAsResource("4.json")
                                                                                            +            .addAsLibraries(requiredLibraries);
                                                                                            +}
                                                                                            +
                                                                                            +
                                                                                            Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                            +
                                                                                            +
                                                                                            @Test
                                                                                            +public void testEmptyObject() throws JSONException {
                                                                                            +    JsonParser parser = Json.createParser(Thread
                                                                                            +            .currentThread()
                                                                                            +            .getContextClassLoader()
                                                                                            +            .getResourceAsStream("/1.json"));
                                                                                            +
                                                                                            +    assertEquals(JsonParser.Event.START_OBJECT, parser.next());
                                                                                            +    assertEquals(JsonParser.Event.END_OBJECT, parser.next());
                                                                                            +}
                                                                                            +
                                                                                            +
                                                                                            Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                            +
                                                                                            +
                                                                                            @Test
                                                                                            +public void testSimpleObject() throws JSONException {
                                                                                            +    JsonParser parser = Json.createParser(Thread
                                                                                            +            .currentThread()
                                                                                            +            .getContextClassLoader()
                                                                                            +            .getResourceAsStream("/2.json"));
                                                                                            +
                                                                                            +    assertEquals(JsonParser.Event.START_OBJECT, parser.next());
                                                                                            +    assertEquals(JsonParser.Event.KEY_NAME, parser.next());
                                                                                            +    assertEquals(JsonParser.Event.VALUE_STRING, parser.next());
                                                                                            +    assertEquals(JsonParser.Event.KEY_NAME, parser.next());
                                                                                            +    assertEquals(JsonParser.Event.VALUE_STRING, parser.next());
                                                                                            +    assertEquals(JsonParser.Event.END_OBJECT, parser.next());
                                                                                            +}
                                                                                            +
                                                                                            +
                                                                                            Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                            +
                                                                                            +
                                                                                            @Test
                                                                                            +public void testArray() throws JSONException {
                                                                                            +    JsonParser parser = Json.createParser(Thread
                                                                                            +            .currentThread()
                                                                                            +            .getContextClassLoader()
                                                                                            +            .getResourceAsStream("/3.json"));
                                                                                            +
                                                                                            +    assertEquals(JsonParser.Event.START_ARRAY, parser.next());
                                                                                            +    assertEquals(JsonParser.Event.START_OBJECT, parser.next());
                                                                                            +    assertEquals(JsonParser.Event.KEY_NAME, parser.next());
                                                                                            +    assertEquals(JsonParser.Event.VALUE_STRING, parser.next());
                                                                                            +    assertEquals(JsonParser.Event.END_OBJECT, parser.next());
                                                                                            +    assertEquals(JsonParser.Event.START_OBJECT, parser.next());
                                                                                            +    assertEquals(JsonParser.Event.KEY_NAME, parser.next());
                                                                                            +    assertEquals(JsonParser.Event.VALUE_STRING, parser.next());
                                                                                            +    assertEquals(JsonParser.Event.END_OBJECT, parser.next());
                                                                                            +    assertEquals(JsonParser.Event.END_ARRAY, parser.next());
                                                                                            +}
                                                                                            +
                                                                                            +
                                                                                            Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                            +
                                                                                            +
                                                                                            @Test
                                                                                            +public void testNestedStructure() throws JSONException {
                                                                                            +    JsonParser parser = Json.createParser(Thread
                                                                                            +            .currentThread()
                                                                                            +            .getContextClassLoader()
                                                                                            +            .getResourceAsStream("/4.json"));
                                                                                            +
                                                                                            +    assertEquals(JsonParser.Event.START_OBJECT, parser.next());
                                                                                            +    assertEquals(JsonParser.Event.KEY_NAME, parser.next());
                                                                                            +    assertEquals(JsonParser.Event.VALUE_STRING, parser.next());
                                                                                            +    assertEquals(JsonParser.Event.KEY_NAME, parser.next());
                                                                                            +    assertEquals(JsonParser.Event.VALUE_NUMBER, parser.next());
                                                                                            +    assertEquals(JsonParser.Event.KEY_NAME, parser.next());
                                                                                            +    assertEquals(JsonParser.Event.START_ARRAY, parser.next());
                                                                                            +    assertEquals(JsonParser.Event.VALUE_STRING, parser.next());
                                                                                            +    assertEquals(JsonParser.Event.VALUE_STRING, parser.next());
                                                                                            +    assertEquals(JsonParser.Event.VALUE_STRING, parser.next());
                                                                                            +    assertEquals(JsonParser.Event.END_ARRAY, parser.next());
                                                                                            +    assertEquals(JsonParser.Event.END_OBJECT, parser.next());
                                                                                            +}
                                                                                            +
                                                                                            +

                                                                                            Share the Knowledge

                                                                                            Find this sample useful? Share on

                                                                                            There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                                            Help Improve

                                                                                            Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                                            Recent Changelog

                                                                                            • Jul 15, 2014: Removed default header by Roberto Cortez
                                                                                            • Nov 12, 2013: Converting into tests by Arun Gupta
                                                                                            • Nov 12, 2013: Adding json streaming parser tests - from reader by Arun Gupta
                                                                                            • Nov 12, 2013: Adding json streaming parser tests by Arun Gupta
                                                                                            • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                                                                            • Aug 28, 2013: Slightly more indicative titles by Arun Gupta
                                                                                            • Aug 28, 2013: Slightly more indicative title by Arun Gupta
                                                                                            • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                                                                            How to help improve this sample
                                                                                            The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                            git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                            cd javaee7-samples/json/streaming-parser/

                                                                                            Do the changes as you see fit and send a pull request!

                                                                                            Good Luck!

                                                                                            + \ No newline at end of file diff --git a/sample/jta-transactional/index.html b/sample/jta-transactional/index.html new file mode 100644 index 0000000..cb9c5ee --- /dev/null +++ b/sample/jta-transactional/index.html @@ -0,0 +1,151 @@ +JavaEE Sample::JTA::Transactional

                                                                                            Transactional

                                                                                            Run
                                                                                            How to run the sample
                                                                                            The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                            git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                            cd javaee7-samples/jta/transactional/
                                                                                            Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                                            mvn test
                                                                                            Or you can run individual tests by executing one of the following:
                                                                                            mvn test -Dtest=MyTransactionalTxTypeBeanTestmvn test -Dtest=MyTransactionalBeanWithUserTransactionTestmvn test -Dtest=MyTransactionalBeanTest

                                                                                            MyTransactionalTxTypeBeanTest

                                                                                            Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                                                                            Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                                                                            +
                                                                                            +
                                                                                            @Deployment
                                                                                            +public static Archive<?> deploy() {
                                                                                            +    return ShrinkWrap.create(JavaArchive.class)
                                                                                            +                     .addClass(MyTransactionalTxTypeBean.class);
                                                                                            +}
                                                                                            +
                                                                                            +
                                                                                            Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                            +
                                                                                            +
                                                                                            @Test
                                                                                            +public void should_required_work() {
                                                                                            +     bean.required();
                                                                                            +}
                                                                                            +
                                                                                            +
                                                                                            Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                            +
                                                                                            +
                                                                                            @Test
                                                                                            +public void should_requiresNew_work() {
                                                                                            +    bean.requiresNew();
                                                                                            +}
                                                                                            +
                                                                                            +
                                                                                            Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                            +
                                                                                            +
                                                                                            @Test(expected = TransactionalException.class)
                                                                                            +public void should_mandatory_throw_exception() {
                                                                                            +    bean.mandatory();
                                                                                            +}
                                                                                            +
                                                                                            +
                                                                                            Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                            +
                                                                                            +
                                                                                            @Test
                                                                                            +public void should_supports_work() {
                                                                                            +    bean.supports();
                                                                                            +}
                                                                                            +
                                                                                            +
                                                                                            Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                            +
                                                                                            +
                                                                                            @Test
                                                                                            +public void should_notSupported_work() {
                                                                                            +    bean.notSupported();
                                                                                            +}
                                                                                            +
                                                                                            +
                                                                                            Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                            +
                                                                                            +
                                                                                            @Test
                                                                                            +public void should_never_work() {
                                                                                            +    bean.never();
                                                                                            +}
                                                                                            +
                                                                                            +

                                                                                            MyTransactionalBeanWithUserTransactionTest

                                                                                            Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                                                                            Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                                                                            +
                                                                                            +
                                                                                            @Deployment
                                                                                            +public static Archive<?> deploy() {
                                                                                            +    return ShrinkWrap.create(JavaArchive.class)
                                                                                            +                     .addClasses(MyTransactionalBean.class, MyTransactionScopedBean.class)
                                                                                            +                     .addAsManifestResource("beans.xml");
                                                                                            +}
                                                                                            +
                                                                                            +
                                                                                            Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                            +
                                                                                            +
                                                                                            @Test
                                                                                            +public void should_withTransaction_have_only_one_instance_injected() throws Exception{
                                                                                            +    ut.begin();
                                                                                            +    bean.withTransaction();
                                                                                            +    ut.commit();
                                                                                            +    assertThat("bean1 and bean2 should the same object", bean.id1, is(bean.id2));
                                                                                            +}
                                                                                            +
                                                                                            +
                                                                                            Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                            +
                                                                                            +
                                                                                            @Test
                                                                                            +public void should_withTransaction_called_twice_have_same_instances_injected() throws Exception {
                                                                                            +    ut.begin();
                                                                                            +    bean.withTransaction();
                                                                                            +    String firstId1 = bean.id1;
                                                                                            +
                                                                                            +    bean.withTransaction();
                                                                                            +    String secondId1 = bean.id1;
                                                                                            +    ut.commit();
                                                                                            +
                                                                                            +    assertThat("bean1 should change between scenarios", firstId1, is(secondId1));
                                                                                            +}
                                                                                            +
                                                                                            +
                                                                                            Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                            +
                                                                                            +
                                                                                            @Test
                                                                                            +public void should_withoutTransaction_NOT_fail() throws Exception {
                                                                                            +    try {
                                                                                            +        ut.begin();
                                                                                            +        bean.withoutTransaction();
                                                                                            +        ut.commit();
                                                                                            +    } catch (ContextNotActiveException e) {
                                                                                            +        fail(e.toString());
                                                                                            +    }
                                                                                            +}
                                                                                            +
                                                                                            +

                                                                                            MyTransactionalBeanTest

                                                                                            Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                                                                            Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                                                                            +
                                                                                            +
                                                                                            @Deployment
                                                                                            +public static Archive<?> deploy() {
                                                                                            +    return ShrinkWrap.create(JavaArchive.class)
                                                                                            +                     .addClasses(MyTransactionalBean.class, MyTransactionScopedBean.class)
                                                                                            +                     .addAsManifestResource("beans.xml");
                                                                                            +}
                                                                                            +
                                                                                            +
                                                                                            Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                            +
                                                                                            +
                                                                                            @Test
                                                                                            +public void should_withTransaction_have_only_one_instance_injected() {
                                                                                            +    bean.withTransaction();
                                                                                            +    assertThat("bean1 and bean2 should the same object", bean.id1, is(bean.id2));
                                                                                            +}
                                                                                            +
                                                                                            +
                                                                                            Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                            +
                                                                                            +
                                                                                            @Test
                                                                                            +public void should_withTransaction_called_twice_have_different_instances_injected() {
                                                                                            +    bean.withTransaction();
                                                                                            +    String firstId1 = bean.id1;
                                                                                            +
                                                                                            +    bean.withTransaction();
                                                                                            +    String secondId1 = bean.id1;
                                                                                            +
                                                                                            +    assertThat("bean1 should change between scenarios", firstId1, is(not(secondId1)));
                                                                                            +}
                                                                                            +
                                                                                            +
                                                                                            Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                            +
                                                                                            +
                                                                                            @Test
                                                                                            +public void should_withoutTransaction_fail() {
                                                                                            +    try {
                                                                                            +        bean.withoutTransaction();
                                                                                            +        fail("No ContextNotActiveException");
                                                                                            +    } catch (ContextNotActiveException e) {
                                                                                            +    }
                                                                                            +}
                                                                                            +
                                                                                            +

                                                                                            Share the Knowledge

                                                                                            Find this sample useful? Share on

                                                                                            There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                                            Help Improve

                                                                                            Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                                            Recent Changelog

                                                                                            • Oct 05, 2014: #252 fixed arquillian configuration for the jobs by John D. Ament
                                                                                            • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                                                            • Mar 20, 2014: Update arquillian.xml cr1 references to final by Aslak Knutsen
                                                                                            • Dec 24, 2013: Updated to wildfly 8.0.0.cr1 by Roberto Cortez
                                                                                            • Dec 01, 2013: Merging jta/transaction-scope and jta/transactional modules by Alexis Hassler
                                                                                            • Nov 13, 2013: Added arquillian test for the jta/transaction-scope example by Alexis Hassler
                                                                                            • Nov 13, 2013: Added arquillian test for the jta/transactional example by Alexis Hassler
                                                                                            • Oct 27, 2013: Fixing a typo for better formatting by Arun Gupta
                                                                                            • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                                                                            • Sep 12, 2013: Using cdi 1.1 "all" style beans.xml by Arun Gupta
                                                                                            How to help improve this sample
                                                                                            The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                            git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                            cd javaee7-samples/jta/transactional/

                                                                                            Do the changes as you see fit and send a pull request!

                                                                                            Good Luck!

                                                                                            + \ No newline at end of file diff --git a/sample/jta-tx-exception/index.html b/sample/jta-tx-exception/index.html new file mode 100644 index 0000000..e83f767 --- /dev/null +++ b/sample/jta-tx-exception/index.html @@ -0,0 +1,55 @@ +JavaEE Sample::JTA::Tx exception

                                                                                            Tx exception

                                                                                            Run
                                                                                            How to run the sample
                                                                                            The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                            git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                            cd javaee7-samples/jta/tx-exception/
                                                                                            Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                                            mvn test
                                                                                            Or you can run individual tests by executing one of the following:
                                                                                            mvn test -Dtest=EmployeeBeanTest

                                                                                            EmployeeBeanTest

                                                                                            +

                                                                                            This test is RED with WildFly 8.0.0.Beta1 because it does not have a standard default DataSource.

                                                                                            +
                                                                                            Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                                                                            +
                                                                                            +
                                                                                            @Deployment
                                                                                            +public static Archive<?> deploy() {
                                                                                            +    return ShrinkWrap.create(JavaArchive.class)
                                                                                            +            .addClasses(EmployeeBean.class, Employee.class)
                                                                                            +            .addAsManifestResource("beans.xml")
                                                                                            +            .addAsResource("META-INF/persistence.xml")
                                                                                            +            .addAsResource("META-INF/create.sql")
                                                                                            +            .addAsResource("META-INF/load.sql")
                                                                                            +            .addAsResource("META-INF/drop.sql");
                                                                                            +}
                                                                                            +
                                                                                            +
                                                                                            Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                            +
                                                                                            +
                                                                                            @Test
                                                                                            +public void should_have_7_employees() {
                                                                                            +    assertEquals(7, bean.getEmployees().size());
                                                                                            +}
                                                                                            +
                                                                                            +
                                                                                            Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                            +
                                                                                            +
                                                                                            @Test
                                                                                            +public void should_have_1_more_employee_after_checked_exception() {
                                                                                            +    try {
                                                                                            +        bean.addAndThrowChecked();
                                                                                            +    } catch (Exception ex) { }
                                                                                            +    assertEquals(8, bean.getEmployees().size());
                                                                                            +}
                                                                                            +
                                                                                            +
                                                                                            Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                            +
                                                                                            +
                                                                                            @Test
                                                                                            +public void should_not_have_1_more_employee_after_runtime_exception() {
                                                                                            +    try {
                                                                                            +        bean.addAndThrowRuntime();
                                                                                            +    } catch (Exception ex) { }
                                                                                            +    assertEquals(7, bean.getEmployees().size());
                                                                                            +}
                                                                                            +
                                                                                            +

                                                                                            Share the Knowledge

                                                                                            Find this sample useful? Share on

                                                                                            There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                                            Help Improve

                                                                                            Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                                            Recent Changelog

                                                                                            • Oct 05, 2014: #252 fixed arquillian configuration for the jobs by John D. Ament
                                                                                            • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                                                            • Mar 20, 2014: Update arquillian.xml cr1 references to final by Aslak Knutsen
                                                                                            • Dec 24, 2013: Updated to wildfly 8.0.0.cr1 by Roberto Cortez
                                                                                            • Nov 12, 2013: Fix beans.xml issue by Alexis Hassler
                                                                                            • Nov 12, 2013: Delete webapp/* files by Alexis Hassler
                                                                                            • Nov 12, 2013: Added arquillian test for the jta/tx-exception example by Alexis Hassler
                                                                                            • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                                                                            • Sep 15, 2013: Changing to all style beans.xml by Arun Gupta
                                                                                            • Aug 29, 2013: Shows transaction commit for checked exception and rollback for runtime exception by Arun Gupta
                                                                                            How to help improve this sample
                                                                                            The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                            git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                            cd javaee7-samples/jta/tx-exception/

                                                                                            Do the changes as you see fit and send a pull request!

                                                                                            Good Luck!

                                                                                            + \ No newline at end of file diff --git a/sample/jta-user-transaction/index.html b/sample/jta-user-transaction/index.html new file mode 100644 index 0000000..1bfa82b --- /dev/null +++ b/sample/jta-user-transaction/index.html @@ -0,0 +1,39 @@ +JavaEE Sample::JTA::User transaction

                                                                                            User transaction

                                                                                            Run
                                                                                            How to run the sample
                                                                                            The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                            git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                            cd javaee7-samples/jta/user-transaction/
                                                                                            Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                                            mvn test
                                                                                            Or you can run individual tests by executing one of the following:
                                                                                            mvn test -Dtest=UserTransactionTest

                                                                                            UserTransactionTest

                                                                                            Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                                                                            Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                                                                            +
                                                                                            +
                                                                                            @Deployment
                                                                                            +public static Archive<?> deploy() {
                                                                                            +    return ShrinkWrap.create(JavaArchive.class)
                                                                                            +                     .addAsManifestResource("beans.xml");
                                                                                            +}
                                                                                            +
                                                                                            +
                                                                                            Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                            +
                                                                                            +
                                                                                            @Test
                                                                                            +public void should_work_with_cdi() throws SystemException, NotSupportedException, HeuristicRollbackException, HeuristicMixedException, RollbackException {
                                                                                            +    ut.begin();
                                                                                            +    ut.commit();
                                                                                            +}
                                                                                            +
                                                                                            +
                                                                                            Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                            +
                                                                                            +
                                                                                            @Test
                                                                                            +public void should_work_with_jndi() throws SystemException, NotSupportedException, HeuristicRollbackException, HeuristicMixedException, RollbackException, NamingException {
                                                                                            +    Context context = new InitialContext();
                                                                                            +    UserTransaction ut = (UserTransaction)context.lookup("java:comp/UserTransaction");
                                                                                            +    ut.begin();
                                                                                            +    ut.commit();
                                                                                            +}
                                                                                            +
                                                                                            +

                                                                                            Share the Knowledge

                                                                                            Find this sample useful? Share on

                                                                                            There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                                            Help Improve

                                                                                            Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                                            Recent Changelog

                                                                                            • Oct 05, 2014: #252 fixed arquillian configuration for the jobs by John D. Ament
                                                                                            • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                                                            • Mar 20, 2014: Update arquillian.xml cr1 references to final by Aslak Knutsen
                                                                                            • Dec 24, 2013: Updated to wildfly 8.0.0.cr1 by Roberto Cortez
                                                                                            • Nov 22, 2013: Fixing the package name to match artifactid by Arun Gupta
                                                                                            • Nov 12, 2013: Fix beans.xml issue by Alexis Hassler
                                                                                            • Nov 12, 2013: Added arquillian test for the jta/tx-exception example by Alexis Hassler
                                                                                            • Nov 12, 2013: Added arquillian test for the jta/user-transaction example by Alexis Hassler
                                                                                            • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                                                                            • Sep 15, 2013: Changing to all style beans.xml by Arun Gupta
                                                                                            How to help improve this sample
                                                                                            The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                            git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                            cd javaee7-samples/jta/user-transaction/

                                                                                            Do the changes as you see fit and send a pull request!

                                                                                            Good Luck!

                                                                                            + \ No newline at end of file diff --git a/sample/servlet-async-servlet/index.html b/sample/servlet-async-servlet/index.html new file mode 100644 index 0000000..4b222af --- /dev/null +++ b/sample/servlet-async-servlet/index.html @@ -0,0 +1,13 @@ +JavaEE Sample::Servlet::Async servlet

                                                                                            Async servlet

                                                                                            Run
                                                                                            How to run the sample
                                                                                            The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                            git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                            cd javaee7-samples/servlet/async-servlet/
                                                                                            Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                                            mvn test
                                                                                            Or you can run individual tests by executing one of the following:

                                                                                            Missing a story. Add a test case.Show me how!

                                                                                            Share the Knowledge

                                                                                            Find this sample useful? Share on

                                                                                            There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                                            Help Improve

                                                                                            Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                                            Recent Changelog

                                                                                            • Nov 10, 2014: Optimized async servlet sample by Alexander Heusingfeld
                                                                                            • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                                                            • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                                                                            • Aug 29, 2013: Better output messages by Arun Gupta
                                                                                            • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                                                                            How to help improve this sample
                                                                                            The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                            git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                            cd javaee7-samples/servlet/async-servlet/

                                                                                            Do the changes as you see fit and send a pull request!

                                                                                            Good Luck!

                                                                                            + \ No newline at end of file diff --git a/sample/servlet-cookies/index.html b/sample/servlet-cookies/index.html new file mode 100644 index 0000000..28b62c6 --- /dev/null +++ b/sample/servlet-cookies/index.html @@ -0,0 +1,13 @@ +JavaEE Sample::Servlet::Cookies

                                                                                            Cookies

                                                                                            Run
                                                                                            How to run the sample
                                                                                            The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                            git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                            cd javaee7-samples/servlet/cookies/
                                                                                            Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                                            mvn test
                                                                                            Or you can run individual tests by executing one of the following:

                                                                                            Missing a story. Add a test case.Show me how!

                                                                                            Share the Knowledge

                                                                                            Find this sample useful? Share on

                                                                                            There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                                            Help Improve

                                                                                            Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                                            Recent Changelog

                                                                                            • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                                                            • Jul 12, 2014: New test for programmatic registration of servlets by arun-gupta
                                                                                            • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                                                                            • Aug 29, 2013: Aligned title/header by Arun Gupta
                                                                                            • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                                                                            How to help improve this sample
                                                                                            The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                            git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                            cd javaee7-samples/servlet/cookies/

                                                                                            Do the changes as you see fit and send a pull request!

                                                                                            Good Luck!

                                                                                            + \ No newline at end of file diff --git a/sample/servlet-error-mapping/index.html b/sample/servlet-error-mapping/index.html new file mode 100644 index 0000000..a1efbd4 --- /dev/null +++ b/sample/servlet-error-mapping/index.html @@ -0,0 +1,13 @@ +JavaEE Sample::Servlet::Error mapping

                                                                                            Error mapping

                                                                                            Run
                                                                                            How to run the sample
                                                                                            The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                            git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                            cd javaee7-samples/servlet/error-mapping/
                                                                                            Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                                            mvn test
                                                                                            Or you can run individual tests by executing one of the following:

                                                                                            Missing a story. Add a test case.Show me how!

                                                                                            Share the Knowledge

                                                                                            Find this sample useful? Share on

                                                                                            There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                                            Help Improve

                                                                                            Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                                            Recent Changelog

                                                                                            • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                                                            • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                                                                            • Sep 12, 2013: Removing metadata-complete by Arun Gupta
                                                                                            • Sep 12, 2013: Slight formatting by Arun Gupta
                                                                                            • Sep 12, 2013: Fixing namespace from java.sun.com -> xmlns.jcp.org and using servlet 3.1 schema. also added copyright by Arun Gupta
                                                                                            • Aug 29, 2013: Better output messages by Arun Gupta
                                                                                            • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                                                                            How to help improve this sample
                                                                                            The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                            git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                            cd javaee7-samples/servlet/error-mapping/

                                                                                            Do the changes as you see fit and send a pull request!

                                                                                            Good Luck!

                                                                                            + \ No newline at end of file diff --git a/sample/servlet-event-listeners/index.html b/sample/servlet-event-listeners/index.html new file mode 100644 index 0000000..c422f77 --- /dev/null +++ b/sample/servlet-event-listeners/index.html @@ -0,0 +1,13 @@ +JavaEE Sample::Servlet::Event listeners

                                                                                            Event listeners

                                                                                            Run
                                                                                            How to run the sample
                                                                                            The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                            git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                            cd javaee7-samples/servlet/event-listeners/
                                                                                            Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                                            mvn test
                                                                                            Or you can run individual tests by executing one of the following:

                                                                                            Missing a story. Add a test case.Show me how!

                                                                                            Share the Knowledge

                                                                                            Find this sample useful? Share on

                                                                                            There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                                            Help Improve

                                                                                            Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                                            Recent Changelog

                                                                                            • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                                                            • Nov 01, 2013: Removing try/resources so that the stream is not closed and error handling is reported correctly by Arun Gupta
                                                                                            • Nov 01, 2013: Removing @weblistener by Arun Gupta
                                                                                            • Nov 01, 2013: Adding more descriptive output statement by Arun Gupta
                                                                                            • Oct 31, 2013: Removing redundant parentheses by Arun Gupta
                                                                                            • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                                                                            • Aug 29, 2013: Better output messages by Arun Gupta
                                                                                            • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                                                                            How to help improve this sample
                                                                                            The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                            git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                            cd javaee7-samples/servlet/event-listeners/

                                                                                            Do the changes as you see fit and send a pull request!

                                                                                            Good Luck!

                                                                                            + \ No newline at end of file diff --git a/sample/servlet-file-upload/index.html b/sample/servlet-file-upload/index.html new file mode 100644 index 0000000..b49d254 --- /dev/null +++ b/sample/servlet-file-upload/index.html @@ -0,0 +1,44 @@ +JavaEE Sample::Servlet::File upload

                                                                                            File upload

                                                                                            Run
                                                                                            How to run the sample
                                                                                            The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                            git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                            cd javaee7-samples/servlet/file-upload/
                                                                                            Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                                            mvn test
                                                                                            Or you can run individual tests by executing one of the following:
                                                                                            mvn test -Dtest=FileUploadTest

                                                                                            FileUploadTest

                                                                                            Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                                                                            Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                                                                            +
                                                                                            +
                                                                                            @Deployment(testable = false)
                                                                                            +public static WebArchive deploy() throws URISyntaxException {
                                                                                            +    return ShrinkWrap.create(WebArchive.class)
                                                                                            +            .addClasses(TestServlet.class);
                                                                                            +}
                                                                                            +
                                                                                            +
                                                                                            Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                            +
                                                                                            +
                                                                                            @Test
                                                                                            +public void uploadFile() throws IOException, URISyntaxException {
                                                                                            +
                                                                                            +//        HttpClient client = new DefaultHttpClient();
                                                                                            +//        HttpPost postRequest = new HttpPost(new URL(base, "TestServlet").toURI());
                                                                                            +//
                                                                                            +//        MultipartEntity multiPartEntity = new MultipartEntity();
                                                                                            +//        FileBody fileBody = new FileBody(new File("pom.xml"));
                                                                                            +//        multiPartEntity.addPart("attachment", fileBody);
                                                                                            +//
                                                                                            +//        postRequest.setEntity(multiPartEntity);
                                                                                            +//        HttpResponse response = client.execute(postRequest);
                                                                                            +//
                                                                                            +//        String servletOutput = EntityUtils.toString(response.getEntity());
                                                                                            +//
                                                                                            +//        assertThat(response.getStatusLine().getStatusCode(), is(equalTo(200)));
                                                                                            +//        assertThat(servletOutput, containsString("Received 1 parts"));
                                                                                            +//        assertThat(servletOutput, containsString("writing pom.xml part"));
                                                                                            +//        assertThat(servletOutput, containsString("uploaded to: /tmp/pom.xml"));
                                                                                            +}
                                                                                            +
                                                                                            +

                                                                                            Share the Knowledge

                                                                                            Find this sample useful? Share on

                                                                                            There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                                            Help Improve

                                                                                            Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                                            Recent Changelog

                                                                                            • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                                                            • Dec 11, 2013: Changing the project names to be more intuitive by arun-gupta
                                                                                            • Nov 17, 2013: File upload test for arun-gupta/javaee7-samples#84 by kubamarchwicki
                                                                                            • Oct 31, 2013: Adding debug statements by Arun Gupta
                                                                                            • Oct 31, 2013: Adding better debug statements by Arun Gupta
                                                                                            • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                                                                            • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                                                                            How to help improve this sample
                                                                                            The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                            git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                            cd javaee7-samples/servlet/file-upload/

                                                                                            Do the changes as you see fit and send a pull request!

                                                                                            Good Luck!

                                                                                            + \ No newline at end of file diff --git a/sample/servlet-metadata-complete/index.html b/sample/servlet-metadata-complete/index.html new file mode 100644 index 0000000..65ca3cc --- /dev/null +++ b/sample/servlet-metadata-complete/index.html @@ -0,0 +1,40 @@ +JavaEE Sample::Servlet::Metadata complete

                                                                                            Metadata complete

                                                                                            Run
                                                                                            How to run the sample
                                                                                            The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                            git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                            cd javaee7-samples/servlet/metadata-complete/
                                                                                            Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                                            mvn test
                                                                                            Or you can run individual tests by executing one of the following:
                                                                                            mvn test -Dtest=TestServletTest

                                                                                            TestServletTest

                                                                                            Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                                                                            Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                                                                            +
                                                                                            +
                                                                                            @Deployment(testable = false)
                                                                                            +public static WebArchive createDeployment() {
                                                                                            +    WebArchive war = ShrinkWrap.create(WebArchive.class).
                                                                                            +            addClass(TestServlet.class).
                                                                                            +            addAsWebInfResource((new File(WEBAPP_SRC + "/WEB-INF", "web.xml")));
                                                                                            +    return war;
                                                                                            +}
                                                                                            +
                                                                                            +
                                                                                            Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                            +
                                                                                            +
                                                                                            @Test
                                                                                            +public void testGet() throws IOException, SAXException {
                                                                                            +    TextPage page = webClient.getPage(base + "/TestServlet");
                                                                                            +    assertEquals("my GET", page.getContent());
                                                                                            +}
                                                                                            +
                                                                                            +
                                                                                            Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                            +
                                                                                            +
                                                                                            @Test
                                                                                            +public void testPost() throws IOException, SAXException {
                                                                                            +    WebRequest request = new WebRequest(new URL(base + "/TestServlet"), HttpMethod.POST);
                                                                                            +    TextPage page = webClient.getPage(request);
                                                                                            +    assertEquals("my POST", page.getContent());
                                                                                            +}
                                                                                            +
                                                                                            +

                                                                                            Share the Knowledge

                                                                                            Find this sample useful? Share on

                                                                                            There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                                            Help Improve

                                                                                            Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                                            Recent Changelog

                                                                                            • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                                                            • Dec 14, 2013: Simplifying the servlet and adding a test for post by arun-gupta
                                                                                            • Dec 13, 2013: Using htmlunit instead of httpunit by arun-gupta
                                                                                            • Dec 11, 2013: Changing the project names to be more intuitive by arun-gupta
                                                                                            • Nov 19, 2013: Fixing the test to work with arquillian by Arun Gupta
                                                                                            • Nov 08, 2013: Starting work on unit test by Arun Gupta
                                                                                            • Nov 04, 2013: Started work on a simple test case by Arun Gupta
                                                                                            • Nov 04, 2013: Removing try/resources so that the stream is not closed and error handling is reported correctly by Arun Gupta
                                                                                            • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                                                                            • Aug 29, 2013: Better output messages by Arun Gupta
                                                                                            How to help improve this sample
                                                                                            The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                            git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                            cd javaee7-samples/servlet/metadata-complete/

                                                                                            Do the changes as you see fit and send a pull request!

                                                                                            Good Luck!

                                                                                            + \ No newline at end of file diff --git a/sample/servlet-nonblocking/index.html b/sample/servlet-nonblocking/index.html new file mode 100644 index 0000000..acb0901 --- /dev/null +++ b/sample/servlet-nonblocking/index.html @@ -0,0 +1,13 @@ +JavaEE Sample::Servlet::Nonblocking

                                                                                            Nonblocking

                                                                                            Run
                                                                                            How to run the sample
                                                                                            The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                            git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                            cd javaee7-samples/servlet/nonblocking/
                                                                                            Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                                            mvn test
                                                                                            Or you can run individual tests by executing one of the following:

                                                                                            Missing a story. Add a test case.Show me how!

                                                                                            Share the Knowledge

                                                                                            Find this sample useful? Share on

                                                                                            There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                                            Help Improve

                                                                                            Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                                            Recent Changelog

                                                                                            • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                                                            • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                                                                            • Aug 29, 2013: Better output messages by Arun Gupta
                                                                                            • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                                                                            How to help improve this sample
                                                                                            The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                            git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                            cd javaee7-samples/servlet/nonblocking/

                                                                                            Do the changes as you see fit and send a pull request!

                                                                                            Good Luck!

                                                                                            + \ No newline at end of file diff --git a/sample/servlet-programmatic-registration/index.html b/sample/servlet-programmatic-registration/index.html new file mode 100644 index 0000000..6a96f0a --- /dev/null +++ b/sample/servlet-programmatic-registration/index.html @@ -0,0 +1,39 @@ +JavaEE Sample::Servlet::Programmatic registration

                                                                                            Programmatic registration

                                                                                            Run
                                                                                            How to run the sample
                                                                                            The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                            git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                            cd javaee7-samples/servlet/programmatic-registration/
                                                                                            Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                                            mvn test
                                                                                            Or you can run individual tests by executing one of the following:
                                                                                            mvn test -Dtest=ServletTest

                                                                                            ServletTest

                                                                                            Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                                                                            Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                                                                            +
                                                                                            +
                                                                                            @Deployment(testable = false)
                                                                                            +public static WebArchive createDeployment() {
                                                                                            +    WebArchive war = ShrinkWrap.create(WebArchive.class).
                                                                                            +            addClass(ParentServlet.class).
                                                                                            +            addClass(ChildServlet.class);
                                                                                            +    return war;
                                                                                            +}
                                                                                            +
                                                                                            +
                                                                                            Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                            +
                                                                                            +
                                                                                            @Test
                                                                                            +public void testChildServlet() throws IOException, SAXException {
                                                                                            +    try {
                                                                                            +        webClient.getPage(base + "/ChildServlet");
                                                                                            +    } catch (FailingHttpStatusCodeException e) {
                                                                                            +        assertNotNull(e);
                                                                                            +        assertEquals(404, e.getStatusCode());
                                                                                            +        return;
                                                                                            +    }
                                                                                            +    fail("/ChildSevlet could be accessed with programmatic registration");
                                                                                            +    webClient.getPage(base + "/ParentServlet");
                                                                                            +    webClient.getPage(base + "/ChildServlet");
                                                                                            +}
                                                                                            +
                                                                                            +

                                                                                            Share the Knowledge

                                                                                            Find this sample useful? Share on

                                                                                            There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                                            Help Improve

                                                                                            Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                                            Recent Changelog

                                                                                            • Jul 12, 2014: Cleaned up imports by arun-gupta
                                                                                            • Jul 12, 2014: New test for programmatic registration of servlets by arun-gupta
                                                                                            How to help improve this sample
                                                                                            The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                            git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                            cd javaee7-samples/servlet/programmatic-registration/

                                                                                            Do the changes as you see fit and send a pull request!

                                                                                            Good Luck!

                                                                                            + \ No newline at end of file diff --git a/sample/servlet-protocol-handler/index.html b/sample/servlet-protocol-handler/index.html new file mode 100644 index 0000000..4325134 --- /dev/null +++ b/sample/servlet-protocol-handler/index.html @@ -0,0 +1,13 @@ +JavaEE Sample::Servlet::Protocol handler

                                                                                            Protocol handler

                                                                                            Run
                                                                                            How to run the sample
                                                                                            The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                            git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                            cd javaee7-samples/servlet/protocol-handler/
                                                                                            Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                                            mvn test
                                                                                            Or you can run individual tests by executing one of the following:

                                                                                            Missing a story. Add a test case.Show me how!

                                                                                            Share the Knowledge

                                                                                            Find this sample useful? Share on

                                                                                            There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                                            Help Improve

                                                                                            Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                                            Recent Changelog

                                                                                            • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                                                            • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                                                                            • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                                                                            How to help improve this sample
                                                                                            The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                            git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                            cd javaee7-samples/servlet/protocol-handler/

                                                                                            Do the changes as you see fit and send a pull request!

                                                                                            Good Luck!

                                                                                            + \ No newline at end of file diff --git a/sample/servlet-resource-packaging/index.html b/sample/servlet-resource-packaging/index.html new file mode 100644 index 0000000..8648535 --- /dev/null +++ b/sample/servlet-resource-packaging/index.html @@ -0,0 +1,37 @@ +JavaEE Sample::Servlet::Resource packaging

                                                                                            Resource packaging

                                                                                            Run
                                                                                            How to run the sample
                                                                                            The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                            git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                            cd javaee7-samples/servlet/resource-packaging/
                                                                                            Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                                            mvn test
                                                                                            Or you can run individual tests by executing one of the following:
                                                                                            mvn test -Dtest=ResourcePackagingTest

                                                                                            • Specifications in use:
                                                                                              • JAXRS

                                                                                              ResourcePackagingTest

                                                                                              Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                                                                              Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                                                                              +
                                                                                              +
                                                                                              @Deployment(testable = false)
                                                                                              +public static WebArchive deploy() throws URISyntaxException {
                                                                                              +    return ShrinkWrap.create(WebArchive.class)
                                                                                              +            .addAsLibrary(new File("src/main/webapp/WEB-INF/lib/myResources.jar"), "myResources.jar");
                                                                                              +}
                                                                                              +
                                                                                              +
                                                                                              Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                              +
                                                                                              +
                                                                                              @Test
                                                                                              +    public void getMyResourceJarStyles() throws MalformedURLException {
                                                                                              +        Client client = ClientBuilder.newClient();
                                                                                              +        WebTarget target = client.target(URI.create(new URL(base, "styles.css").toExternalForm()));
                                                                                              +        Response response = target.request().get();
                                                                                              +
                                                                                              +        assertThat(response.getStatus(), is(equalTo(200)));
                                                                                              +
                                                                                              +        String style = response.readEntity(String.class);
                                                                                              +        assertThat(style, startsWith("body {"));
                                                                                              +    }
                                                                                              +
                                                                                              +}
                                                                                              +
                                                                                              +

                                                                                              Share the Knowledge

                                                                                              Find this sample useful? Share on

                                                                                              There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                                              Help Improve

                                                                                              Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                                              Recent Changelog

                                                                                              • Dec 04, 2013: Change to use client.target(uri) to be compatible with jax-rs 1.0 by Aslak Knutsen
                                                                                              • Nov 16, 2013: Resource packaging arun-gupta/javaee7-samples#84 test by kubamarchwicki
                                                                                              • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                                                                              • Aug 30, 2013: Resources are now correctly packaged in web-inf/lib and read from the servlet. index.jsp is rendered differently based upon the styles.css from the jar file by Arun Gupta
                                                                                              • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                                                                              How to help improve this sample
                                                                                              The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                              git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                              cd javaee7-samples/servlet/resource-packaging/

                                                                                              Do the changes as you see fit and send a pull request!

                                                                                              Good Luck!

                                                                                              + \ No newline at end of file diff --git a/sample/servlet-security-basicauth-omission/index.html b/sample/servlet-security-basicauth-omission/index.html new file mode 100644 index 0000000..6d03a11 --- /dev/null +++ b/sample/servlet-security-basicauth-omission/index.html @@ -0,0 +1,53 @@ +JavaEE Sample::Servlet::Security basicauth omission

                                                                                              Security basicauth omission

                                                                                              Run
                                                                                              How to run the sample
                                                                                              The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                              git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                              cd javaee7-samples/servlet/security-basicauth-omission/
                                                                                              Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                                              mvn test
                                                                                              Or you can run individual tests by executing one of the following:
                                                                                              mvn test -Dtest=SecureServletTest

                                                                                              SecureServletTest

                                                                                              Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                                                                              Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                                                                              +
                                                                                              +
                                                                                              @Deployment(testable = false)
                                                                                              +public static WebArchive createDeployment() {
                                                                                              +    WebArchive war = ShrinkWrap.create(WebArchive.class).
                                                                                              +            addClass(SecureServlet.class).
                                                                                              +            addAsWebInfResource((new File(WEBAPP_SRC + "/WEB-INF", "web.xml")));
                                                                                              +    return war;
                                                                                              +}
                                                                                              +
                                                                                              +
                                                                                              Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                              +
                                                                                              +
                                                                                              @Test
                                                                                              +public void testPostWithNoCredentials() throws Exception {
                                                                                              +//        webClient.setCredentialsProvider(correctCreds);
                                                                                              +    WebRequest request = new WebRequest(new URL(base + "SecureServlet"), HttpMethod.POST);
                                                                                              +    TextPage page = webClient.getPage(request);
                                                                                              +    assertEquals("my POST", page.getContent());
                                                                                              +}
                                                                                              +
                                                                                              +
                                                                                              Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                              +
                                                                                              +
                                                                                              @Test
                                                                                              +public void testPostWithCorrectCredentials() throws Exception {
                                                                                              +    webClient.setCredentialsProvider(correctCreds);
                                                                                              +    WebRequest request = new WebRequest(new URL(base + "SecureServlet"), HttpMethod.POST);
                                                                                              +    TextPage page = webClient.getPage(request);
                                                                                              +    assertEquals("my POST", page.getContent());
                                                                                              +}
                                                                                              +
                                                                                              +
                                                                                              Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                              +
                                                                                              +
                                                                                              @Test
                                                                                              +public void testPostWithIncorrectCredentials() throws Exception {
                                                                                              +    webClient.setCredentialsProvider(incorrectCreds);
                                                                                              +    WebRequest request = new WebRequest(new URL(base + "SecureServlet"), HttpMethod.POST);
                                                                                              +    TextPage page = webClient.getPage(request);
                                                                                              +    assertEquals("my POST", page.getContent());
                                                                                              +}
                                                                                              +
                                                                                              +

                                                                                              Share the Knowledge

                                                                                              Find this sample useful? Share on

                                                                                              There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                                              Help Improve

                                                                                              Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                                              Recent Changelog

                                                                                              • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                                                              • Jul 12, 2014: New test for programmatic registration of servlets by arun-gupta
                                                                                              • Dec 12, 2013: Adding a new sample/test for http-omission by arun-gupta
                                                                                              How to help improve this sample
                                                                                              The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                              git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                              cd javaee7-samples/servlet/security-basicauth-omission/

                                                                                              Do the changes as you see fit and send a pull request!

                                                                                              Good Luck!

                                                                                              + \ No newline at end of file diff --git a/sample/servlet-security-basicauth/index.html b/sample/servlet-security-basicauth/index.html new file mode 100644 index 0000000..f2685fa --- /dev/null +++ b/sample/servlet-security-basicauth/index.html @@ -0,0 +1,73 @@ +JavaEE Sample::Servlet::security-basicauth

                                                                                              security-basicauth

                                                                                              Run
                                                                                              How to run the sample
                                                                                              The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                              git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                              cd javaee7-samples/servlet/security-basicauth/
                                                                                              Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                                              mvn test
                                                                                              Or you can run individual tests by executing one of the following:
                                                                                              mvn test -Dtest=SecureServletTest

                                                                                              SecureServletTest

                                                                                              Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                                                                              Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                                                                              +
                                                                                              +
                                                                                              @Deployment(testable = false)
                                                                                              +public static WebArchive createDeployment() {
                                                                                              +    WebArchive war = ShrinkWrap.create(WebArchive.class).
                                                                                              +            addClass(SecureServlet.class).
                                                                                              +            addAsWebInfResource((new File(WEBAPP_SRC + "/WEB-INF", "web.xml")));
                                                                                              +    return war;
                                                                                              +}
                                                                                              +
                                                                                              +
                                                                                              Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                              +
                                                                                              +
                                                                                              @Test
                                                                                              +public void testGetWithCorrectCredentials() throws Exception {
                                                                                              +    webClient.setCredentialsProvider(correctCreds);
                                                                                              +    TextPage page = webClient.getPage(base + "/SecureServlet");
                                                                                              +    assertEquals("my GET", page.getContent());
                                                                                              +}
                                                                                              +
                                                                                              +
                                                                                              Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                              +
                                                                                              +
                                                                                              @Test
                                                                                              +public void testGetWithIncorrectCredentials() throws Exception {
                                                                                              +    webClient.setCredentialsProvider(incorrectCreds);
                                                                                              +    try {
                                                                                              +        webClient.getPage(base + "/SecureServlet");
                                                                                              +    } catch(FailingHttpStatusCodeException e) {
                                                                                              +        assertNotNull(e);
                                                                                              +        assertEquals(401, e.getStatusCode());
                                                                                              +        return;
                                                                                              +    }
                                                                                              +    fail("/SecureServlet could be accessed without proper security credentials");
                                                                                              +}
                                                                                              +
                                                                                              +
                                                                                              Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                              +
                                                                                              +
                                                                                              @Test
                                                                                              +public void testPostWithCorrectCredentials() throws Exception {
                                                                                              +    webClient.setCredentialsProvider(correctCreds);
                                                                                              +    WebRequest request = new WebRequest(new URL(base + "/SecureServlet"), HttpMethod.POST);
                                                                                              +    TextPage page = webClient.getPage(request);
                                                                                              +    assertEquals("my POST", page.getContent());
                                                                                              +}
                                                                                              +
                                                                                              +
                                                                                              Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                              +
                                                                                              +
                                                                                              @Test
                                                                                              +public void testPostWithIncorrectCredentials() throws Exception {
                                                                                              +    webClient.setCredentialsProvider(incorrectCreds);
                                                                                              +    WebRequest request = new WebRequest(new URL(base + "/SecureServlet"), HttpMethod.POST);
                                                                                              +    try {
                                                                                              +        webClient.getPage(request);
                                                                                              +    } catch(FailingHttpStatusCodeException e) {
                                                                                              +        assertNotNull(e);
                                                                                              +        assertEquals(401, e.getStatusCode());
                                                                                              +        return;
                                                                                              +    }
                                                                                              +    fail("/SecureServlet could be accessed without proper security credentials");
                                                                                              +}
                                                                                              +
                                                                                              +

                                                                                              Share the Knowledge

                                                                                              Find this sample useful? Share on

                                                                                              There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                                              Help Improve

                                                                                              Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                                              Recent Changelog

                                                                                              • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                                                              • Dec 14, 2013: Cleaned up tests, added post with correct/incorrect credentials by arun-gupta
                                                                                              • Dec 14, 2013: Naming the method appropriately by arun-gupta
                                                                                              • Dec 13, 2013: Removing a redundant variable by arun-gupta
                                                                                              • Dec 13, 2013: Using htmlunit instead of httpunit by arun-gupta
                                                                                              • Dec 12, 2013: Improved the test by arun-gupta
                                                                                              • Dec 12, 2013: Cleaned up imports by arun-gupta
                                                                                              • Dec 11, 2013: Changing the project names to be more intuitive by arun-gupta
                                                                                              How to help improve this sample
                                                                                              The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                              git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                              cd javaee7-samples/servlet/security-basicauth/

                                                                                              Do the changes as you see fit and send a pull request!

                                                                                              Good Luck!

                                                                                              + \ No newline at end of file diff --git a/sample/servlet-security-deny-uncovered/index.html b/sample/servlet-security-deny-uncovered/index.html new file mode 100644 index 0000000..b4c3b2e --- /dev/null +++ b/sample/servlet-security-deny-uncovered/index.html @@ -0,0 +1,69 @@ +JavaEE Sample::Servlet::Security deny uncovered

                                                                                              Security deny uncovered

                                                                                              Run
                                                                                              How to run the sample
                                                                                              The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                              git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                              cd javaee7-samples/servlet/security-deny-uncovered/
                                                                                              Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                                              mvn test
                                                                                              Or you can run individual tests by executing one of the following:
                                                                                              mvn test -Dtest=SecureServletTest

                                                                                              SecureServletTest

                                                                                              Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                                                                              Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                                                                              +
                                                                                              +
                                                                                              @Deployment(testable = false)
                                                                                              +public static WebArchive createDeployment() {
                                                                                              +    WebArchive war = ShrinkWrap.create(WebArchive.class)
                                                                                              +            .addClass(SecureServlet.class)
                                                                                              +            .addAsResource(new File("src/main/resources/log4j.properties"))
                                                                                              +            .addAsWebInfResource((new File("src/main/webapp/WEB-INF/web.xml")));
                                                                                              +
                                                                                              +    System.out.println(war.toString(true));
                                                                                              +    return war;
                                                                                              +}
                                                                                              +
                                                                                              +
                                                                                              Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                              +
                                                                                              +
                                                                                              @Test
                                                                                              +public void testGetMethod() throws Exception {
                                                                                              +    webClient.setCredentialsProvider(correctCreds);
                                                                                              +    TextPage page = webClient.getPage(base + "/SecureServlet");
                                                                                              +    assertEquals("my GET", page.getContent());
                                                                                              +}
                                                                                              +
                                                                                              +
                                                                                              Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                              +
                                                                                              +
                                                                                              @Test
                                                                                              +public void testPostMethod() throws Exception {
                                                                                              +    webClient.setCredentialsProvider(correctCreds);
                                                                                              +    WebRequest request = new WebRequest(new URL(base + "SecureServlet"), HttpMethod.POST);
                                                                                              +    try {
                                                                                              +        TextPage p = webClient.getPage(request);
                                                                                              +        System.out.println(p.getContent());
                                                                                              +    } catch (FailingHttpStatusCodeException e) {
                                                                                              +        assertNotNull(e);
                                                                                              +        assertEquals(403, e.getStatusCode());
                                                                                              +        return;
                                                                                              +    }
                                                                                              +    fail("POST method could be called even with deny-unocvered-http-methods");
                                                                                              +}
                                                                                              +
                                                                                              +
                                                                                              Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                              +
                                                                                              +
                                                                                              @Test
                                                                                              +public void testPutMethod() throws Exception {
                                                                                              +    webClient.setCredentialsProvider(correctCreds);
                                                                                              +    WebRequest request = new WebRequest(new URL(base + "SecureServlet"), HttpMethod.PUT);
                                                                                              +    try {
                                                                                              +        TextPage p = webClient.getPage(request);
                                                                                              +        System.out.println(p.getContent());
                                                                                              +    } catch (FailingHttpStatusCodeException e) {
                                                                                              +        assertNotNull(e);
                                                                                              +        assertEquals(403, e.getStatusCode());
                                                                                              +        return;
                                                                                              +    }
                                                                                              +    fail("PUT method could be called even with deny-unocvered-http-methods");
                                                                                              +}
                                                                                              +
                                                                                              +

                                                                                              Share the Knowledge

                                                                                              Find this sample useful? Share on

                                                                                              There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                                              Help Improve

                                                                                              Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                                              Recent Changelog

                                                                                              • Jul 12, 2014: New test for programmatic registration of servlets by arun-gupta
                                                                                              • Dec 12, 2013: Adding a new sample/test to check for deny-uncovered-http element in web.xml by arun-gupta
                                                                                              How to help improve this sample
                                                                                              The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                              git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                              cd javaee7-samples/servlet/security-deny-uncovered/

                                                                                              Do the changes as you see fit and send a pull request!

                                                                                              Good Luck!

                                                                                              + \ No newline at end of file diff --git a/sample/servlet-security-form-based/index.html b/sample/servlet-security-form-based/index.html new file mode 100644 index 0000000..ec13068 --- /dev/null +++ b/sample/servlet-security-form-based/index.html @@ -0,0 +1,49 @@ +JavaEE Sample::Servlet::security-form-based

                                                                                              security-form-based

                                                                                              Run
                                                                                              How to run the sample
                                                                                              The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                              git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                              cd javaee7-samples/servlet/security-form-based/
                                                                                              Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                                              mvn test
                                                                                              Or you can run individual tests by executing one of the following:
                                                                                              mvn test -Dtest=FormTest

                                                                                              • Specifications in use:

                                                                                                FormTest

                                                                                                Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                                                                                Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                                                                                +
                                                                                                +
                                                                                                @Deployment(testable = false)
                                                                                                +public static WebArchive createDeployment() {
                                                                                                +    return ShrinkWrap.create(WebArchive.class)
                                                                                                +            .addAsWebResource(new File(WEBAPP_SRC, "index.jsp"))
                                                                                                +            .addAsWebResource(new File(WEBAPP_SRC, "loginerror.jsp"))
                                                                                                +            .addAsWebResource(new File(WEBAPP_SRC, "loginform.jsp"))
                                                                                                +            .addAsWebInfResource(new File(WEBAPP_SRC + "/WEB-INF", "web.xml"))
                                                                                                +            .addAsWebInfResource(new File(WEBAPP_SRC + "/WEB-INF", "glassfish-web.xml"));
                                                                                                +}
                                                                                                +
                                                                                                +
                                                                                                Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                                +
                                                                                                +
                                                                                                @Test
                                                                                                +public void testGetWithCorrectCredentials() throws Exception {
                                                                                                +    loginForm.getInputByName("j_username").setValueAttribute("u1");
                                                                                                +    loginForm.getInputByName("j_password").setValueAttribute("p1");
                                                                                                +    HtmlSubmitInput submitButton = loginForm.getInputByName("submitButton");
                                                                                                +    HtmlPage page2 = submitButton.click();
                                                                                                +
                                                                                                +    assertEquals("Form-based Security - Success", page2.getTitleText());
                                                                                                +}
                                                                                                +
                                                                                                +
                                                                                                Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                                +
                                                                                                +
                                                                                                @Test
                                                                                                +public void testGetWithIncorrectCredentials() throws Exception {
                                                                                                +    loginForm.getInputByName("j_username").setValueAttribute("random");
                                                                                                +    loginForm.getInputByName("j_password").setValueAttribute("random");
                                                                                                +    HtmlSubmitInput submitButton = loginForm.getInputByName("submitButton");
                                                                                                +    HtmlPage page2 = submitButton.click();
                                                                                                +
                                                                                                +    assertEquals("Form-Based Login Error Page", page2.getTitleText());
                                                                                                +}
                                                                                                +
                                                                                                +

                                                                                                Share the Knowledge

                                                                                                Find this sample useful? Share on

                                                                                                There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                                                Help Improve

                                                                                                Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                                                Recent Changelog

                                                                                                • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                                                                • Dec 14, 2013: Fixed the test by arun-gupta
                                                                                                • Dec 11, 2013: Changing the project names to be more intuitive by arun-gupta
                                                                                                How to help improve this sample
                                                                                                The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                                git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                                cd javaee7-samples/servlet/security-form-based/

                                                                                                Do the changes as you see fit and send a pull request!

                                                                                                Good Luck!

                                                                                                + \ No newline at end of file diff --git a/sample/servlet-security-programmatic/index.html b/sample/servlet-security-programmatic/index.html new file mode 100644 index 0000000..5355aee --- /dev/null +++ b/sample/servlet-security-programmatic/index.html @@ -0,0 +1,57 @@ +JavaEE Sample::Servlet::security-programmatic

                                                                                                security-programmatic

                                                                                                Run
                                                                                                How to run the sample
                                                                                                The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                                git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                                cd javaee7-samples/servlet/security-programmatic/
                                                                                                Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                                                mvn test
                                                                                                Or you can run individual tests by executing one of the following:
                                                                                                mvn test -Dtest=LoginServletTest

                                                                                                LoginServletTest

                                                                                                Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                                                                                Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                                                                                +
                                                                                                +
                                                                                                @Deployment(testable = false)
                                                                                                +public static WebArchive createDeployment() {
                                                                                                +    WebArchive war = ShrinkWrap.create(WebArchive.class).
                                                                                                +            addClass(LoginServlet.class).
                                                                                                +            addAsWebInfResource((new File(WEBAPP_SRC + "/WEB-INF", "web.xml")));
                                                                                                +    return war;
                                                                                                +}
                                                                                                +
                                                                                                +
                                                                                                Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                                +
                                                                                                +
                                                                                                @Test
                                                                                                +public void testUnauthenticatedRequest() throws IOException, SAXException {
                                                                                                +    WebClient webClient = new WebClient();
                                                                                                +    HtmlPage page = webClient.getPage(base + "/LoginServlet");
                                                                                                +    String responseText = page.asText();
                                                                                                +
                                                                                                +//        WebRequest request = new WebRequest(new URL(base + "/LoginServlet"), HttpMethod.GET);
                                                                                                +//        WebResponse response = webClient.getWebConnection().getResponse(request);
                                                                                                +//        String responseText = response.getContentAsString();
                                                                                                +
                                                                                                +    assert(responseText.contains("isUserInRole?false"));
                                                                                                +    assert(responseText.contains("getRemoteUser?null"));
                                                                                                +    assert(responseText.contains("getUserPrincipal?null"));
                                                                                                +    assert(responseText.contains("getAuthType?null"));
                                                                                                +}
                                                                                                +
                                                                                                +
                                                                                                Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                                +
                                                                                                +
                                                                                                @Test
                                                                                                +public void testAuthenticatedRequest() throws IOException, SAXException {
                                                                                                +    WebClient webClient = new WebClient();
                                                                                                +    WebRequest request = new WebRequest(new URL(base + "/LoginServlet?user=u1&password=p1"), HttpMethod.GET);
                                                                                                +    WebResponse response = webClient.getWebConnection().getResponse(request);
                                                                                                +    String responseText = response.getContentAsString();
                                                                                                +    System.out.println(responseText);
                                                                                                +
                                                                                                +    assert(responseText.contains("isUserInRole?true"));
                                                                                                +    assert(responseText.contains("getRemoteUser?u1"));
                                                                                                +    assert(responseText.contains("getUserPrincipal?u1"));
                                                                                                +    assert(responseText.contains("getAuthType?BASIC"));
                                                                                                +}
                                                                                                +
                                                                                                +

                                                                                                Share the Knowledge

                                                                                                Find this sample useful? Share on

                                                                                                There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                                                Help Improve

                                                                                                Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                                                Recent Changelog

                                                                                                • Jul 12, 2014: New test for programmatic registration of servlets by arun-gupta
                                                                                                • Dec 11, 2013: Changing the project names to be more intuitive by arun-gupta
                                                                                                How to help improve this sample
                                                                                                The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                                git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                                cd javaee7-samples/servlet/security-programmatic/

                                                                                                Do the changes as you see fit and send a pull request!

                                                                                                Good Luck!

                                                                                                + \ No newline at end of file diff --git a/sample/servlet-servlet-filters/index.html b/sample/servlet-servlet-filters/index.html new file mode 100644 index 0000000..b197d72 --- /dev/null +++ b/sample/servlet-servlet-filters/index.html @@ -0,0 +1,46 @@ +JavaEE Sample::Servlet::Servlet filters

                                                                                                Servlet filters

                                                                                                Run
                                                                                                How to run the sample
                                                                                                The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                                git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                                cd javaee7-samples/servlet/servlet-filters/
                                                                                                Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                                                mvn test
                                                                                                Or you can run individual tests by executing one of the following:
                                                                                                mvn test -Dtest=FilterServletTest

                                                                                                FilterServletTest

                                                                                                Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                                                                                Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                                                                                +
                                                                                                +
                                                                                                @Deployment
                                                                                                +public static WebArchive createDeployment() {
                                                                                                +    return ShrinkWrap.create(WebArchive.class)
                                                                                                +            .addClass(CharResponseWrapper.class)
                                                                                                +            .addClasses(TestServlet.class, FooBarFilter.class);
                                                                                                +}
                                                                                                +
                                                                                                +
                                                                                                Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                                +
                                                                                                +
                                                                                                @Test
                                                                                                +@RunAsClient
                                                                                                +public void filtered_servlet_should_return_enhanced_foobar_text() throws MalformedURLException {
                                                                                                +    Client client = ClientBuilder.newClient();
                                                                                                +    WebTarget target = client.target(URI.create(new URL(base, "filtered/TestServlet").toExternalForm()));
                                                                                                +
                                                                                                +    Response response = target.request().get();
                                                                                                +    Assert.assertThat(response.readEntity(String.class), is(equalTo("foo--bar--bar")));
                                                                                                +}
                                                                                                +
                                                                                                +
                                                                                                Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                                +
                                                                                                +
                                                                                                @Test
                                                                                                +@RunAsClient
                                                                                                +public void standard_servlet_should_return_simple_text() throws MalformedURLException {
                                                                                                +    Client client = ClientBuilder.newClient();
                                                                                                +    WebTarget target = client.target(URI.create(new URL(base, "TestServlet").toExternalForm()));
                                                                                                +
                                                                                                +    Response response = target.request().get();
                                                                                                +    Assert.assertThat(response.readEntity(String.class), is(equalTo("bar")));
                                                                                                +}
                                                                                                +
                                                                                                +

                                                                                                Share the Knowledge

                                                                                                Find this sample useful? Share on

                                                                                                There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                                                Help Improve

                                                                                                Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                                                Recent Changelog

                                                                                                • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                                                                • Dec 29, 2013: Standard junit test - exatly the same as spock specification by kubamarchwicki
                                                                                                • Dec 29, 2013: Servlet filter test #84 by kubamarchwicki
                                                                                                • Dec 13, 2013: Removing and by arun-gupta
                                                                                                • Nov 17, 2013: File upload test for arun-gupta/javaee7-samples#84 by kubamarchwicki
                                                                                                • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                                                                                • Aug 30, 2013: Better output messages by Arun Gupta
                                                                                                • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                                                                                How to help improve this sample
                                                                                                The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                                git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                                cd javaee7-samples/servlet/servlet-filters/

                                                                                                Do the changes as you see fit and send a pull request!

                                                                                                Good Luck!

                                                                                                + \ No newline at end of file diff --git a/sample/servlet-simple-servlet/index.html b/sample/servlet-simple-servlet/index.html new file mode 100644 index 0000000..a918f79 --- /dev/null +++ b/sample/servlet-simple-servlet/index.html @@ -0,0 +1,39 @@ +JavaEE Sample::Servlet::Simple servlet

                                                                                                Simple servlet

                                                                                                Run
                                                                                                How to run the sample
                                                                                                The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                                git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                                cd javaee7-samples/servlet/simple-servlet/
                                                                                                Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                                                mvn test
                                                                                                Or you can run individual tests by executing one of the following:
                                                                                                mvn test -Dtest=SimpleServletTest

                                                                                                SimpleServletTest

                                                                                                Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                                                                                Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                                                                                +
                                                                                                +
                                                                                                @Deployment(testable = false)
                                                                                                +public static WebArchive createDeployment() {
                                                                                                +    WebArchive war = ShrinkWrap.create(WebArchive.class)
                                                                                                +            .addClass(SimpleServlet.class);
                                                                                                +    return war;
                                                                                                +}
                                                                                                +
                                                                                                +
                                                                                                Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                                +
                                                                                                +
                                                                                                @Test
                                                                                                +public void testGet() throws IOException, SAXException {
                                                                                                +    TextPage page = webClient.getPage(base + "/SimpleServlet");
                                                                                                +    assertEquals("my GET", page.getContent());
                                                                                                +}
                                                                                                +
                                                                                                +
                                                                                                Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                                +
                                                                                                +
                                                                                                @Test
                                                                                                +public void testPost() throws IOException, SAXException {
                                                                                                +    WebRequest request = new WebRequest(new URL(base + "/SimpleServlet"), HttpMethod.POST);
                                                                                                +    TextPage page = webClient.getPage(request);
                                                                                                +    assertEquals("my POST", page.getContent());
                                                                                                +}
                                                                                                +
                                                                                                +

                                                                                                Share the Knowledge

                                                                                                Find this sample useful? Share on

                                                                                                There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                                                Help Improve

                                                                                                Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                                                Recent Changelog

                                                                                                • Dec 03, 2014: Adding simple-servlet module by arun-gupta
                                                                                                How to help improve this sample
                                                                                                The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                                git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                                cd javaee7-samples/servlet/simple-servlet/

                                                                                                Do the changes as you see fit and send a pull request!

                                                                                                Good Luck!

                                                                                                + \ No newline at end of file diff --git a/sample/servlet-web-fragment/index.html b/sample/servlet-web-fragment/index.html new file mode 100644 index 0000000..4b9d2fb --- /dev/null +++ b/sample/servlet-web-fragment/index.html @@ -0,0 +1,13 @@ +JavaEE Sample::Servlet::Web fragment

                                                                                                Web fragment

                                                                                                Run
                                                                                                How to run the sample
                                                                                                The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                                git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                                cd javaee7-samples/servlet/web-fragment/
                                                                                                Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                                                mvn test
                                                                                                Or you can run individual tests by executing one of the following:

                                                                                                Missing a story. Add a test case.Show me how!

                                                                                                Share the Knowledge

                                                                                                Find this sample useful? Share on

                                                                                                There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                                                Help Improve

                                                                                                Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                                                Recent Changelog

                                                                                                • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                                                                • Oct 31, 2013: Adding better debug statements by Arun Gupta
                                                                                                • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                                                                                • Aug 30, 2013: Better output messages by Arun Gupta
                                                                                                • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                                                                                How to help improve this sample
                                                                                                The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                                git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                                cd javaee7-samples/servlet/web-fragment/

                                                                                                Do the changes as you see fit and send a pull request!

                                                                                                Good Luck!

                                                                                                + \ No newline at end of file diff --git a/sample/test-utils/index.html b/sample/test-utils/index.html new file mode 100644 index 0000000..1838468 --- /dev/null +++ b/sample/test-utils/index.html @@ -0,0 +1,37 @@ +

                                                                                                undefined local variable or method `contributor' for #

                                                                                                +

                                                                                                Rendering file /home/aslak/dev/source/javaee/javaee-samples.github.io/sample/_sample.html.slim resulted in a failure.

                                                                                                +

                                                                                                Line: unknown

                                                                                                +

                                                                                                Backtrace:

                                                                                                +
                                                                                                /home/aslak/dev/source/javaee/javaee-samples.github.io/_ext/identities.rb:79:in `lookup_by_contributor_email'
                                                                                                +/home/aslak/dev/source/javaee/javaee-samples.github.io/_ext/identities.rb:65:in `lookup_by_emails'
                                                                                                +/home/aslak/dev/source/javaee/javaee-samples.github.io/_ext/identities.rb:71:in `unique_by_emails'
                                                                                                +org/jruby/RubyArray.java:2412:in `map'
                                                                                                +/home/aslak/dev/source/javaee/javaee-samples.github.io/_ext/identities.rb:71:in `unique_by_emails'
                                                                                                +/home/aslak/dev/source/javaee/javaee-samples.github.io/_layouts/base.html.slim:19:in `__singleton__'
                                                                                                +org/jruby/RubyBasicObject.java:1533:in `instance_eval'
                                                                                                +/home/aslak/dev/source/javaee/javaee-samples.github.io/_layouts/base.html.slim:-2:in `__singleton__'
                                                                                                +/home/aslak/dev/source/javaee/javaee-samples.github.io/_layouts/base.html.slim:-4:in `__tilt_7730'
                                                                                                +org/jruby/RubyMethod.java:128:in `call'
                                                                                                +/home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/tilt-2.0.1/lib/tilt/template.rb:155:in `evaluate'
                                                                                                +/home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/tilt-2.0.1/lib/tilt/template.rb:96:in `render'
                                                                                                +/home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/awestruct-0.5.5/lib/awestruct/handlers/base_tilt_handler.rb:135:in `rendered_content'
                                                                                                +/home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/awestruct-0.5.5/lib/awestruct/handlers/layout_handler.rb:47:in `rendered_content'
                                                                                                +/home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/awestruct-0.5.5/lib/awestruct/page.rb:143:in `rendered_content'
                                                                                                +/home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/awestruct-0.5.5/lib/awestruct/handlers/layout_handler.rb:54:in `rendered_content'
                                                                                                +org/jruby/RubyProc.java:271:in `call'
                                                                                                +/home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/awestruct-0.5.5/lib/awestruct/handlers/layout_handler.rb:40:in `for_layout_chain'
                                                                                                +/home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/awestruct-0.5.5/lib/awestruct/handlers/layout_handler.rb:51:in `rendered_content'
                                                                                                +/home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/awestruct-0.5.5/lib/awestruct/page.rb:143:in `rendered_content'
                                                                                                +/home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/awestruct-0.5.5/lib/awestruct/engine.rb:285:in `generate_page'
                                                                                                +/home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/awestruct-0.5.5/lib/awestruct/engine.rb:273:in `generate_output'
                                                                                                +org/jruby/RubyArray.java:1613:in `each'
                                                                                                +/home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/awestruct-0.5.5/lib/awestruct/engine.rb:270:in `generate_output'
                                                                                                +/home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/awestruct-0.5.5/lib/awestruct/engine.rb:79:in `run'
                                                                                                +/home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/awestruct-0.5.5/lib/awestruct/cli/generate.rb:21:in `run'
                                                                                                +/home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/awestruct-0.5.5/lib/awestruct/cli/invoker.rb:125:in `invoke_generate'
                                                                                                +/home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/awestruct-0.5.5/lib/awestruct/cli/invoker.rb:49:in `invoke!'
                                                                                                +/home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/awestruct-0.5.5/bin/awestruct:9:in `(root)'
                                                                                                +org/jruby/RubyKernel.java:1087:in `load'
                                                                                                +/home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/bin/awestruct:1:in `(root)'
                                                                                                +org/jruby/RubyKernel.java:1107:in `eval'
                                                                                                +/home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/bin/jruby_executable_hooks:15:in `(root)'
                                                                                                \ No newline at end of file diff --git a/sample/util/index.html b/sample/util/index.html new file mode 100644 index 0000000..a555203 --- /dev/null +++ b/sample/util/index.html @@ -0,0 +1,13 @@ +JavaEE Sample::::

                                                                                                Run
                                                                                                How to run the sample
                                                                                                The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                                git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                                cd javaee7-samples/util/
                                                                                                Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                                                mvn test
                                                                                                Or you can run individual tests by executing one of the following:

                                                                                                • Specifications in use:
                                                                                                  • Batch
                                                                                                  Missing a story. Add a test case.Show me how!

                                                                                                  Share the Knowledge

                                                                                                  Find this sample useful? Share on

                                                                                                  There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                                                  Help Improve

                                                                                                  Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                                                  Recent Changelog

                                                                                                  • Dec 14, 2014: Switch from polling on jobexecution (for job completion) to polling with joboperator and executionid by Scott Kurz
                                                                                                  • Nov 21, 2013: Moved batch-utils project one level up and renamed it to utils by Roberto Cortez
                                                                                                  How to help improve this sample
                                                                                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                                  cd javaee7-samples/util/

                                                                                                  Do the changes as you see fit and send a pull request!

                                                                                                  Good Luck!

                                                                                                  + \ No newline at end of file diff --git a/sample/validation-custom-constraint/index.html b/sample/validation-custom-constraint/index.html new file mode 100644 index 0000000..c2ed648 --- /dev/null +++ b/sample/validation-custom-constraint/index.html @@ -0,0 +1,42 @@ +JavaEE Sample::validation::Custom constraint

                                                                                                  Custom constraint

                                                                                                  Run
                                                                                                  How to run the sample
                                                                                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                                  cd javaee7-samples/validation/custom-constraint/
                                                                                                  Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                                                  mvn test
                                                                                                  Or you can run individual tests by executing one of the following:
                                                                                                  mvn test -Dtest=CustomConstraintTest

                                                                                                  CustomConstraintTest

                                                                                                  Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                                                                                  Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                                                                                  +
                                                                                                  +
                                                                                                  @Deployment
                                                                                                  +public static Archive<?> deployment() {
                                                                                                  +    WebArchive war = ShrinkWrap.create(WebArchive.class)
                                                                                                  +            .addClasses(MyBean.class, ZipCode.class, ZipCodeValidator.class)
                                                                                                  +            .addAsResource("ValidationMessages.properties");
                                                                                                  +
                                                                                                  +    System.out.println(war.toString(true));
                                                                                                  +    return war;
                                                                                                  +}
                                                                                                  +
                                                                                                  +
                                                                                                  Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                                  +
                                                                                                  +
                                                                                                  @Test
                                                                                                  +public void saveZipCodeforUs() {
                                                                                                  +    bean.saveZip("95051");
                                                                                                  +}
                                                                                                  +
                                                                                                  +
                                                                                                  Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                                  +
                                                                                                  +
                                                                                                  @Test
                                                                                                  +public void saveZipCodeForIndia() {
                                                                                                  +//        thrown.equals(ConstraintViolationException.class);
                                                                                                  +//        thrown.expectMessage("javaee7.validation.custom.constraint.ZipCode");
                                                                                                  +    thrown.expectMessage("saveZipIndia.arg0");
                                                                                                  +    bean.saveZipIndia("95051");
                                                                                                  +}
                                                                                                  +
                                                                                                  +

                                                                                                  Share the Knowledge

                                                                                                  Find this sample useful? Share on

                                                                                                  There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                                                  Help Improve

                                                                                                  Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                                                  Recent Changelog

                                                                                                  • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                                                                  • Nov 26, 2013: Add bean validation validator and annotation to deployment by Aslak Knutsen
                                                                                                  • Nov 22, 2013: Removing redundant beans.xml from archive by Arun Gupta
                                                                                                  • Nov 22, 2013: Adding properties file and some interim debug statements by Arun Gupta
                                                                                                  • Nov 13, 2013: Custom constraint validators for arun-gupta/javaee7-samples#85 by kubamarchwicki
                                                                                                  • Oct 27, 2013: Adding more descriptive output statement by Arun Gupta
                                                                                                  • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                                                                                  • Aug 28, 2013: Slightly more indicative titles and better display of results by Arun Gupta
                                                                                                  • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                                                                                  How to help improve this sample
                                                                                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                                  cd javaee7-samples/validation/custom-constraint/

                                                                                                  Do the changes as you see fit and send a pull request!

                                                                                                  Good Luck!

                                                                                                  + \ No newline at end of file diff --git a/sample/validation-methods/index.html b/sample/validation-methods/index.html new file mode 100644 index 0000000..59c819f --- /dev/null +++ b/sample/validation-methods/index.html @@ -0,0 +1,153 @@ +JavaEE Sample::validation::Methods

                                                                                                  Methods

                                                                                                  Run
                                                                                                  How to run the sample
                                                                                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                                  cd javaee7-samples/validation/methods/
                                                                                                  Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                                                  mvn test
                                                                                                  Or you can run individual tests by executing one of the following:
                                                                                                  mvn test -Dtest=ConstructorParametersConstraintsTestmvn test -Dtest=ConstructorParametersInjectionTestmvn test -Dtest=MethodParametersConstraintsTest

                                                                                                  ConstructorParametersConstraintsTest

                                                                                                  Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                                                                                  Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                                                                                  +
                                                                                                  +
                                                                                                  @Deployment
                                                                                                  +public static Archive<?> deployment() {
                                                                                                  +	return ShrinkWrap.create(JavaArchive.class)
                                                                                                  +               .addClasses(MyBean2.class, MyParameter.class)
                                                                                                  +			.addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
                                                                                                  +}
                                                                                                  +
                                                                                                  +
                                                                                                  Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                                  +
                                                                                                  +
                                                                                                  @Test
                                                                                                  +public void constructorViolationsWhenNullParameters() throws NoSuchMethodException, SecurityException {
                                                                                                  +       final MyParameter parameter = new MyParameter();
                                                                                                  +
                                                                                                  +	ExecutableValidator methodValidator = validator.forExecutables();
                                                                                                  +	Constructor<MyBean2> constructor = MyBean2.class
                                                                                                  +			.getConstructor(parameter.getClass());
                                                                                                  +
                                                                                                  +	Set<ConstraintViolation<MyBean2>> constraints = methodValidator
                                                                                                  +			.validateConstructorParameters(constructor, new Object[] {parameter});
                                                                                                  +
                                                                                                  +	ConstraintViolation<MyBean2> violation = constraints.iterator().next();
                                                                                                  +	assertThat(constraints.size(), equalTo(1));
                                                                                                  +	assertThat(violation.getMessageTemplate(), equalTo("{javax.validation.constraints.NotNull.message}"));
                                                                                                  +	assertThat(violation.getPropertyPath().toString(), equalTo("MyBean2.arg0.value"));
                                                                                                  +}
                                                                                                  +
                                                                                                  +
                                                                                                  Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                                  +
                                                                                                  +
                                                                                                  @Test
                                                                                                  +public void constructorViolationsWhenNotNullParameters() throws NoSuchMethodException, SecurityException {
                                                                                                  +	final MyParameter parameter = new MyParameter();
                                                                                                  +       parameter.setValue("foo");
                                                                                                  +
                                                                                                  +       ExecutableValidator methodValidator = validator.forExecutables();
                                                                                                  +	Constructor<MyBean2> constructor = MyBean2.class
                                                                                                  +			.getConstructor(parameter.getClass());
                                                                                                  +
                                                                                                  +	Set<ConstraintViolation<MyBean2>> constraints = methodValidator
                                                                                                  +			.validateConstructorParameters(constructor, new Object[] {parameter});
                                                                                                  +
                                                                                                  +	assertThat(constraints.isEmpty(), equalTo(true));
                                                                                                  +}
                                                                                                  +
                                                                                                  +

                                                                                                  ConstructorParametersInjectionTest

                                                                                                  Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                                                                                  Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                                                                                  +
                                                                                                  +
                                                                                                  @Deployment
                                                                                                  +public static Archive<?> deployment() {
                                                                                                  +	return ShrinkWrap.create(JavaArchive.class)
                                                                                                  +               .addClasses(MyBean2.class, MyParameter.class)
                                                                                                  +			.addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
                                                                                                  +}
                                                                                                  +
                                                                                                  +
                                                                                                  Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                                  +
                                                                                                  +
                                                                                                  @Test
                                                                                                  +public void constructorViolationsWhenNullParameters() {
                                                                                                  +       thrown.expect(ConstraintViolationException.class);
                                                                                                  +       thrown.expectMessage("javax.validation.constraints.NotNull");
                                                                                                  +       thrown.expectMessage("MyBean2.arg0.value");
                                                                                                  +	bean.getValue();
                                                                                                  +}
                                                                                                  +
                                                                                                  +

                                                                                                  MethodParametersConstraintsTest

                                                                                                  Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                                                                                  Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                                                                                  +
                                                                                                  +
                                                                                                  @Deployment
                                                                                                  +public static Archive<?> deployment() {
                                                                                                  +	return ShrinkWrap.create(JavaArchive.class).addClasses(MyBean.class)
                                                                                                  +			.addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
                                                                                                  +}
                                                                                                  +
                                                                                                  +
                                                                                                  Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                                  +
                                                                                                  +
                                                                                                  @Test
                                                                                                  +public void methodSizeTooLong() {
                                                                                                  +	thrown.expect(ConstraintViolationException.class);
                                                                                                  +	thrown.expectMessage("javax.validation.constraints.Size");
                                                                                                  +	thrown.expectMessage("org.javaee7.validation.methods.MyBean.sayHello");
                                                                                                  +	bean.sayHello("Duke");
                                                                                                  +}
                                                                                                  +
                                                                                                  +
                                                                                                  Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                                  +
                                                                                                  +
                                                                                                  @Test
                                                                                                  +public void methodSizeOk() {
                                                                                                  +	bean.sayHello("Duk");
                                                                                                  +}
                                                                                                  +
                                                                                                  +
                                                                                                  Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                                  +
                                                                                                  +
                                                                                                  @Test
                                                                                                  +public void showDateFromPast() {
                                                                                                  +	thrown.expect(ConstraintViolationException.class);
                                                                                                  +	thrown.expectMessage("javax.validation.constraints.Future");
                                                                                                  +	thrown.expectMessage("org.javaee7.validation.methods.MyBean.showDate");
                                                                                                  +	bean.showDate(false);
                                                                                                  +}
                                                                                                  +
                                                                                                  +
                                                                                                  Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                                  +
                                                                                                  +
                                                                                                  @Test
                                                                                                  +public void showDateFromFuture() {
                                                                                                  +	bean.showDate(true);
                                                                                                  +}
                                                                                                  +
                                                                                                  +
                                                                                                  Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                                  +
                                                                                                  +
                                                                                                  @Test
                                                                                                  +public void multipleParametersWithEmptyList() {
                                                                                                  +	thrown.expect(ConstraintViolationException.class);
                                                                                                  +	thrown.expectMessage("javax.validation.constraints.Size");
                                                                                                  +	thrown.expectMessage("showList.arg0");
                                                                                                  +	bean.showList(new ArrayList<String>(), "foo");
                                                                                                  +}
                                                                                                  +
                                                                                                  +
                                                                                                  Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                                  +
                                                                                                  +
                                                                                                  @Test
                                                                                                  +public void multipleParametersNullSecondParameter() {
                                                                                                  +	thrown.expect(ConstraintViolationException.class);
                                                                                                  +	thrown.expectMessage("javax.validation.constraints.NotNull");
                                                                                                  +	thrown.expectMessage("showList.arg1");
                                                                                                  +
                                                                                                  +	List<String> list = new ArrayList<>();
                                                                                                  +	list.add("bar");
                                                                                                  +	bean.showList(list, null);
                                                                                                  +}
                                                                                                  +
                                                                                                  +
                                                                                                  Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                                  +
                                                                                                  +
                                                                                                  @Test
                                                                                                  +public void multipleParametersWithCorrectValues() {
                                                                                                  +	List<String> list = new ArrayList<>();
                                                                                                  +	list.add("bar");
                                                                                                  +	list.add("woof");
                                                                                                  +	String string = bean.showList(list, "foo");
                                                                                                  +	assertThat(string, is(equalTo("foobar foowoof ")));
                                                                                                  +}
                                                                                                  +
                                                                                                  +

                                                                                                  Share the Knowledge

                                                                                                  Find this sample useful? Share on

                                                                                                  There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                                                  Help Improve

                                                                                                  Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                                                  Recent Changelog

                                                                                                  • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                                                                  • Nov 26, 2013: Typo by kubamarchwicki
                                                                                                  • Nov 26, 2013: Constructor validation injection by kubamarchwicki
                                                                                                  • Nov 22, 2013: Fixing compilation errors by Arun Gupta
                                                                                                  • Nov 14, 2013: Constructor validation check with instance injection by kubamarchwicki
                                                                                                  • Nov 14, 2013: Constructor validation tests for arun-gupta/javaee7-samples#85 by kubamarchwicki
                                                                                                  • Nov 13, 2013: Method validation tests for arun-gupta/javaee7-samples#85 by kubamarchwicki
                                                                                                  • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                                                                                  • Sep 12, 2013: Using cdi 1.1 "all" style beans.xml by Arun Gupta
                                                                                                  • Aug 28, 2013: Slightly more intuitive titles by Arun Gupta
                                                                                                  How to help improve this sample
                                                                                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                                  cd javaee7-samples/validation/methods/

                                                                                                  Do the changes as you see fit and send a pull request!

                                                                                                  Good Luck!

                                                                                                  + \ No newline at end of file diff --git a/sample/websocket-chat/index.html b/sample/websocket-chat/index.html new file mode 100644 index 0000000..e90646a --- /dev/null +++ b/sample/websocket-chat/index.html @@ -0,0 +1,44 @@ +JavaEE Sample::WebSocket::Chat

                                                                                                  Chat

                                                                                                  Run
                                                                                                  How to run the sample
                                                                                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                                  cd javaee7-samples/websocket/chat/
                                                                                                  Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                                                  mvn test
                                                                                                  Or you can run individual tests by executing one of the following:
                                                                                                  mvn test -Dtest=ChatTest

                                                                                                  ChatTest

                                                                                                  Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                                                                                  Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                                                                                  +
                                                                                                  +
                                                                                                  @Deployment(testable = false)
                                                                                                  +public static WebArchive createDeployment() {
                                                                                                  +    return ShrinkWrap.create(WebArchive.class)
                                                                                                  +            .addClasses(ChatEndpoint.class,
                                                                                                  +                    ChatClientEndpoint1.class,
                                                                                                  +                    ChatClientEndpoint2.class);
                                                                                                  +}
                                                                                                  +
                                                                                                  +
                                                                                                  Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                                  +
                                                                                                  +
                                                                                                  @Test
                                                                                                  +public void testConnect() throws URISyntaxException, DeploymentException, IOException, InterruptedException {
                                                                                                  +    ChatClientEndpoint1.latch = new CountDownLatch(1);
                                                                                                  +    final Session session1 = connectToServer(ChatClientEndpoint1.class);
                                                                                                  +    assertNotNull(session1);
                                                                                                  +    assertTrue(ChatClientEndpoint1.latch.await(2, TimeUnit.SECONDS));
                                                                                                  +
                                                                                                  +    assertEquals(ChatClientEndpoint1.TEXT, ChatClientEndpoint1.response);
                                                                                                  +
                                                                                                  +    ChatClientEndpoint1.latch = new CountDownLatch(1);
                                                                                                  +    ChatClientEndpoint2.latch = new CountDownLatch(1);
                                                                                                  +    final Session session2 = connectToServer(ChatClientEndpoint2.class);
                                                                                                  +    assertNotNull(session2);
                                                                                                  +    assertTrue(ChatClientEndpoint1.latch.await(2, TimeUnit.SECONDS));
                                                                                                  +    assertTrue(ChatClientEndpoint2.latch.await(2, TimeUnit.SECONDS));
                                                                                                  +    assertEquals(ChatClientEndpoint2.TEXT, ChatClientEndpoint1.response);
                                                                                                  +    assertEquals(ChatClientEndpoint2.TEXT, ChatClientEndpoint2.response);
                                                                                                  +}
                                                                                                  +
                                                                                                  +

                                                                                                  Share the Knowledge

                                                                                                  Find this sample useful? Share on

                                                                                                  There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                                                  Help Improve

                                                                                                  Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                                                  Recent Changelog

                                                                                                  • Oct 18, 2014: Removing copyright and splitting host into hostname/port by arun-gupta
                                                                                                  • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                                                                  • Dec 11, 2013: Adding a new test for websocket chat by arun-gupta
                                                                                                  • Dec 06, 2013: Sample is now working on wildfly by arun-gupta
                                                                                                  • Dec 06, 2013: Cleaning up javascript by arun-gupta
                                                                                                  • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                                                                                  • Aug 28, 2013: Aligning the title with other projects by Arun Gupta
                                                                                                  • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                                                                                  How to help improve this sample
                                                                                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                                  cd javaee7-samples/websocket/chat/

                                                                                                  Do the changes as you see fit and send a pull request!

                                                                                                  Good Luck!

                                                                                                  + \ No newline at end of file diff --git a/sample/websocket-encoder-client/index.html b/sample/websocket-encoder-client/index.html new file mode 100644 index 0000000..3f5a662 --- /dev/null +++ b/sample/websocket-encoder-client/index.html @@ -0,0 +1,38 @@ +JavaEE Sample::WebSocket::Encoder client

                                                                                                  Encoder client

                                                                                                  Run
                                                                                                  How to run the sample
                                                                                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                                  cd javaee7-samples/websocket/encoder-client/
                                                                                                  Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                                                  mvn test
                                                                                                  Or you can run individual tests by executing one of the following:
                                                                                                  mvn test -Dtest=MyClientTest

                                                                                                  MyClientTest

                                                                                                  Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                                                                                  +

                                                                                                  Arquillian specific method for creating a file which can be deployed +while executing the test.

                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  @Deployment(testable = false)
                                                                                                  +public static WebArchive createDeployment() {
                                                                                                  +    return ShrinkWrap.create(WebArchive.class)
                                                                                                  +            .addClasses(MyEndpoint.class,
                                                                                                  +                    MyMessage.class,
                                                                                                  +                    MyMessageEncoder.class,
                                                                                                  +                    MyMessageDecoder.class);
                                                                                                  +}
                                                                                                  +
                                                                                                  +
                                                                                                  Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                                  +
                                                                                                  +
                                                                                                  @Test
                                                                                                  +public void testEndpoint() throws URISyntaxException, DeploymentException, IOException, InterruptedException {
                                                                                                  +    String JSON = "{\"apple\":\"red\",\"banana\":\"yellow\"}";
                                                                                                  +    Session session = connectToServer(MyClient.class);
                                                                                                  +    assertNotNull(session);
                                                                                                  +    assertTrue(MyClient.latch.await(2, TimeUnit.SECONDS));
                                                                                                  +    assertEquals(JSON, MyClient.response.toString());
                                                                                                  +}
                                                                                                  +
                                                                                                  +

                                                                                                  Share the Knowledge

                                                                                                  Find this sample useful? Share on

                                                                                                  There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                                                  Help Improve

                                                                                                  Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                                                  Recent Changelog

                                                                                                  • Jul 15, 2014: Removed default header by Roberto Cortez
                                                                                                  • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                                                                  • Dec 03, 2013: Clean up websocket tests by Aslak Knutsen
                                                                                                  • Dec 01, 2013: Cleaning up some redundant outputs by arun-gupta
                                                                                                  • Nov 30, 2013: Naming the method more appropriately by arun-gupta
                                                                                                  • Nov 30, 2013: Adding a new test and removing redundant files by arun-gupta
                                                                                                  • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                                                                                  • Aug 28, 2013: Adding more meaningful titles by Arun Gupta
                                                                                                  • Aug 28, 2013: Simplifying @serverendpoint by Arun Gupta
                                                                                                  • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                                                                                  How to help improve this sample
                                                                                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                                  cd javaee7-samples/websocket/encoder-client/

                                                                                                  Do the changes as you see fit and send a pull request!

                                                                                                  Good Luck!

                                                                                                  + \ No newline at end of file diff --git a/sample/websocket-encoder-programmatic/index.html b/sample/websocket-encoder-programmatic/index.html new file mode 100644 index 0000000..693376a --- /dev/null +++ b/sample/websocket-encoder-programmatic/index.html @@ -0,0 +1,36 @@ +JavaEE Sample::WebSocket::Encoder programmatic

                                                                                                  Encoder programmatic

                                                                                                  Run
                                                                                                  How to run the sample
                                                                                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                                  cd javaee7-samples/websocket/encoder-programmatic/
                                                                                                  Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                                                  mvn test
                                                                                                  Or you can run individual tests by executing one of the following:
                                                                                                  mvn test -Dtest=MyClientTest

                                                                                                  MyClientTest

                                                                                                  Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                                                                                  Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                                                                                  +
                                                                                                  +
                                                                                                  @Deployment(testable = false)
                                                                                                  +public static WebArchive createDeployment() {
                                                                                                  +    return ShrinkWrap.create(WebArchive.class)
                                                                                                  +            .addClasses(MyEndpoint.class,
                                                                                                  +                    MyEndpointConfiguration.class,
                                                                                                  +                    MyMessage.class,
                                                                                                  +                    MyMessageEncoder.class,
                                                                                                  +                    MyMessageDecoder.class);
                                                                                                  +}
                                                                                                  +
                                                                                                  +
                                                                                                  Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                                  +
                                                                                                  +
                                                                                                  @Test
                                                                                                  +public void testEndpoint() throws URISyntaxException, DeploymentException, IOException, InterruptedException {
                                                                                                  +    final String JSON = "{\"apple\":\"red\",\"banana\":\"yellow\"}";
                                                                                                  +    Session session = connectToServer(MyClient.class);
                                                                                                  +    assertNotNull(session);
                                                                                                  +    assertTrue(MyClient.latch.await(2, TimeUnit.SECONDS));
                                                                                                  +    assertEquals(JSON, MyClient.response.toString());
                                                                                                  +}
                                                                                                  +
                                                                                                  +

                                                                                                  Share the Knowledge

                                                                                                  Find this sample useful? Share on

                                                                                                  There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                                                  Help Improve

                                                                                                  Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                                                  Recent Changelog

                                                                                                  • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                                                                  • Dec 03, 2013: Clean up websocket tests by Aslak Knutsen
                                                                                                  • Dec 01, 2013: Cleaning up some redundant outputs by arun-gupta
                                                                                                  • Nov 30, 2013: Adding a new test, still failing with handshake by arun-gupta
                                                                                                  • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                                                                                  • Aug 28, 2013: Improving the title by Arun Gupta
                                                                                                  • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                                                                                  How to help improve this sample
                                                                                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                                  cd javaee7-samples/websocket/encoder-programmatic/

                                                                                                  Do the changes as you see fit and send a pull request!

                                                                                                  Good Luck!

                                                                                                  + \ No newline at end of file diff --git a/sample/websocket-encoder/index.html b/sample/websocket-encoder/index.html new file mode 100644 index 0000000..045671c --- /dev/null +++ b/sample/websocket-encoder/index.html @@ -0,0 +1,48 @@ +JavaEE Sample::WebSocket::Encoder

                                                                                                  Encoder

                                                                                                  Run
                                                                                                  How to run the sample
                                                                                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                                  cd javaee7-samples/websocket/encoder/
                                                                                                  Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                                                  mvn test
                                                                                                  Or you can run individual tests by executing one of the following:
                                                                                                  mvn test -Dtest=EncoderEndpointTest

                                                                                                  EncoderEndpointTest

                                                                                                  Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                                                                                  +

                                                                                                  Arquillian specific method for creating a file which can be deployed +while executing the test.

                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  @Deployment(testable = false)
                                                                                                  +public static WebArchive createDeployment() {
                                                                                                  +    return ShrinkWrap.create(WebArchive.class)
                                                                                                  +            .addClasses(MyEndpoint.class,
                                                                                                  +                    MyMessage.class,
                                                                                                  +                    MyMessageEncoder.class,
                                                                                                  +                    MyMessageDecoder.class);
                                                                                                  +}
                                                                                                  +
                                                                                                  +
                                                                                                  Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                                  +
                                                                                                  +
                                                                                                  @Test
                                                                                                  +public void testEndpointEmptyJSONArray() throws URISyntaxException, DeploymentException, IOException, InterruptedException {
                                                                                                  +    final Session session = connectToServer(MyEndpointClientEmptyJSONArray.class);
                                                                                                  +    assertNotNull(session);
                                                                                                  +    assertTrue(MyEndpointClientEmptyJSONArray.latch.await(2, TimeUnit.SECONDS));
                                                                                                  +    assertEquals("{}", MyEndpointClientEmptyJSONArray.response);
                                                                                                  +}
                                                                                                  +
                                                                                                  +
                                                                                                  Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                                  +
                                                                                                  +
                                                                                                  @Test
                                                                                                  +public void testEndpointEmptyJSONObject() throws URISyntaxException, DeploymentException, IOException, InterruptedException {
                                                                                                  +    String JSON = "{\"apple\":\"red\",\"banana\":\"yellow\"}";
                                                                                                  +    Session session = connectToServer(MyEndpointClientJSONObject.class);
                                                                                                  +    assertNotNull(session);
                                                                                                  +    assertTrue(MyEndpointClientJSONObject.latch.await(2, TimeUnit.SECONDS));
                                                                                                  +    assertEquals(JSON, MyEndpointClientJSONObject.response);
                                                                                                  +}
                                                                                                  +
                                                                                                  +

                                                                                                  Share the Knowledge

                                                                                                  Find this sample useful? Share on

                                                                                                  There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                                                  Help Improve

                                                                                                  Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                                                  Recent Changelog

                                                                                                  • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                                                                  • Dec 03, 2013: Clean up websocket tests by Aslak Knutsen
                                                                                                  • Nov 30, 2013: Removing an empty line by arun-gupta
                                                                                                  • Nov 30, 2013: Adding new arquillian tests for encoder/decoder by arun-gupta
                                                                                                  • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                                                                                  • Sep 15, 2013: Adding netbeans confgiguration file by Arun Gupta
                                                                                                  • Aug 28, 2013: Improving the title by Arun Gupta
                                                                                                  • Aug 28, 2013: Aligning the title with other projects and adding meaningful prompts by Arun Gupta
                                                                                                  • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                                                                                  How to help improve this sample
                                                                                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                                  cd javaee7-samples/websocket/encoder/

                                                                                                  Do the changes as you see fit and send a pull request!

                                                                                                  Good Luck!

                                                                                                  + \ No newline at end of file diff --git a/sample/websocket-endpoint-async/index.html b/sample/websocket-endpoint-async/index.html new file mode 100644 index 0000000..0bee9db --- /dev/null +++ b/sample/websocket-endpoint-async/index.html @@ -0,0 +1,49 @@ +JavaEE Sample::WebSocket::Endpoint async

                                                                                                  Endpoint async

                                                                                                  Run
                                                                                                  How to run the sample
                                                                                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                                  cd javaee7-samples/websocket/endpoint-async/
                                                                                                  Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                                                  mvn test
                                                                                                  Or you can run individual tests by executing one of the following:
                                                                                                  mvn test -Dtest=MyAsyncEndpointTest

                                                                                                  MyAsyncEndpointTest

                                                                                                  Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                                                                                  Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                                                                                  +
                                                                                                  +
                                                                                                  @Deployment(testable = false)
                                                                                                  +public static WebArchive deploy() throws URISyntaxException {
                                                                                                  +    return ShrinkWrap.create(WebArchive.class)
                                                                                                  +            .addClass(MyAsyncEndpointText.class)
                                                                                                  +            .addClass(MyAsyncEndpointByteBuffer.class);
                                                                                                  +}
                                                                                                  +
                                                                                                  +
                                                                                                  Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                                  +
                                                                                                  +
                                                                                                  @Test
                                                                                                  +public void shouldReceiveAsyncTextMessage() throws URISyntaxException, IOException, DeploymentException {
                                                                                                  +    MyAsyncEndpointTextClient endpoint = new MyAsyncEndpointTextClient();
                                                                                                  +    Session session = connectToEndpoint(endpoint, "text");
                                                                                                  +
                                                                                                  +    session.getAsyncRemote().sendText(TEST_MESSAGE);
                                                                                                  +
                                                                                                  +    await().untilCall(to(endpoint).getReceivedMessage(), is(equalTo(TEST_MESSAGE)));
                                                                                                  +}
                                                                                                  +
                                                                                                  +
                                                                                                  Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                                  +
                                                                                                  +
                                                                                                  @Test
                                                                                                  +public void shouldReceiveAsyncByteBufferMessage() throws URISyntaxException, IOException, DeploymentException {
                                                                                                  +    final ByteBuffer buffer = ByteBuffer.wrap(TEST_MESSAGE.getBytes());
                                                                                                  +    MyAsyncEndpointByteBufferClient endpoint = new MyAsyncEndpointByteBufferClient();
                                                                                                  +    Session session = connectToEndpoint(endpoint, "bytebuffer");
                                                                                                  +
                                                                                                  +    session.getAsyncRemote().sendBinary(buffer);
                                                                                                  +
                                                                                                  +    await().untilCall(to(endpoint).getReceivedMessage(), is(notNullValue()));
                                                                                                  +    String receivedString = bufferToString(endpoint.getReceivedMessage());
                                                                                                  +    assertThat(receivedString, is(equalTo(TEST_MESSAGE)));
                                                                                                  +}
                                                                                                  +
                                                                                                  +

                                                                                                  Share the Knowledge

                                                                                                  Find this sample useful? Share on

                                                                                                  There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                                                  Help Improve

                                                                                                  Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                                                  Recent Changelog

                                                                                                  • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                                                                  • Dec 04, 2013: Arquillian tests for async websocket endpoint. part of #86 by Jacek Jackowiak
                                                                                                  • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                                                                                  • Aug 29, 2013: Renaming the package by Arun Gupta
                                                                                                  • Aug 29, 2013: Adding ; to keep javascript valid by Arun Gupta
                                                                                                  • Aug 28, 2013: Using more meaningful titles, making method names more intuitive by Arun Gupta
                                                                                                  • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                                                                                  How to help improve this sample
                                                                                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                                  cd javaee7-samples/websocket/endpoint-async/

                                                                                                  Do the changes as you see fit and send a pull request!

                                                                                                  Good Luck!

                                                                                                  + \ No newline at end of file diff --git a/sample/websocket-endpoint-config/index.html b/sample/websocket-endpoint-config/index.html new file mode 100644 index 0000000..0a931da --- /dev/null +++ b/sample/websocket-endpoint-config/index.html @@ -0,0 +1,13 @@ +JavaEE Sample::WebSocket::Endpoint config

                                                                                                  Endpoint config

                                                                                                  Run
                                                                                                  How to run the sample
                                                                                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                                  cd javaee7-samples/websocket/endpoint-config/
                                                                                                  Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                                                  mvn test
                                                                                                  Or you can run individual tests by executing one of the following:

                                                                                                  Missing a story. Add a test case.Show me how!

                                                                                                  Share the Knowledge

                                                                                                  Find this sample useful? Share on

                                                                                                  There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                                                  Help Improve

                                                                                                  Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                                                  Recent Changelog

                                                                                                  • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                                                                  • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                                                                                  • Aug 28, 2013: Meaningful titles by Arun Gupta
                                                                                                  • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                                                                                  How to help improve this sample
                                                                                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                                  cd javaee7-samples/websocket/endpoint-config/

                                                                                                  Do the changes as you see fit and send a pull request!

                                                                                                  Good Luck!

                                                                                                  + \ No newline at end of file diff --git a/sample/websocket-endpoint-javatypes/index.html b/sample/websocket-endpoint-javatypes/index.html new file mode 100644 index 0000000..b07de73 --- /dev/null +++ b/sample/websocket-endpoint-javatypes/index.html @@ -0,0 +1,13 @@ +JavaEE Sample::WebSocket::Endpoint javatypes

                                                                                                  Endpoint javatypes

                                                                                                  Run
                                                                                                  How to run the sample
                                                                                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                                  cd javaee7-samples/websocket/endpoint-javatypes/
                                                                                                  Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                                                  mvn test
                                                                                                  Or you can run individual tests by executing one of the following:

                                                                                                  Missing a story. Add a test case.Show me how!

                                                                                                  Share the Knowledge

                                                                                                  Find this sample useful? Share on

                                                                                                  There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                                                  Help Improve

                                                                                                  Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                                                  Recent Changelog

                                                                                                  • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                                                                  • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                                                                                  • Aug 28, 2013: Added support for different primitive types by Arun Gupta
                                                                                                  • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                                                                                  How to help improve this sample
                                                                                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                                  cd javaee7-samples/websocket/endpoint-javatypes/

                                                                                                  Do the changes as you see fit and send a pull request!

                                                                                                  Good Luck!

                                                                                                  + \ No newline at end of file diff --git a/sample/websocket-endpoint-programmatic-async/index.html b/sample/websocket-endpoint-programmatic-async/index.html new file mode 100644 index 0000000..31b33d4 --- /dev/null +++ b/sample/websocket-endpoint-programmatic-async/index.html @@ -0,0 +1,13 @@ +JavaEE Sample::WebSocket::Endpoint programmatic async

                                                                                                  Endpoint programmatic async

                                                                                                  Run
                                                                                                  How to run the sample
                                                                                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                                  cd javaee7-samples/websocket/endpoint-programmatic-async/
                                                                                                  Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                                                  mvn test
                                                                                                  Or you can run individual tests by executing one of the following:

                                                                                                  Missing a story. Add a test case.Show me how!

                                                                                                  Share the Knowledge

                                                                                                  Find this sample useful? Share on

                                                                                                  There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                                                  Help Improve

                                                                                                  Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                                                  Recent Changelog

                                                                                                  • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                                                                  • Nov 05, 2013: Adding better debug statements by Arun Gupta
                                                                                                  • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                                                                                  • Sep 15, 2013: Adding netbeans confgiguration file by Arun Gupta
                                                                                                  • Aug 28, 2013: Using more meaningful titles by Arun Gupta
                                                                                                  • Aug 28, 2013: Using more meaningful titles by Arun Gupta
                                                                                                  • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                                                                                  How to help improve this sample
                                                                                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                                  cd javaee7-samples/websocket/endpoint-programmatic-async/

                                                                                                  Do the changes as you see fit and send a pull request!

                                                                                                  Good Luck!

                                                                                                  + \ No newline at end of file diff --git a/sample/websocket-endpoint-programmatic-config/index.html b/sample/websocket-endpoint-programmatic-config/index.html new file mode 100644 index 0000000..6302b35 --- /dev/null +++ b/sample/websocket-endpoint-programmatic-config/index.html @@ -0,0 +1,13 @@ +JavaEE Sample::WebSocket::Endpoint programmatic config

                                                                                                  Endpoint programmatic config

                                                                                                  Run
                                                                                                  How to run the sample
                                                                                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                                  cd javaee7-samples/websocket/endpoint-programmatic-config/
                                                                                                  Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                                                  mvn test
                                                                                                  Or you can run individual tests by executing one of the following:

                                                                                                  Missing a story. Add a test case.Show me how!

                                                                                                  Share the Knowledge

                                                                                                  Find this sample useful? Share on

                                                                                                  There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                                                  Help Improve

                                                                                                  Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                                                  Recent Changelog

                                                                                                  • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                                                                  • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                                                                                  • Aug 28, 2013: Using more meaningful titles, making method names more intuitive by Arun Gupta
                                                                                                  • Aug 28, 2013: Fixed the artifactid by Arun Gupta
                                                                                                  • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                                                                                  How to help improve this sample
                                                                                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                                  cd javaee7-samples/websocket/endpoint-programmatic-config/

                                                                                                  Do the changes as you see fit and send a pull request!

                                                                                                  Good Luck!

                                                                                                  + \ No newline at end of file diff --git a/sample/websocket-endpoint-programmatic-injection/index.html b/sample/websocket-endpoint-programmatic-injection/index.html new file mode 100644 index 0000000..81f18a0 --- /dev/null +++ b/sample/websocket-endpoint-programmatic-injection/index.html @@ -0,0 +1,13 @@ +JavaEE Sample::WebSocket::Endpoint programmatic injection

                                                                                                  Endpoint programmatic injection

                                                                                                  Run
                                                                                                  How to run the sample
                                                                                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                                  cd javaee7-samples/websocket/endpoint-programmatic-injection/
                                                                                                  Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                                                  mvn test
                                                                                                  Or you can run individual tests by executing one of the following:

                                                                                                  Missing a story. Add a test case.Show me how!

                                                                                                  Share the Knowledge

                                                                                                  Find this sample useful? Share on

                                                                                                  There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                                                  Help Improve

                                                                                                  Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                                                  Recent Changelog

                                                                                                  • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                                                                  • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                                                                                  • Sep 12, 2013: Using cdi 1.1 "all" style beans.xml by Arun Gupta
                                                                                                  • Aug 28, 2013: Using more meaningful titles, making method names more intuitive by Arun Gupta
                                                                                                  • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                                                                                  How to help improve this sample
                                                                                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                                  cd javaee7-samples/websocket/endpoint-programmatic-injection/

                                                                                                  Do the changes as you see fit and send a pull request!

                                                                                                  Good Luck!

                                                                                                  + \ No newline at end of file diff --git a/sample/websocket-endpoint-programmatic/index.html b/sample/websocket-endpoint-programmatic/index.html new file mode 100644 index 0000000..b3d0cfa --- /dev/null +++ b/sample/websocket-endpoint-programmatic/index.html @@ -0,0 +1,58 @@ +JavaEE Sample::WebSocket::Endpoint programmatic

                                                                                                  Endpoint programmatic

                                                                                                  Run
                                                                                                  How to run the sample
                                                                                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                                  cd javaee7-samples/websocket/endpoint-programmatic/
                                                                                                  Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                                                  mvn test
                                                                                                  Or you can run individual tests by executing one of the following:
                                                                                                  mvn test -Dtest=MyEndpointTest

                                                                                                  MyEndpointTest

                                                                                                  Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                                                                                  Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                                                                                  +
                                                                                                  +
                                                                                                  @Deployment(testable=false)
                                                                                                  +public static WebArchive createDeployment() {
                                                                                                  +    return ShrinkWrap.create(WebArchive.class)
                                                                                                  +            .addClasses(MyEndpoint.class,
                                                                                                  +                    MyEndpointConfig.class,
                                                                                                  +                    MyEndpointTextClient.class,
                                                                                                  +                    MyEndpointBinaryClient.class);
                                                                                                  +}
                                                                                                  +
                                                                                                  +
                                                                                                  Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                                  +
                                                                                                  +
                                                                                                  @Test
                                                                                                  +public void testTextEndpoint() throws URISyntaxException, DeploymentException, IOException, InterruptedException {
                                                                                                  +    MyEndpointTextClient.latch = new CountDownLatch(1);
                                                                                                  +    final String TEXT = "Hello World!";
                                                                                                  +    Session session = connectToServer(MyEndpointTextClient.class);
                                                                                                  +    assertNotNull(session);
                                                                                                  +    session.addMessageHandler(new MessageHandler.Whole<String>() {
                                                                                                  +        @Override
                                                                                                  +        public void onMessage(String text) {
                                                                                                  +            assertEquals(TEXT, text);
                                                                                                  +        }
                                                                                                  +    });
                                                                                                  +    assertTrue(MyEndpointTextClient.latch.await(2, TimeUnit.SECONDS));
                                                                                                  +}
                                                                                                  +
                                                                                                  +
                                                                                                  Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                                  +
                                                                                                  +
                                                                                                  @Test
                                                                                                  +public void testBinaryEndpoint() throws URISyntaxException, DeploymentException, IOException, InterruptedException {
                                                                                                  +    MyEndpointBinaryClient.latch = new CountDownLatch(1);
                                                                                                  +    final String TEXT = "Hello World!";
                                                                                                  +    Session session = connectToServer(MyEndpointBinaryClient.class);
                                                                                                  +    assertNotNull(session);
                                                                                                  +    session.addMessageHandler(new MessageHandler.Whole<ByteBuffer>() {
                                                                                                  +        @Override
                                                                                                  +        public void onMessage(ByteBuffer binary) {
                                                                                                  +            assertEquals(TEXT, binary);
                                                                                                  +        }
                                                                                                  +    });
                                                                                                  +    assertTrue(MyEndpointBinaryClient.latch.await(2, TimeUnit.SECONDS));
                                                                                                  +}
                                                                                                  +
                                                                                                  +

                                                                                                  Share the Knowledge

                                                                                                  Find this sample useful? Share on

                                                                                                  There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                                                  Help Improve

                                                                                                  Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                                                  Recent Changelog

                                                                                                  • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                                                                  • Dec 03, 2013: Clean up websocket tests by Aslak Knutsen
                                                                                                  • Dec 01, 2013: Fixing the tests by arun-gupta
                                                                                                  • Nov 30, 2013: Adding a new test, still failing with handshake by arun-gupta
                                                                                                  • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                                                                                  • Aug 28, 2013: Meaningful titles and netbeans configuration files by Arun Gupta
                                                                                                  • Aug 28, 2013: Fixed the package name by Arun Gupta
                                                                                                  • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                                                                                  How to help improve this sample
                                                                                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                                  cd javaee7-samples/websocket/endpoint-programmatic/

                                                                                                  Do the changes as you see fit and send a pull request!

                                                                                                  Good Luck!

                                                                                                  + \ No newline at end of file diff --git a/sample/websocket-endpoint-security/index.html b/sample/websocket-endpoint-security/index.html new file mode 100644 index 0000000..b773e4b --- /dev/null +++ b/sample/websocket-endpoint-security/index.html @@ -0,0 +1,13 @@ +JavaEE Sample::WebSocket::Endpoint security

                                                                                                  Endpoint security

                                                                                                  Run
                                                                                                  How to run the sample
                                                                                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                                  cd javaee7-samples/websocket/endpoint-security/
                                                                                                  Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                                                  mvn test
                                                                                                  Or you can run individual tests by executing one of the following:

                                                                                                  Missing a story. Add a test case.Show me how!

                                                                                                  Share the Knowledge

                                                                                                  Find this sample useful? Share on

                                                                                                  There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                                                  Help Improve

                                                                                                  Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                                                  Recent Changelog

                                                                                                  • Oct 27, 2014: Fixing the url back by arun-gupta
                                                                                                  • Oct 27, 2014: Cleaning up source by arun-gupta
                                                                                                  • Oct 27, 2014: Removing app server specific file by arun-gupta
                                                                                                  • Oct 23, 2014: Removing redundant file by arun-gupta
                                                                                                  • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                                                                  • Nov 05, 2013: Adding better debug statements by Arun Gupta
                                                                                                  • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                                                                                  • Sep 15, 2013: Adding netbeans configuration file by Arun Gupta
                                                                                                  • Sep 12, 2013: Fixing namespace from java.sun.com -> xmlns.jcp.org and using servlet 3.1 schema. also added copyright by Arun Gupta
                                                                                                  • Aug 28, 2013: Aligned package names by Arun Gupta
                                                                                                  How to help improve this sample
                                                                                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                                  cd javaee7-samples/websocket/endpoint-security/

                                                                                                  Do the changes as you see fit and send a pull request!

                                                                                                  Good Luck!

                                                                                                  + \ No newline at end of file diff --git a/sample/websocket-endpoint-singleton/index.html b/sample/websocket-endpoint-singleton/index.html new file mode 100644 index 0000000..a634648 --- /dev/null +++ b/sample/websocket-endpoint-singleton/index.html @@ -0,0 +1,13 @@ +JavaEE Sample::WebSocket::Endpoint singleton

                                                                                                  Endpoint singleton

                                                                                                  Run
                                                                                                  How to run the sample
                                                                                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                                  cd javaee7-samples/websocket/endpoint-singleton/
                                                                                                  Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                                                  mvn test
                                                                                                  Or you can run individual tests by executing one of the following:

                                                                                                  Missing a story. Add a test case.Show me how!

                                                                                                  Share the Knowledge

                                                                                                  Find this sample useful? Share on

                                                                                                  There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                                                  Help Improve

                                                                                                  Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                                                  Recent Changelog

                                                                                                  • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                                                                  • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                                                                                  • Sep 11, 2013: New sample to show singleton instance of websocket endpoint by Arun Gupta
                                                                                                  How to help improve this sample
                                                                                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                                  cd javaee7-samples/websocket/endpoint-singleton/

                                                                                                  Do the changes as you see fit and send a pull request!

                                                                                                  Good Luck!

                                                                                                  + \ No newline at end of file diff --git a/sample/websocket-endpoint/index.html b/sample/websocket-endpoint/index.html new file mode 100644 index 0000000..8c6bbed --- /dev/null +++ b/sample/websocket-endpoint/index.html @@ -0,0 +1,74 @@ +JavaEE Sample::WebSocket::Endpoint

                                                                                                  Endpoint

                                                                                                  Run
                                                                                                  How to run the sample
                                                                                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                                  cd javaee7-samples/websocket/endpoint/
                                                                                                  Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                                                  mvn test
                                                                                                  Or you can run individual tests by executing one of the following:
                                                                                                  mvn test -Dtest=MyEndpointTest

                                                                                                  MyEndpointTest

                                                                                                  Missing a description for the story. Add some javadoc to the TestClass. Show me how!
                                                                                                  Missing a description for the deployment. Add some javadoc to the @Deployment method. Show me how!
                                                                                                  +
                                                                                                  +
                                                                                                  @Deployment(testable=false)
                                                                                                  +public static WebArchive createDeployment() {
                                                                                                  +    return ShrinkWrap.create(WebArchive.class)
                                                                                                  +            .addClasses(MyEndpointText.class,
                                                                                                  +                    MyEndpointTextClient.class,
                                                                                                  +                    MyEndpointByteArray.class,
                                                                                                  +                    MyEndpointByteArrayClient.class,
                                                                                                  +                    MyEndpointByteBuffer.class,
                                                                                                  +                    MyEndpointByteBufferClient.class,
                                                                                                  +                    MyEndpointInputStream.class,
                                                                                                  +                    MyEndpointInputStreamClient.class);
                                                                                                  +}
                                                                                                  +
                                                                                                  +
                                                                                                  Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                                  +
                                                                                                  +
                                                                                                  @Test
                                                                                                  +public void testTextEndpoint() throws URISyntaxException, DeploymentException, IOException, InterruptedException {
                                                                                                  +    MyEndpointTextClient.latch = new CountDownLatch(1);
                                                                                                  +    Session session = connectToServer(MyEndpointTextClient.class, "text");
                                                                                                  +    assertNotNull(session);
                                                                                                  +    assertTrue(MyEndpointTextClient.latch.await(2, TimeUnit.SECONDS));
                                                                                                  +    assertEquals(TEXT, MyEndpointTextClient.response);
                                                                                                  +}
                                                                                                  +
                                                                                                  +
                                                                                                  Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                                  +
                                                                                                  +
                                                                                                  @Test
                                                                                                  +public void testEndpointByteBuffer() throws URISyntaxException, DeploymentException, IOException, InterruptedException {
                                                                                                  +    MyEndpointByteBufferClient.latch = new CountDownLatch(1);
                                                                                                  +    Session session = connectToServer(MyEndpointByteBufferClient.class, "bytebuffer");
                                                                                                  +    assertNotNull(session);
                                                                                                  +    assertTrue(MyEndpointByteBufferClient.latch.await(2, TimeUnit.SECONDS));
                                                                                                  +    assertArrayEquals(TEXT.getBytes(), MyEndpointByteBufferClient.response);
                                                                                                  +}
                                                                                                  +
                                                                                                  +
                                                                                                  Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                                  +
                                                                                                  +
                                                                                                  @Test
                                                                                                  +public void testEndpointByteArray() throws DeploymentException, IOException, URISyntaxException, InterruptedException {
                                                                                                  +    MyEndpointByteArrayClient.latch = new CountDownLatch(1);
                                                                                                  +    Session session = connectToServer(MyEndpointByteArrayClient.class, "bytearray");
                                                                                                  +    assertNotNull(session);
                                                                                                  +    assertTrue(MyEndpointByteArrayClient.latch.await(2, TimeUnit.SECONDS));
                                                                                                  +    assertNotNull(MyEndpointByteArrayClient.response);
                                                                                                  +    assertArrayEquals(TEXT.getBytes(), MyEndpointByteArrayClient.response);
                                                                                                  +}
                                                                                                  +
                                                                                                  +
                                                                                                  Missing a description for the test scenario. Add some javadoc to the @Test method. Show me how!
                                                                                                  +
                                                                                                  +
                                                                                                  @Test
                                                                                                  +public void testEndpointInputStream() throws DeploymentException, IOException, URISyntaxException, InterruptedException {
                                                                                                  +    MyEndpointInputStreamClient.latch = new CountDownLatch(1);
                                                                                                  +    Session session = connectToServer(MyEndpointInputStreamClient.class, "inputstream");
                                                                                                  +    assertNotNull(session);
                                                                                                  +    assertTrue(MyEndpointInputStreamClient.latch.await(2, TimeUnit.SECONDS));
                                                                                                  +    assertNotNull(MyEndpointInputStreamClient.response);
                                                                                                  +    assertArrayEquals(TEXT.getBytes(), MyEndpointInputStreamClient.response);
                                                                                                  +}
                                                                                                  +
                                                                                                  +

                                                                                                  Share the Knowledge

                                                                                                  Find this sample useful? Share on

                                                                                                  There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                                                  Help Improve

                                                                                                  Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                                                  Recent Changelog

                                                                                                  • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                                                                  • Dec 03, 2013: Clean up websocket tests by Aslak Knutsen
                                                                                                  • Dec 01, 2013: Moving binary tests to endpoint by arun-gupta
                                                                                                  • Dec 01, 2013: Converting to arquillian-enabled tests by arun-gupta
                                                                                                  • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                                                                                  • Aug 28, 2013: Improving the title by Arun Gupta
                                                                                                  • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                                                                                  How to help improve this sample
                                                                                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                                  cd javaee7-samples/websocket/endpoint/

                                                                                                  Do the changes as you see fit and send a pull request!

                                                                                                  Good Luck!

                                                                                                  + \ No newline at end of file diff --git a/sample/websocket-httpsession/index.html b/sample/websocket-httpsession/index.html new file mode 100644 index 0000000..b70e39f --- /dev/null +++ b/sample/websocket-httpsession/index.html @@ -0,0 +1,13 @@ +JavaEE Sample::WebSocket::Httpsession

                                                                                                  Httpsession

                                                                                                  Run
                                                                                                  How to run the sample
                                                                                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                                  cd javaee7-samples/websocket/httpsession/
                                                                                                  Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                                                  mvn test
                                                                                                  Or you can run individual tests by executing one of the following:

                                                                                                  Missing a story. Add a test case.Show me how!

                                                                                                  Share the Knowledge

                                                                                                  Find this sample useful? Share on

                                                                                                  There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                                                  Help Improve

                                                                                                  Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                                                  Recent Changelog

                                                                                                  • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                                                                  • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                                                                                  • Aug 28, 2013: Using more meaningful messages by Arun Gupta
                                                                                                  • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                                                                                  How to help improve this sample
                                                                                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                                  cd javaee7-samples/websocket/httpsession/

                                                                                                  Do the changes as you see fit and send a pull request!

                                                                                                  Good Luck!

                                                                                                  + \ No newline at end of file diff --git a/sample/websocket-injection/index.html b/sample/websocket-injection/index.html new file mode 100644 index 0000000..a69c4db --- /dev/null +++ b/sample/websocket-injection/index.html @@ -0,0 +1,13 @@ +JavaEE Sample::WebSocket::Injection

                                                                                                  Injection

                                                                                                  Run
                                                                                                  How to run the sample
                                                                                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                                  cd javaee7-samples/websocket/injection/
                                                                                                  Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                                                  mvn test
                                                                                                  Or you can run individual tests by executing one of the following:

                                                                                                  Missing a story. Add a test case.Show me how!

                                                                                                  Share the Knowledge

                                                                                                  Find this sample useful? Share on

                                                                                                  There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                                                  Help Improve

                                                                                                  Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                                                  Recent Changelog

                                                                                                  • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                                                                  • Nov 05, 2013: Adding better debug statements by Arun Gupta
                                                                                                  • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                                                                                  • Sep 15, 2013: Adding netbeans confgiguration file by Arun Gupta
                                                                                                  • Aug 28, 2013: Better messages by Arun Gupta
                                                                                                  • Aug 28, 2013: Changing to "all" style by Arun Gupta
                                                                                                  • Aug 28, 2013: Simplifying annotation by Arun Gupta
                                                                                                  • Aug 28, 2013: Removing fields that cannot be injected here by Arun Gupta
                                                                                                  • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                                                                                  How to help improve this sample
                                                                                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                                  cd javaee7-samples/websocket/injection/

                                                                                                  Do the changes as you see fit and send a pull request!

                                                                                                  Good Luck!

                                                                                                  + \ No newline at end of file diff --git a/sample/websocket-javase-client/index.html b/sample/websocket-javase-client/index.html new file mode 100644 index 0000000..0488d19 --- /dev/null +++ b/sample/websocket-javase-client/index.html @@ -0,0 +1,13 @@ +JavaEE Sample::WebSocket::Javase client

                                                                                                  Javase client

                                                                                                  Run
                                                                                                  How to run the sample
                                                                                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                                  cd javaee7-samples/websocket/javase-client/
                                                                                                  Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                                                  mvn test
                                                                                                  Or you can run individual tests by executing one of the following:

                                                                                                  Missing a story. Add a test case.Show me how!

                                                                                                  Share the Knowledge

                                                                                                  Find this sample useful? Share on

                                                                                                  There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                                                  Help Improve

                                                                                                  Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                                                  Recent Changelog

                                                                                                  • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                                                                  • Nov 06, 2013: Adding changes in the pom.xml by cirix
                                                                                                  • Aug 29, 2013: Adding netbeans configuration file by Arun Gupta
                                                                                                  • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                                                                                  How to help improve this sample
                                                                                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                                  cd javaee7-samples/websocket/javase-client/

                                                                                                  Do the changes as you see fit and send a pull request!

                                                                                                  Good Luck!

                                                                                                  + \ No newline at end of file diff --git a/sample/websocket-messagesize/index.html b/sample/websocket-messagesize/index.html new file mode 100644 index 0000000..fb0e29b --- /dev/null +++ b/sample/websocket-messagesize/index.html @@ -0,0 +1,13 @@ +JavaEE Sample::WebSocket::Messagesize

                                                                                                  Messagesize

                                                                                                  Run
                                                                                                  How to run the sample
                                                                                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                                  cd javaee7-samples/websocket/messagesize/
                                                                                                  Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                                                  mvn test
                                                                                                  Or you can run individual tests by executing one of the following:

                                                                                                  Missing a story. Add a test case.Show me how!

                                                                                                  Share the Knowledge

                                                                                                  Find this sample useful? Share on

                                                                                                  There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                                                  Help Improve

                                                                                                  Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                                                  Recent Changelog

                                                                                                  • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                                                                  • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                                                                                  • Aug 29, 2013: Better messages by Arun Gupta
                                                                                                  • Aug 29, 2013: Adding ; to keep javascript valid by Arun Gupta
                                                                                                  • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                                                                                  How to help improve this sample
                                                                                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                                  cd javaee7-samples/websocket/messagesize/

                                                                                                  Do the changes as you see fit and send a pull request!

                                                                                                  Good Luck!

                                                                                                  + \ No newline at end of file diff --git a/sample/websocket-parameters/index.html b/sample/websocket-parameters/index.html new file mode 100644 index 0000000..860af0a --- /dev/null +++ b/sample/websocket-parameters/index.html @@ -0,0 +1,13 @@ +JavaEE Sample::WebSocket::Parameters

                                                                                                  Parameters

                                                                                                  Run
                                                                                                  How to run the sample
                                                                                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                                  cd javaee7-samples/websocket/parameters/
                                                                                                  Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                                                  mvn test
                                                                                                  Or you can run individual tests by executing one of the following:

                                                                                                  Missing a story. Add a test case.Show me how!

                                                                                                  Share the Knowledge

                                                                                                  Find this sample useful? Share on

                                                                                                  There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                                                  Help Improve

                                                                                                  Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                                                  Recent Changelog

                                                                                                  • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                                                                  • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                                                                                  • Aug 29, 2013: Better messages by Arun Gupta
                                                                                                  • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                                                                                  How to help improve this sample
                                                                                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                                  cd javaee7-samples/websocket/parameters/

                                                                                                  Do the changes as you see fit and send a pull request!

                                                                                                  Good Luck!

                                                                                                  + \ No newline at end of file diff --git a/sample/websocket-properties/index.html b/sample/websocket-properties/index.html new file mode 100644 index 0000000..04f1e91 --- /dev/null +++ b/sample/websocket-properties/index.html @@ -0,0 +1,13 @@ +JavaEE Sample::WebSocket::Properties

                                                                                                  Properties

                                                                                                  Run
                                                                                                  How to run the sample
                                                                                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                                  cd javaee7-samples/websocket/properties/
                                                                                                  Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                                                  mvn test
                                                                                                  Or you can run individual tests by executing one of the following:

                                                                                                  Missing a story. Add a test case.Show me how!

                                                                                                  Share the Knowledge

                                                                                                  Find this sample useful? Share on

                                                                                                  There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                                                  Help Improve

                                                                                                  Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                                                  Recent Changelog

                                                                                                  • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                                                                  • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                                                                                  • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                                                                                  How to help improve this sample
                                                                                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                                  cd javaee7-samples/websocket/properties/

                                                                                                  Do the changes as you see fit and send a pull request!

                                                                                                  Good Luck!

                                                                                                  + \ No newline at end of file diff --git a/sample/websocket-subprotocol/index.html b/sample/websocket-subprotocol/index.html new file mode 100644 index 0000000..41592be --- /dev/null +++ b/sample/websocket-subprotocol/index.html @@ -0,0 +1,13 @@ +JavaEE Sample::WebSocket::Subprotocol

                                                                                                  Subprotocol

                                                                                                  Run
                                                                                                  How to run the sample
                                                                                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                                  cd javaee7-samples/websocket/subprotocol/
                                                                                                  Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                                                  mvn test
                                                                                                  Or you can run individual tests by executing one of the following:

                                                                                                  Missing a story. Add a test case.Show me how!

                                                                                                  Share the Knowledge

                                                                                                  Find this sample useful? Share on

                                                                                                  There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                                                  Help Improve

                                                                                                  Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                                                  Recent Changelog

                                                                                                  • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                                                                  • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                                                                                  • Aug 29, 2013: Better messages and netbeans configuration file by Arun Gupta
                                                                                                  • Aug 29, 2013: Fixing the package name by Arun Gupta
                                                                                                  • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                                                                                  How to help improve this sample
                                                                                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                                  cd javaee7-samples/websocket/subprotocol/

                                                                                                  Do the changes as you see fit and send a pull request!

                                                                                                  Good Luck!

                                                                                                  + \ No newline at end of file diff --git a/sample/websocket-websocket-client-config/index.html b/sample/websocket-websocket-client-config/index.html new file mode 100644 index 0000000..da9e7cd --- /dev/null +++ b/sample/websocket-websocket-client-config/index.html @@ -0,0 +1,13 @@ +JavaEE Sample::WebSocket::Websocket client config

                                                                                                  Websocket client config

                                                                                                  Run
                                                                                                  How to run the sample
                                                                                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                                  cd javaee7-samples/websocket/websocket-client-config/
                                                                                                  Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                                                  mvn test
                                                                                                  Or you can run individual tests by executing one of the following:

                                                                                                  Missing a story. Add a test case.Show me how!

                                                                                                  Share the Knowledge

                                                                                                  Find this sample useful? Share on

                                                                                                  There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                                                  Help Improve

                                                                                                  Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                                                  Recent Changelog

                                                                                                  • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                                                                  • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                                                                                  • Aug 29, 2013: Fixing package name by Arun Gupta
                                                                                                  • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                                                                                  How to help improve this sample
                                                                                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                                  cd javaee7-samples/websocket/websocket-client-config/

                                                                                                  Do the changes as you see fit and send a pull request!

                                                                                                  Good Luck!

                                                                                                  + \ No newline at end of file diff --git a/sample/websocket-websocket-client-programmatic-config/index.html b/sample/websocket-websocket-client-programmatic-config/index.html new file mode 100644 index 0000000..eb11c20 --- /dev/null +++ b/sample/websocket-websocket-client-programmatic-config/index.html @@ -0,0 +1,13 @@ +JavaEE Sample::WebSocket::Websocket client programmatic config

                                                                                                  Websocket client programmatic config

                                                                                                  Run
                                                                                                  How to run the sample
                                                                                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                                  cd javaee7-samples/websocket/websocket-client-programmatic-config/
                                                                                                  Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                                                  mvn test
                                                                                                  Or you can run individual tests by executing one of the following:

                                                                                                  Missing a story. Add a test case.Show me how!

                                                                                                  Share the Knowledge

                                                                                                  Find this sample useful? Share on

                                                                                                  There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                                                  Help Improve

                                                                                                  Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                                                  Recent Changelog

                                                                                                  • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                                                                  • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                                                                                  • Aug 29, 2013: Fixing package name by Arun Gupta
                                                                                                  • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                                                                                  How to help improve this sample
                                                                                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                                  cd javaee7-samples/websocket/websocket-client-programmatic-config/

                                                                                                  Do the changes as you see fit and send a pull request!

                                                                                                  Good Luck!

                                                                                                  + \ No newline at end of file diff --git a/sample/websocket-websocket-client-programmatic-encoders/index.html b/sample/websocket-websocket-client-programmatic-encoders/index.html new file mode 100644 index 0000000..07706e2 --- /dev/null +++ b/sample/websocket-websocket-client-programmatic-encoders/index.html @@ -0,0 +1,13 @@ +JavaEE Sample::WebSocket::Websocket client programmatic encoders

                                                                                                  Websocket client programmatic encoders

                                                                                                  Run
                                                                                                  How to run the sample
                                                                                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                                  cd javaee7-samples/websocket/websocket-client-programmatic-encoders/
                                                                                                  Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                                                  mvn test
                                                                                                  Or you can run individual tests by executing one of the following:

                                                                                                  Missing a story. Add a test case.Show me how!

                                                                                                  Share the Knowledge

                                                                                                  Find this sample useful? Share on

                                                                                                  There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                                                  Help Improve

                                                                                                  Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                                                  Recent Changelog

                                                                                                  • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                                                                  • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                                                                                  • Aug 29, 2013: Fixing package name by Arun Gupta
                                                                                                  • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                                                                                  How to help improve this sample
                                                                                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                                  cd javaee7-samples/websocket/websocket-client-programmatic-encoders/

                                                                                                  Do the changes as you see fit and send a pull request!

                                                                                                  Good Luck!

                                                                                                  + \ No newline at end of file diff --git a/sample/websocket-websocket-client-programmatic/index.html b/sample/websocket-websocket-client-programmatic/index.html new file mode 100644 index 0000000..0b8e896 --- /dev/null +++ b/sample/websocket-websocket-client-programmatic/index.html @@ -0,0 +1,13 @@ +JavaEE Sample::WebSocket::Websocket client programmatic

                                                                                                  Websocket client programmatic

                                                                                                  Run
                                                                                                  How to run the sample
                                                                                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                                  cd javaee7-samples/websocket/websocket-client-programmatic/
                                                                                                  Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                                                  mvn test
                                                                                                  Or you can run individual tests by executing one of the following:

                                                                                                  Missing a story. Add a test case.Show me how!

                                                                                                  Share the Knowledge

                                                                                                  Find this sample useful? Share on

                                                                                                  There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                                                  Help Improve

                                                                                                  Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                                                  Recent Changelog

                                                                                                  • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                                                                  • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                                                                                  • Aug 29, 2013: Fixing package name by Arun Gupta
                                                                                                  • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                                                                                  How to help improve this sample
                                                                                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                                  cd javaee7-samples/websocket/websocket-client-programmatic/

                                                                                                  Do the changes as you see fit and send a pull request!

                                                                                                  Good Luck!

                                                                                                  + \ No newline at end of file diff --git a/sample/websocket-websocket-client/index.html b/sample/websocket-websocket-client/index.html new file mode 100644 index 0000000..2d6d659 --- /dev/null +++ b/sample/websocket-websocket-client/index.html @@ -0,0 +1,13 @@ +JavaEE Sample::WebSocket::Websocket client

                                                                                                  Websocket client

                                                                                                  Run
                                                                                                  How to run the sample
                                                                                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                                  cd javaee7-samples/websocket/websocket-client/
                                                                                                  Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                                                  mvn test
                                                                                                  Or you can run individual tests by executing one of the following:

                                                                                                  Missing a story. Add a test case.Show me how!

                                                                                                  Share the Knowledge

                                                                                                  Find this sample useful? Share on

                                                                                                  There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                                                  Help Improve

                                                                                                  Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                                                  Recent Changelog

                                                                                                  • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                                                                  • Dec 20, 2013: Cleaning up the code by arun-gupta
                                                                                                  • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                                                                                  • Aug 29, 2013: Better messages and netbeans configuration file by Arun Gupta
                                                                                                  • Aug 29, 2013: Fixing the package name by Arun Gupta
                                                                                                  • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                                                                                  How to help improve this sample
                                                                                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                                  cd javaee7-samples/websocket/websocket-client/

                                                                                                  Do the changes as you see fit and send a pull request!

                                                                                                  Good Luck!

                                                                                                  + \ No newline at end of file diff --git a/sample/websocket-websocket-vs-rest-payload/index.html b/sample/websocket-websocket-vs-rest-payload/index.html new file mode 100644 index 0000000..4116cfe --- /dev/null +++ b/sample/websocket-websocket-vs-rest-payload/index.html @@ -0,0 +1,13 @@ +JavaEE Sample::WebSocket::Websocket vs rest payload

                                                                                                  Websocket vs rest payload

                                                                                                  Run
                                                                                                  How to run the sample
                                                                                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                                  cd javaee7-samples/websocket/websocket-vs-rest-payload/
                                                                                                  Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                                                  mvn test
                                                                                                  Or you can run individual tests by executing one of the following:

                                                                                                  Missing a story. Add a test case.Show me how!

                                                                                                  Share the Knowledge

                                                                                                  Find this sample useful? Share on

                                                                                                  There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                                                  Help Improve

                                                                                                  Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                                                  Recent Changelog

                                                                                                  • Feb 21, 2014: Adding a simple sample to compare rest and websocket payloads by arun-gupta
                                                                                                  How to help improve this sample
                                                                                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                                  cd javaee7-samples/websocket/websocket-vs-rest-payload/

                                                                                                  Do the changes as you see fit and send a pull request!

                                                                                                  Good Luck!

                                                                                                  + \ No newline at end of file diff --git a/sample/websocket-websocket-vs-rest/index.html b/sample/websocket-websocket-vs-rest/index.html new file mode 100644 index 0000000..c0faa79 --- /dev/null +++ b/sample/websocket-websocket-vs-rest/index.html @@ -0,0 +1,13 @@ +JavaEE Sample::WebSocket::Websocket vs rest

                                                                                                  Websocket vs rest

                                                                                                  Run
                                                                                                  How to run the sample
                                                                                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                                  cd javaee7-samples/websocket/websocket-vs-rest/
                                                                                                  Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                                                  mvn test
                                                                                                  Or you can run individual tests by executing one of the following:

                                                                                                  Missing a story. Add a test case.Show me how!

                                                                                                  Share the Knowledge

                                                                                                  Find this sample useful? Share on

                                                                                                  There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                                                  Help Improve

                                                                                                  Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                                                  Recent Changelog

                                                                                                  • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                                                                  • Nov 10, 2013: Clean for pull request by Maxime Gréau
                                                                                                  • Nov 10, 2013: On chrome/wildfly, rest client doesn't work. seems that xmlhttprequest by Maxime Gréau
                                                                                                  • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                                                                                  • Aug 29, 2013: Adding netbeans configuration file by Arun Gupta
                                                                                                  • Aug 29, 2013: Removing accidentally added jersey dependencies by Arun Gupta
                                                                                                  • Aug 29, 2013: Cleaning up code by Arun Gupta
                                                                                                  • Aug 29, 2013: Removing redundant code by Arun Gupta
                                                                                                  • Aug 29, 2013: Removing redundant imports by Arun Gupta
                                                                                                  • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                                                                                  How to help improve this sample
                                                                                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                                  cd javaee7-samples/websocket/websocket-vs-rest/

                                                                                                  Do the changes as you see fit and send a pull request!

                                                                                                  Good Luck!

                                                                                                  + \ No newline at end of file diff --git a/sample/websocket-whiteboard/index.html b/sample/websocket-whiteboard/index.html new file mode 100644 index 0000000..5f7361b --- /dev/null +++ b/sample/websocket-whiteboard/index.html @@ -0,0 +1,13 @@ +JavaEE Sample::WebSocket::Whiteboard

                                                                                                  Whiteboard

                                                                                                  Run
                                                                                                  How to run the sample
                                                                                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing we need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                                  cd javaee7-samples/websocket/whiteboard/
                                                                                                  Now we are ready to start testing. You can run all the tests in this sample by executing:
                                                                                                  mvn test
                                                                                                  Or you can run individual tests by executing one of the following:

                                                                                                  Missing a story. Add a test case.Show me how!

                                                                                                  Share the Knowledge

                                                                                                  Find this sample useful? Share on

                                                                                                  There's a lot more about JavaEE to cover. If you're ready to learn more, check out the other available samples.

                                                                                                  Help Improve

                                                                                                  Find a bug in the sample? Something missing? You can fix it by editing the source, making the correction and sending a pull request. Or report the problem to the issue tracker

                                                                                                  Recent Changelog

                                                                                                  • Oct 18, 2014: Removing copyright and splitting host into hostname/port by arun-gupta
                                                                                                  • Jul 15, 2014: Removed header license. the licensing is now referenced in the license file in the root of the project by Roberto Cortez
                                                                                                  • Jun 06, 2014: Cleaning up the loggers and using container-managed client sessions instead of user-managed by arun-gupta
                                                                                                  • Mar 27, 2014: Clean up whiteboard sample by Philippe Marschall
                                                                                                  • Sep 17, 2013: Removing netbeans configuration file by Arun Gupta
                                                                                                  • Aug 28, 2013: Making set final by Arun Gupta
                                                                                                  • Aug 28, 2013: Cleaned up title by Arun Gupta
                                                                                                  • Aug 27, 2013: Moving the source code from http://svn.java.net/svn/glassfish~svn/branches/arun/javaee7-samples/samples/ by Arun Gupta
                                                                                                  How to help improve this sample
                                                                                                  The source code for this sample can be found in the javaee7-samples GitHub repository. The first thing you need to do is to get the source by downloading the repository and then go into the samples folder:
                                                                                                  git clone git://github.com/javaee-samples/javaee7-samples.git
                                                                                                  cd javaee7-samples/websocket/whiteboard/

                                                                                                  Do the changes as you see fit and send a pull request!

                                                                                                  Good Luck!

                                                                                                  + \ No newline at end of file diff --git a/sitemap.xml b/sitemap.xml new file mode 100644 index 0000000..3f772c3 --- /dev/null +++ b/sitemap.xml @@ -0,0 +1,1257 @@ + + + + http://javaee.support/CNAME + 2014-12-18 + 0.1 + never + + + http://javaee.support/LICENSE + 2014-12-18 + 0.1 + never + + + http://javaee.support/README/ + 2014-12-18 + 0.1 + never + + + http://javaee.support/contribute/ + 2014-12-18 + 0.1 + never + + + http://javaee.support/contributors/ + 2014-12-18 + 0.1 + never + + + http://javaee.support/humans.txt + 2014-12-18 + 0.1 + never + + + http://javaee.support/ + 2014-12-18 + 0.1 + never + + + http://javaee.support/sample/ + 2014-12-18 + 0.1 + never + + + http://javaee.support/sample/index.json + 2014-12-18 + 0.1 + never + + + http://javaee.support/stylesheets/foundation-icons.eot + 2014-12-18 + 0.1 + never + + + http://javaee.support/stylesheets/foundation-icons.svg + 2014-12-18 + 0.1 + never + + + http://javaee.support/stylesheets/foundation-icons.ttf + 2014-12-18 + 0.1 + never + + + http://javaee.support/stylesheets/foundation-icons.woff + 2014-12-18 + 0.1 + never + + + http://javaee.support/sample/test-utils/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/batch-batchlet-simple/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/batch-chunk-checkpoint/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/batch-chunk-csv-database/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/batch-chunk-exception/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/batch-chunk-mapper/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/batch-chunk-optional-processor/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/batch-chunk-partition/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/batch-chunk-simple/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/batch-decision/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/batch-flow/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/batch-batch-listeners/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/batch-multiple-steps/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/batch-split/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/batch-chunk-simple-nobeans/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/batch-scheduling/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/cdi-vetoed/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/cdi-pkg-level/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/cdi-decorators/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/cdi-bean-discovery-all/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/cdi-bean-discovery-annotated/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/cdi-bean-discovery-none/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/cdi-exclude-filter/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/cdi-built-in/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/cdi-interceptors/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/cdi-interceptors-priority/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/cdi-nobeans-xml/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/cdi-beansxml-noversion/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/cdi-beanmanager/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/cdi-extension/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/cdi-scopes/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/cdi-alternatives/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/cdi-alternatives-priority/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/cdi-nobeans-el-injection/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/cdi-nobeans-el-injection-flowscoped/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/cdi-events/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/concurrency-managedexecutor/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/concurrency-managedscheduledexecutor/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/concurrency-managedthreadfactory/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/concurrency-dynamicproxy/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/ejb-embeddable/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/ejb-lifecycle/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/ejb-singleton/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/ejb-stateful/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/ejb-stateless/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/ejb-timer/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/ejb-async-ejb/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/el-standalone/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/interceptor-around-construct/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/javamail-definition/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jaspic-common/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jaspic-async-authentication/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jaspic-basic-authentication/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jaspic-ejb-propagation/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jaspic-lifecycle/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jaspic-register-session/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jaspic-wrapping/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jacc-contexts/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jaxrs-angularjs/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jaxrs-async-client/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jaxrs-async-server/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jaxrs-beanvalidation/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jaxrs-beanparam/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jaxrs-client-negotiation/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jaxrs-dynamicfilter/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jaxrs-fileupload/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jaxrs-filter/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jaxrs-filter-interceptor/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jaxrs-interceptor/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jaxrs-invocation/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jaxrs-invocation-async/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jaxrs-jaxrs-client/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jaxrs-jaxrs-endpoint/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jaxrs-jsonp/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jaxrs-link/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jaxrs-mapping-exceptions/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jaxrs-paramconverter/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jaxrs-readerwriter/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jaxrs-readerwriter-json/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jaxrs-request-binding/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jaxrs-resource-validation/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jaxrs-server-negotiation/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jaxrs-singleton/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jaxrs-readerwriter-injection/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jaxrs-jaxrs-security-declarative/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jaxrs-db-access/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jaxws-jaxws-endpoint/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jaxws-jaxws-client/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jca-connector-simple-connector/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jms-jms-xa/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jms-send-receive/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jms-temp-destination/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jms-jms-batch/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jpa-criteria/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jpa-datasourcedefinition/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jpa-datasourcedefinition-webxml-pu/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jpa-datasourcedefinition-annotation-pu/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jpa-datasourcedefinition-applicationxml-pu/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jpa-dynamic-named-query/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jpa-entitygraph/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jpa-listeners/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jpa-listeners-injection/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jpa-multiple-pu/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jpa-storedprocedure/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jpa-jndi-context/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jpa-locking-optimistic/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jpa-locking-pessimistic/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jpa-ordercolumn/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jpa-pu-typesafe/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jpa-schema-gen-metadata/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jpa-schema-gen-scripts/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jpa-schema-gen-scripts-external/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jpa-schema-gen-scripts-generate/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jpa-schema-gen-index/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jpa-native-sql/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jpa-native-sql-resultset-mapping/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jpa-unsynchronized-pc/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jpa-extended-pc/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jpa-jpa-converter/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jpa-default-datasource/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jta-transactional/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jta-tx-exception/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jta-user-transaction/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jsf-ajax/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jsf-bean-validation/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jsf-components/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jsf-composite-component/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jsf-contracts/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jsf-contracts-library/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jsf-contracts-library-impl/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jsf-file-upload/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jsf-flows-simple/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jsf-flows-mixed/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jsf-flows-programmatic/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jsf-flows-declarative/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jsf-http-get/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jsf-passthrough/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jsf-radio-buttons/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jsf-resource-handling/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jsf-simple-facelet/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jsf-server-extension/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/jsf-viewscoped/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/json-object-builder/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/json-object-reader/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/json-streaming-generate/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/json-streaming-parser/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/servlet-cookies/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/servlet-async-servlet/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/servlet-error-mapping/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/servlet-event-listeners/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/servlet-metadata-complete/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/servlet-nonblocking/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/servlet-protocol-handler/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/servlet-resource-packaging/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/servlet-servlet-filters/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/servlet-file-upload/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/servlet-web-fragment/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/servlet-security-basicauth/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/servlet-security-form-based/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/servlet-security-programmatic/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/servlet-security-deny-uncovered/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/servlet-security-basicauth-omission/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/servlet-programmatic-registration/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/servlet-simple-servlet/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/validation-methods/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/validation-custom-constraint/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/websocket-chat/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/websocket-encoder/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/websocket-encoder-client/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/websocket-encoder-programmatic/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/websocket-endpoint/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/websocket-endpoint-async/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/websocket-endpoint-javatypes/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/websocket-endpoint-config/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/websocket-endpoint-programmatic/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/websocket-endpoint-programmatic-async/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/websocket-endpoint-programmatic-config/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/websocket-endpoint-programmatic-injection/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/websocket-endpoint-security/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/websocket-httpsession/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/websocket-injection/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/websocket-javase-client/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/websocket-messagesize/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/websocket-parameters/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/websocket-properties/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/websocket-websocket-vs-rest/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/websocket-subprotocol/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/websocket-websocket-client/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/websocket-websocket-client-config/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/websocket-websocket-client-programmatic/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/websocket-websocket-client-programmatic-config/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/websocket-websocket-client-programmatic-encoders/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/websocket-whiteboard/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/websocket-endpoint-singleton/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/websocket-websocket-vs-rest-payload/ + 2014-12-18 + 0.9 + monthly + + + http://javaee.support/sample/util/ + 2014-12-18 + 0.9 + monthly + + diff --git a/spec/asciidocify_spec.rb b/spec/asciidocify_spec.rb deleted file mode 100644 index f4666bb..0000000 --- a/spec/asciidocify_spec.rb +++ /dev/null @@ -1,76 +0,0 @@ -require "ostruct" -require_relative "../_ext/asciidocify.rb" - -class TestADoc - include AsciiDoc -end - -describe AsciiDoc do - - it "should be able to render string to asciidoc" do - - content = "* 1 \n* 2" - - rendered = TestADoc.new.asciidocify content - - expect(rendered).to match /
                                                                                                • / - - end - - it "should be able to render source to asciidoc" do - - content = "public void test() {}" - - rendered = TestADoc.new.sourcify content - expect(rendered).to match / Test\n - -public void test() {} <2> Wee -eos - - rendered = TestADoc.new.sourcify content - expect(rendered).to match /Wee/ - - end - - it "should be able to render include source from site" do - - content = <<-eos -Some text -include::TestClass[] -eos - sample = OpenStruct.new - sample.sources = [] << OpenStruct.new( - { - "name" => "TestClass", - "path" => "/tmp/TestClass.java", - "content" => "public void test() {}" - }) - - rendered = TestADoc.new.asciidocify content, sample - expect(rendered).to match / 'javaee7-samples', - :desc => nil, - :relative_path => './', - :owner => 'javaee-samples', - :host => 'github.com', - :type => 'git', - :html_url => 'https://github.com/javaee-samples/javaee7-samples', - :clone_url => 'git://github.com/javaee-samples/javaee7-samples.git' - ) - end - - def link_components_modules - path = $1 if @repository.clone_url =~/.*\/(.*)\.git/ - @site.components = { - path => OpenStruct.new( - :modules => [] - ) - } - @repository.path = path - end - - it "should dicover sample modules" do - link_components_modules - Cloner.new().visit(@repository, @site) - - @visitor.visit(@repository, @site) - #puts @site - end - -end \ No newline at end of file diff --git a/stylesheets/_normalize.scss b/stylesheets/_normalize.scss deleted file mode 100644 index 332bc56..0000000 --- a/stylesheets/_normalize.scss +++ /dev/null @@ -1,410 +0,0 @@ -/*! normalize.css v2.1.2 | MIT License | git.io/normalize */ - -/* ========================================================================== - HTML5 display definitions - ========================================================================== */ - -/** - * Correct `block` display not defined in IE 8/9. - */ - -article, -aside, -details, -figcaption, -figure, -footer, -header, -hgroup, -main, -nav, -section, -summary { - display: block; -} - -/** - * Correct `inline-block` display not defined in IE 8/9. - */ - -audio, -canvas, -video { - display: inline-block; -} - -/** - * Prevent modern browsers from displaying `audio` without controls. - * Remove excess height in iOS 5 devices. - */ - -audio:not([controls]) { - display: none; - height: 0; -} - -/** - * Address `[hidden]` styling not present in IE 8/9. - * Hide the `template` element in IE, Safari, and Firefox < 22. - */ - -[hidden], -template { - display: none; -} - -script { - display: none !important; -} - -/* ========================================================================== - Base - ========================================================================== */ - -/** - * 1. Set default font family to sans-serif. - * 2. Prevent iOS text size adjust after orientation change, without disabling - * user zoom. - */ - -html { - font-family: sans-serif; /* 1 */ - -ms-text-size-adjust: 100%; /* 2 */ - -webkit-text-size-adjust: 100%; /* 2 */ -} - -/** - * Remove default margin. - */ - -body { - margin: 0; -} - -/* ========================================================================== - Links - ========================================================================== */ - -/** - * Remove the gray background color from active links in IE 10. - */ - -a { - background: transparent; -} - -/** - * Address `outline` inconsistency between Chrome and other browsers. - */ - -a:focus { - outline: thin dotted; -} - -/** - * Improve readability when focused and also mouse hovered in all browsers. - */ - -a:active, -a:hover { - outline: 0; -} - -/* ========================================================================== - Typography - ========================================================================== */ - -/** - * Address variable `h1` font-size and margin within `section` and `article` - * contexts in Firefox 4+, Safari 5, and Chrome. - */ - -h1 { - font-size: 2em; - margin: 0.67em 0; -} - -/** - * Address styling not present in IE 8/9, Safari 5, and Chrome. - */ - -abbr[title] { - border-bottom: 1px dotted; -} - -/** - * Address style set to `bolder` in Firefox 4+, Safari 5, and Chrome. - */ - -b, -strong { - font-weight: bold; -} - -/** - * Address styling not present in Safari 5 and Chrome. - */ - -dfn { - font-style: italic; -} - -/** - * Address differences between Firefox and other browsers. - */ - -hr { - -moz-box-sizing: content-box; - box-sizing: content-box; - height: 0; -} - -/** - * Address styling not present in IE 8/9. - */ - -mark { - background: #ff0; - color: #000; -} - -/** - * Correct font family set oddly in Safari 5 and Chrome. - */ - -code, -kbd, -pre, -samp { - font-family: monospace, serif; - font-size: 1em; -} - -/** - * Improve readability of pre-formatted text in all browsers. - */ - -pre { - white-space: pre-wrap; -} - -/** - * Set consistent quote types. - */ - -q { - quotes: "\201C" "\201D" "\2018" "\2019"; -} - -/** - * Address inconsistent and variable font size in all browsers. - */ - -small { - font-size: 80%; -} - -/** - * Prevent `sub` and `sup` affecting `line-height` in all browsers. - */ - -sub, -sup { - font-size: 75%; - line-height: 0; - position: relative; - vertical-align: baseline; -} - -sup { - top: -0.5em; -} - -sub { - bottom: -0.25em; -} - -/* ========================================================================== - Embedded content - ========================================================================== */ - -/** - * Remove border when inside `a` element in IE 8/9. - */ - -img { - border: 0; -} - -/** - * Correct overflow displayed oddly in IE 9. - */ - -svg:not(:root) { - overflow: hidden; -} - -/* ========================================================================== - Figures - ========================================================================== */ - -/** - * Address margin not present in IE 8/9 and Safari 5. - */ - -figure { - margin: 0; -} - -/* ========================================================================== - Forms - ========================================================================== */ - -/** - * Define consistent border, margin, and padding. - */ - -fieldset { - border: 1px solid #c0c0c0; - margin: 0 2px; - padding: 0.35em 0.625em 0.75em; -} - -/** - * 1. Correct `color` not being inherited in IE 8/9. - * 2. Remove padding so people aren't caught out if they zero out fieldsets. - */ - -legend { - border: 0; /* 1 */ - padding: 0; /* 2 */ -} - -/** - * 1. Correct font family not being inherited in all browsers. - * 2. Correct font size not being inherited in all browsers. - * 3. Address margins set differently in Firefox 4+, Safari 5, and Chrome. - */ - -button, -input, -select, -textarea { - font-family: inherit; /* 1 */ - font-size: 100%; /* 2 */ - margin: 0; /* 3 */ -} - -/** - * Address Firefox 4+ setting `line-height` on `input` using `!important` in - * the UA stylesheet. - */ - -button, -input { - line-height: normal; -} - -/** - * Address inconsistent `text-transform` inheritance for `button` and `select`. - * All other form control elements do not inherit `text-transform` values. - * Correct `button` style inheritance in Chrome, Safari 5+, and IE 8+. - * Correct `select` style inheritance in Firefox 4+ and Opera. - */ - -button, -select { - text-transform: none; -} - -/** - * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` - * and `video` controls. - * 2. Correct inability to style clickable `input` types in iOS. - * 3. Improve usability and consistency of cursor style between image-type - * `input` and others. - */ - -button, -html input[type="button"], /* 1 */ -input[type="reset"], -input[type="submit"] { - -webkit-appearance: button; /* 2 */ - cursor: pointer; /* 3 */ -} - -/** - * Re-set default cursor for disabled elements. - */ - -button[disabled], -html input[disabled] { - cursor: default; -} - -/** - * 1. Address box sizing set to `content-box` in IE 8/9. - * 2. Remove excess padding in IE 8/9. - */ - -input[type="checkbox"], -input[type="radio"] { - box-sizing: border-box; /* 1 */ - padding: 0; /* 2 */ -} - -/** - * 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome. - * 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome - * (include `-moz` to future-proof). - */ - -input[type="search"] { - -webkit-appearance: textfield; /* 1 */ - -moz-box-sizing: content-box; - -webkit-box-sizing: content-box; /* 2 */ - box-sizing: content-box; -} - -/** - * Remove inner padding and search cancel button in Safari 5 and Chrome - * on OS X. - */ - -input[type="search"]::-webkit-search-cancel-button, -input[type="search"]::-webkit-search-decoration { - -webkit-appearance: none; -} - -/** - * Remove inner padding and border in Firefox 4+. - */ - -button::-moz-focus-inner, -input::-moz-focus-inner { - border: 0; - padding: 0; -} - -/** - * 1. Remove default vertical scrollbar in IE 8/9. - * 2. Improve readability and alignment in all browsers. - */ - -textarea { - overflow: auto; /* 1 */ - vertical-align: top; /* 2 */ -} - -/* ========================================================================== - Tables - ========================================================================== */ - -/** - * Remove most spacing between table cells. - */ - -table { - border-collapse: collapse; - border-spacing: 0; -} diff --git a/stylesheets/_settings.scss b/stylesheets/_settings.scss deleted file mode 100644 index 797474c..0000000 --- a/stylesheets/_settings.scss +++ /dev/null @@ -1,1325 +0,0 @@ -// -// Foundation Variables -// - -// The default font-size is set to 100% of the browser style sheet (usually 16px) -// for compatibility with browser-based text zoom or user-set defaults. -$base-font-size: 100% !default; - -// $base-line-height is 24px while $base-font-size is 16px -// $base-line-height: 150%; - -// This is the default html and body font-size for the base em value. - -// Since the typical default browser font-size is 16px, that makes the calculation for grid size. -// If you want your base font-size to be a different size and not have it effect grid size too, -// set the value of $em-base to $base-font-size ($em-base: $base-font-size;) -$em-base: 16px !default; - -// It strips the unit of measure and returns it -@function strip-unit($num) { - @return $num / ($num * 0 + 1); -} - -// Converts "px" to "em" using the ($)em-base -@function convert-to-em($value, $base-value: $em-base) { - $value: strip-unit($value) / strip-unit($base-value) * 1em; - @if ($value == 0em) { $value: 0; } // Turn 0em into 0 - @return $value; -} - -// Working in ems is annoying. Think in pixels by using this handy function, em-calc(#) -// Just enter the number, no need to mention "px" -@function em-calc($values, $base-value: $em-base) { - $max: length($values); // Get the total number of parameters passed - - // If there is only 1 parameter, then return it as an integer. - // This is done because a list can't be multiplied or divided even if it contains a single value - @if $max == 1 { @return convert-to-em(nth($values, 1), $base-value); } - - $emValues: (); // This will eventually store the converted $values in a list - @for $i from 1 through $max { - $emValues: append($emValues, convert-to-em(nth($values, $i), $base-value)); - } - @return $emValues; -} - -//Retaining this for backward compatability - -@function emCalc($pxWidth) { - @return $pxWidth / $em-base * 1em; -} - -// Maybe you want to create rems with pixels -// $rem-base: 0.625 !default; //Set the value corresponding to body font size. In this case, you should set as: body {font-size: 62.5%;} -// @function rem-calc($pxWidth) { -// @return $pxWidth / $rem-base * 1rem; -// } - -// Change whether or not you include browser prefixes -// $experimental: true; - -// Various global styles - -$default-float: left; - -// $body-bg: #fff; -// $body-font-color: #222; -// $body-font-family: "Helvetica Neue", "Helvetica", Helvetica, Arial, sans-serif; -// $body-font-weight: normal; -// $body-font-style: normal; - -// Font-smoothing - -// $font-smoothing: antialiased; - -// Text direction settings - -// $text-direction: ltr; - -// Colors - -// $primary-color: #2ba6cb; -// $secondary-color: #e9e9e9; -// $alert-color: #c60f13; -// $success-color: #5da423; - -// Make sure border radius matches unless we want it different. - -// $global-radius: 3px; -// $global-rounded: 1000px; - -// Inset shadow shiny edges and depressions. - -// $shiny-edge-size: 0 1px 0; -// $shiny-edge-color: rgba(#fff, .5); -// $shiny-edge-active-color: rgba(#000, .2); - -// Control whether or not CSS classes come through in the CSS files. - -// $include-html-classes: true; -// $include-print-styles: true; -// $include-html-global-classes: $include-html-classes; -// $include-html-inline-list-classes: $include-html-classes; -// $include-html-type-classes: $include-html-classes; -// $include-html-grid-classes: $include-html-classes; -// $include-html-visibility-classes: $include-html-classes; -// $include-html-button-classes: $include-html-classes; -// $include-html-form-classes: $include-html-classes; -// $include-html-custom-form-classes: $include-html-classes; -// $include-html-media-classes: $include-html-classes; -// $include-html-section-classes: $include-html-classes; -// $include-html-orbit-classes: $include-html-classes; -// $include-html-reveal-classes: $include-html-classes; -// $include-html-joyride-classes: $include-html-classes; -// $include-html-clearing-classes: $include-html-classes; -// $include-html-alert-classes: $include-html-classes; -// $include-html-nav-classes: $include-html-classes; -// $include-html-top-bar-classes: $include-html-classes; -// $include-html-label-classes: $include-html-classes; -// $include-html-panel-classes: $include-html-classes; -// $include-html-pricing-classes: $include-html-classes; -// $include-html-progress-classes: $include-html-classes; -// $include-html-magellan-classes: $include-html-classes; -// $include-html-tooltip-classes: $include-html-classes; - -// Media Queries - -// $small-screen: 768px; -// $medium-screen: 1280px; -// $large-screen: 1440px; - -// $screen: "only screen"; -// $small: "only screen and (min-width: #{$small-screen})"; -// $medium: "only screen and (min-width: #{$medium-screen})"; -// $large: "only screen and (min-width: #{$large-screen})"; -// $landscape: "only screen and (orientation: landscape)"; -// $portrait: "only screen and (orientation: portrait)"; - -//// Cursors - -//Custom use example -> $cursor-default-value: url(http://cursors-site.net/path/to/custom/cursor/default.cur),progress; - -// $cursor-crosshair-value: "crosshair"; -// $cursor-default-value: "default"; -// $cursor-pointer-value: "pointer"; -// $cursor-help-value: "help"; - -// -// Grid Variables -// - -// $row-width: em-calc(1000); -// $column-gutter: em-calc(30); -// $total-columns: 12; - -// -// Block Grid Variables -// - -// We use this to control the maximum number of block grid elements per row - -// $block-grid-elements: 12; -// $block-grid-default-spacing: em-calc(20); - -// Enables media queries for block-grid classes. Set to false if writing semantic HTML. - -// $block-grid-media-queries: true; - -// -// Typography Variables -// - -// Control header font styles - -// $header-font-family: "Helvetica Neue", "Helvetica", Helvetica, Arial, sans-serif; -// $header-font-weight: bold; -// $header-font-style: normal; -// $header-font-color: #222; -// $header-line-height: 1.4; -// $header-top-margin: .2em; -// $header-bottom-margin: .5em; -// $header-text-rendering: optimizeLegibility; - -// Control header font sizes - -// $h1-font-size: em-calc(44); -// $h2-font-size: em-calc(37); -// $h3-font-size: em-calc(27); -// $h4-font-size: em-calc(23); -// $h5-font-size: em-calc(18); -// $h6-font-size: 1em; - -// Control how subheaders are styled. - -// $subheader-line-height: 1.4; -// $subheader-font-color: lighten($header-font-color, 30%); -// $subheader-font-weight: 300; -// $subheader-top-margin: .2em; -// $subheader-bottom-margin: .5em; - -// A general styling - -// $small-font-size: 60%; -// $small-font-color: lighten($header-font-color, 30%); - -// Style paragraphs - -// $paragraph-font-family: inherit; -// $paragraph-font-weight: normal; -// $paragraph-font-size: 1em; -// $paragraph-line-height: 1.6; -// $paragraph-margin-bottom: em-calc(20); -// $paragraph-aside-font-size: em-calc(14); -// $paragraph-aside-line-height: 1.35; -// $paragraph-aside-font-style: italic; -// $paragraph-text-rendering: optimizeLegibility; - -// Style tags - -// $code-color: darken($alert-color, 15%); -// $code-font-family: Consolas, 'Liberation Mono', Courier, monospace; -// $code-font-weight: bold; - -// Style anchors - -// $anchor-text-decoration: none; -// $anchor-font-color: $primary-color; -// $anchor-font-color-hover: darken($primary-color, 5%); - -// Style the
                                                                                                  element - -// $hr-border-width: 1px; -// $hr-border-style: solid; -// $hr-border-color: #ddd; -// $hr-margin: em-calc(20); - -// Style lists - -// $list-style-position: outside; -// $list-side-margin: 0; -// $list-nested-margin: em-calc(20); -// $definition-list-header-weight: bold; -// $definition-list-header-margin-bottom: .3em; -// $definition-list-margin-bottom: em-calc(12); - -// Style blockquotes - -// $blockquote-font-color: lighten($header-font-color, 30%); -// $blockquote-padding: em-calc(9, 20, 0, 19); -// $blockquote-border: 1px solid #ddd; -// $blockquote-cite-font-size: em-calc(13); -// $blockquote-cite-font-color: lighten($header-font-color, 20%); -// $blockquote-cite-link-color: $blockquote-cite-font-color; - -// Acronym styles - -// $acronym-underline: 1px dotted #ddd; - -// Control padding and margin - -// $microformat-padding: em-calc(10 12); -// $microformat-margin: em-calc(0 0 20 0); - -// Control the border styles - -// $microformat-border-width: 1px; -// $microformat-border-style: solid; -// $microformat-border-color: #ddd; - -// Control full name font styles - -// $microformat-fullname-font-weight: bold; -// $microformat-fullname-font-size: em-calc(15); - -// Control the summary font styles - -// $microformat-summary-font-weight: bold; - -// Control abbr padding -// $microformat-abbr-padding: em-calc(0 1); - -// Control abbr font styles - -// $microformat-abbr-font-weight: bold; -// $microformat-abbr-font-decoration: none; - -// -// Form Variables -// - -// We use this to set the base for lots of form spacing and positioning styles - -// $form-spacing: em-calc(16); - -// We use these to style the labels in different ways - -// $form-label-pointer: pointer; -// $form-label-font-size: em-calc(14); -// $form-label-font-weight: 500; -// $form-label-font-color: lighten(#000, 30%); -// $form-label-bottom-margin: em-calc(3); -// $input-font-family: inherit; -// $input-font-color: rgba(0,0,0,0.75); -// $input-font-size: em-calc(14); -// $input-bg-color: #fff; -// $input-focus-bg-color: darken(#fff, 2%); -// $input-border-color: darken(#fff, 20%); -// $input-focus-border-color: darken(#fff, 40%); -// $input-border-style: solid; -// $input-border-width: 1px; -// $input-disabled-bg: #ddd; -// $input-box-shadow: inset 0 1px 2px rgba(0,0,0,0.1); -// $input-include-glowing-effect: true; - -// We use these to style the fieldset border and spacing. - -// $fieldset-border-style: solid; -// $fieldset-border-width: 1px; -// $fieldset-border-color: #ddd; -// $fieldset-padding: em-calc(20); -// $fieldset-margin: em-calc(18 0); - -// We use these to style the legends when you use them - -// $legend-bg: #fff; -// $legend-font-weight: bold; -// $legend-padding: em-calc(0 3); - -// We use these to style the prefix and postfix input elements - -// $input-prefix-bg: darken(#fff, 5%); -// $input-prefix-border-color: darken(#fff, 20%); -// $input-prefix-border-size: 1px; -// $input-prefix-border-type: solid; -// $input-prefix-overflow: hidden; -// $input-prefix-font-color: #333; -// $input-prefix-font-color-alt: #fff; - -// We use these to style the error states for inputs and labels - -// $input-error-message-padding: em-calc(6 4); -// $input-error-message-top: 0; -// $input-error-message-font-size: em-calc(12); -// $input-error-message-font-weight: bold; -// $input-error-message-font-color: #fff; -// $input-error-message-font-color-alt: #333; - -// We use this to style the glowing effect of inputs when focused - -// $glowing-effect-fade-time: 0.45s; -// $glowing-effect-color: $input-focus-border-color; - -// -// Button Variables -// - -// We use these to build padding for buttons. - -// $button-med: em-calc(12); -// $button-tny: em-calc(7); -// $button-sml: em-calc(9); -// $button-lrg: em-calc(16); - -// We use this to control the display property. - -// $button-display: inline-block; -// $button-margin-bottom: em-calc(20); - -// We use these to control button text styles. - -// $button-font-family: inherit; -// $button-font-color: #fff; -// $button-font-color-alt: #333; -// $button-font-med: em-calc(16); -// $button-font-tny: em-calc(11); -// $button-font-sml: em-calc(13); -// $button-font-lrg: em-calc(20); -// $button-font-weight: bold; -// $button-font-align: center; - -// We use these to control various hover effects. - -// $button-function-factor: 10%; - -// We use these to control button border styles. - -// $button-border-width: 1px; -// $button-border-style: solid; - -// We use this to set the default radius used throughout the core. - -// $button-radius: $global-radius; -// $button-round: $global-rounded; - -// We use this to set default opacity for disabled buttons. - -// $button-disabled-opacity: 0.6; - -// -// Button Groups -// - -// Sets the margin for the right side by default, and the left margin if right-to-left direction is used - -// $button-bar-margin-opposite: em-calc(10); - -// -// Dropdown Button Variables -// - -// We use these to set the color of the pip in dropdown buttons - -// $dropdown-button-pip-color: #fff; -// $dropdown-button-pip-color-alt: #333; - -// We use these to style tiny dropdown buttons - -// $dropdown-button-padding-tny: $button-tny * 5; -// $dropdown-button-pip-size-tny: $button-tny; -// $dropdown-button-pip-opposite-tny: $button-tny * 2; -// $dropdown-button-pip-top-tny: -$button-tny / 2 + em-calc(1); - -// We use these to style small dropdown buttons - -// $dropdown-button-padding-sml: $button-sml * 5; -// $dropdown-button-pip-size-sml: $button-sml; -// $dropdown-button-pip-opposite-sml: $button-sml * 2; -// $dropdown-button-pip-top-sml: -$button-sml / 2 + em-calc(1); - -// We use these to style medium dropdown buttons - -// $dropdown-button-padding-med: $button-med * 4 + em-calc(3); -// $dropdown-button-pip-size-med: $button-med - em-calc(3); -// $dropdown-button-pip-opposite-med: $button-med * 2; -// $dropdown-button-pip-top-med: -$button-med / 2 + em-calc(2); - -// We use these to style large dropdown buttons - -// $dropdown-button-padding-lrg: $button-lrg * 4; -// $dropdown-button-pip-size-lrg: $button-lrg - em-calc(6); -// $dropdown-button-pip-opposite-lrg: $button-lrg + em-calc(12); -// $dropdown-button-pip-top-lrg: -$button-lrg / 2 + em-calc(3); - -// -// Split Button Variables -// - -// We use these to control different shared styles for Split Buttons - -// $split-button-function-factor: 15%; -// $split-button-pip-color: #fff; -// $split-button-pip-color-alt: #333; -// $split-button-active-bg-tint: rgba(0,0,0,0.1); - -// We use these to control tiny split buttons - -// $split-button-padding-tny: $button-tny * 9; -// $split-button-span-width-tny: $button-tny * 6.5; -// $split-button-pip-size-tny: $button-tny; -// $split-button-pip-top-tny: $button-tny * 2; -// $split-button-pip-default-float-tny: em-calc(-5); - -// We use these to control small split buttons - -// $split-button-padding-sml: $button-sml * 7; -// $split-button-span-width-sml: $button-sml * 5; -// $split-button-pip-size-sml: $button-sml; -// $split-button-pip-top-sml: $button-sml * 1.5; -// $split-button-pip-default-float-sml: em-calc(-9); - -// We use these to control medium split buttons - -// $split-button-padding-med: $button-med * 6.4; -// $split-button-span-width-med: $button-med * 4; -// $split-button-pip-size-med: $button-med - em-calc(3); -// $split-button-pip-top-med: $button-med * 1.5; -// $split-button-pip-default-float-med: em-calc(-9); - -// We use these to control large split buttons - -// $split-button-padding-lrg: $button-lrg * 6; -// $split-button-span-width-lrg: $button-lrg * 3.75; -// $split-button-pip-size-lrg: $button-lrg - em-calc(6); -// $split-button-pip-top-lrg: $button-lrg + em-calc(5); -// $split-button-pip-default-float-lrg: em-calc(-9); - -// -// Alert Box Variables -// - -// We use this to control alert padding. - -// $alert-padding-top: em-calc(11); -// $alert-padding-default-float: $alert-padding-top; -// $alert-padding-opposite-direction: $alert-padding-top + em-calc(10); -// $alert-padding-bottom: $alert-padding-top + em-calc(1); - -// We use these to control text style. - -// $alert-font-weight: bold; -// $alert-font-size: em-calc(14); -// $alert-font-color: #fff; -// $alert-font-color-alt: darken($secondary-color, 60%); - -// We use this for close hover effect. - -// $alert-function-factor: 10%; - -// We use these to control border styles. - -// $alert-border-style: solid; -// $alert-border-width: 1px; -// $alert-border-color: darken($primary-color, $alert-function-factor); -// $alert-bottom-margin: em-calc(20); - -// We use these to style the close buttons - -// $alert-close-color: #333; -// $alert-close-position: em-calc(5); -// $alert-close-font-size: em-calc(22); -// $alert-close-opacity: 0.3; -// $alert-close-opacity-hover: 0.5; -// $alert-close-padding: 5px 4px 4px; - -// We use this to control border radius - -// $alert-radius: $global-radius; - - -// -// Breadcrumb Variables -// - -// We use this to set the background color for the breadcrumb container. - -// $crumb-bg: lighten($secondary-color, 5%); - -// We use these to set the padding around the breadcrumbs. - -// $crumb-padding: em-calc(9 14 9); -// $crumb-side-padding: em-calc(12); - -// We use these to control border styles. - -// $crumb-function-factor: 10%; -// $crumb-border-size: 1px; -// $crumb-border-style: solid; -// $crumb-border-color: darken($crumb-bg, $crumb-function-factor); -// $crumb-radius: $global-radius; - -// We use these to set various text styles for breadcrumbs. - -// $crumb-font-size: em-calc(11); -// $crumb-font-color: $primary-color; -// $crumb-font-color-current: #333; -// $crumb-font-color-unavailable: #999; -// $crumb-font-transform: uppercase; -// $crumb-link-decor: underline; - -// We use these to control the slash between breadcrumbs - -// $crumb-slash-color: #aaa; -// $crumb-slash: "/"; - -// -// Clearing Variables -// - -// We use these to set the background colors for parts of Clearing. - -// $clearing-bg: #111; -// $clearing-caption-bg: $clearing-bg; -// $clearing-carousel-bg: #111; -// $clearing-img-bg: $clearing-bg; - -// We use these to style the close button - -// $clearing-close-color: #fff; -// $clearing-close-size: 40px; - -// We use these to style the arrows - -// $clearing-arrow-size: 16px; -// $clearing-arrow-color: $clearing-close-color; - -// We use these to style captions - -// $clearing-caption-font-color: #fff; -// $clearing-caption-padding: 10px 30px; - -// We use these to make the image and carousel height and style - -// $clearing-active-img-height: 75%; -// $clearing-carousel-height: 150px; -// $clearing-carousel-thumb-width: 175px; -// $clearing-carousel-thumb-active-border: 4px solid rgb(255,255,255); - -// -// Custom Form Variables -// - -// We use these to control the basic form styles input styles - -// $custom-form-border-color: #ccc; -// $custom-form-border-size: 1px; -// $custom-form-bg: #fff; -// $custom-form-bg-disabled: #ddd; -// $custom-form-input-size: 16px; -// $custom-form-check-color: #222; -// $custom-form-check-size: 16px; -// $custom-form-radio-size: 8px; -// $custom-form-checkbox-radius: 0; - -// We use these to style the custom select form element. - -// $custom-select-bg: #fff; -// $custom-select-fade-to-color: #f3f3f3; -// $custom-select-border-color: #ddd; -// $custom-select-triangle-color: #aaa; -// $custom-select-triangle-color-open: #222; -// $custom-select-height: em-calc(13) + ($form-spacing * 1.5); -// $custom-select-margin-bottom: em-calc(20); -// $custom-select-font-color-selected: #141414; -// $custom-select-disabled-color: #888; - -// We use these to control the style of the custom select dropdown element. - -// $custom-dropdown-height: 200px; -// $custom-dropdown-bg: #fff; -// $custom-dropdown-border-color: darken(#fff, 20%); -// $custom-dropdown-border-width: 1px; -// $custom-dropdown-border-style: solid; -// $custom-dropdown-font-color: #555; -// $custom-dropdown-font-size: em-calc(14); -// $custom-dropdown-color-selected: #eeeeee; -// $custom-dropdown-font-color-selected: #000; -// $custom-dropdown-shadow: 0 2px 2px 0 rgba(0,0,0,0.1); -// $custom-dropdown-offset-top: auto; -// $custom-dropdown-list-padding: em-calc(4); -// $custom-dropdown-default-float-padding: em-calc(6); -// $custom-dropdown-opposite-padding: em-calc(38); -// $custom-dropdown-list-item-min-height: em-calc(24); -// $custom-dropdown-width-small: 134px; -// $custom-dropdown-width-medium: 254px; -// $custom-dropdown-width-large: 434px; - -// -// Dropdown Variables -// - -// We use these to controls height and width styles. - -// $f-dropdown-max-width: 200px; -// $f-dropdown-height: auto; -// $f-dropdown-max-height: none; -// $f-dropdown-margin-top: 2px; - -// We use this to control the background color - -// $f-dropdown-bg: #fff; - -// We use this to set the border styles for dropdowns. - -// $f-dropdown-border-style: solid; -// $f-dropdown-border-width: 1px; -// $f-dropdown-border-color: darken(#fff, 20%); - -// We use these to style the triangle pip. - -// $f-dropdown-triangle-size: 6px; -// $f-dropdown-triangle-color: #fff; -// $f-dropdown-triangle-side-offset: 10px; - -// We use these to control styles for the list elements. - -// $f-dropdown-list-style: none; -// $f-dropdown-font-color: #555; -// $f-dropdown-font-size: em-calc(14); -// $f-dropdown-list-padding: em-calc(5 10); -// $f-dropdown-line-height: em-calc(18); -// $f-dropdown-list-hover-bg: #eeeeee; -// $dropdown-mobile-default-float: 0; - -// We use this to control the styles for when the dropdown has custom content. - -// $f-dropdown-content-padding: em-calc(20); - -// -// Flex Video Variables -// - -// We use these to control video container padding and margins - -// $flex-video-padding-top: em-calc(25); -// $flex-video-padding-bottom: 67.5%; -// $flex-video-margin-bottom: em-calc(16); - -// We use this to control widescreen bottom padding - -// $flex-video-widescreen-padding-bottom: 57.25%; - -// -// Inline List Variables -// - -// We use this to control the margins and padding of the inline list. - -// $inline-list-top-margin: 0; -// $inline-list-opposite-margin: 0; -// $inline-list-bottom-margin: em-calc(17); -// $inline-list-default-float-margin: em-calc(-22); - -// $inline-list-padding: 0; - -// We use this to control the overflow of the inline list. - -// $inline-list-overflow: hidden; - -// We use this to control the list items - -// $inline-list-display: block; - -// We use this to control any elments within list items - -// $inline-list-children-display: block; - -// -// Joyride Variables -// - -// Controlling default Joyride styles - -// $joyride-tip-bg: rgb(0,0,0); -// $joyride-tip-default-width: 300px; -// $joyride-tip-padding: em-calc(18 20 24); -// $joyride-tip-border: solid 1px #555; -// $joyride-tip-radius: 4px; -// $joyride-tip-position-offset: 22px; - -// Here, we're setting the tip dont styles - -// $joyride-tip-font-color: #fff; -// $joyride-tip-font-size: em-calc(14); -// $joyride-tip-header-weight: bold; - -// This changes the nub size - -// $joyride-tip-nub-size: 14px; - -// This adjusts the styles for the timer when its enabled - -// $joyride-tip-timer-width: 50px; -// $joyride-tip-timer-height: 3px; -// $joyride-tip-timer-color: #666; - -// This changes up the styles for the close button - -// $joyride-tip-close-color: #777; -// $joyride-tip-close-size: 30px; -// $joyride-tip-close-weight: normal; - -// When Joyride is filling the screen, we use this style for the bg - -// $joyride-screenfill: rgba(0,0,0,0.5); - -// -// Keystroke Variables -// - -// We use these to control text styles. - -// $keystroke-font: "Consolas", "Menlo", "Courier", monospace; -// $keystroke-font-size: em-calc(14); -// $keystroke-font-color: #222; -// $keystroke-font-color-alt: #fff; -// $keystroke-function-factor: 7%; - -// We use this to control keystroke padding. - -// $keystroke-padding: em-calc(2 4 0); - -// We use these to control background and border styles. - -// $keystroke-bg: darken(#fff, $keystroke-function-factor); -// $keystroke-border-style: solid; -// $keystroke-border-width: 1px; -// $keystroke-border-color: darken($keystroke-bg, $keystroke-function-factor); -// $keystroke-radius: $global-radius; - -// -// Label Variables -// - -// We use these to style the labels - -// $label-padding: em-calc(3 10 4); -// $label-radius: $global-radius; - -// We use these to style the label text - -// $label-font-sizing: em-calc(14); -// $label-font-weight: bold; -// $label-font-color: #333; -// $label-font-color-alt: #fff; - -// -// Magellan Variables -// - -// $magellan-bg: #fff; -// $magellan-padding: 10px; - -// -// Orbit Settings -// - -// We use these to control the caption styles - -// $orbit-container-bg: #f5f5f5; -// $orbit-caption-bg: rgba(0,0,0,0.6); -// $orbit-caption-font-color: #fff; -// $orbit-caption-font-size: emCalc(14); -// $orbit-caption-position: "bottom"; // Supported values: "bottom", "under" -// $orbit-caption-padding: emCalc(10,14); -// $orbit-caption-height: auto; - -// We use these to control the left/right nav styles - -// $orbit-nav-bg: rgba(0,0,0,0.6); -// $orbit-nav-bg-hover: rgba(0,0,0,0.6); -// $orbit-nav-arrow-color: #fff; -// $orbit-nav-arrow-color-hover: #ccc; - -// We use these to control the timer styles - -// $orbit-timer-bg: rgba(0,0,0,0.6); -// $orbit-timer-show-progress-bar: true; - -// We use these to control the bullet nav styles - -// $orbit-bullet-nav-color: #999; -// $orbit-bullet-nav-color-active: #555; -// $orbit-bullet-radius: emCalc(18); - -// We use these to controls the style of slide numbers - -// $orbit-slide-number-bg: rgba(0,0,0,0); -// $orbit-slide-number-font-color: #fff; -// $orbit-slide-number-padding: em-calc(5); - -// Graceful Loading Wrapper and preloader - -// $wrapper-class: "slideshow-wrapper"; -// $preloader-class: "preloader"; - -// -// Pagination Variables -// - -// We use these to control the pagination container - -// $pagination-height: em-calc(24); -// $pagination-margin: em-calc(-5); - -// We use these to set the list-item properties - -// $pagination-li-float: $default-float; -// $pagination-li-height: em-calc(24); -// $pagination-li-font-color: #222; -// $pagination-li-font-size: em-calc(14); -// $pagination-li-margin: em-calc(5); - -// We use these for the pagination anchor links - -// $pagination-link-pad: em-calc(1 7 1); -// $pagination-link-font-color: #999; -// $pagination-link-active-bg: darken(#fff, 10%); - -// We use these for disabled anchor links - -// $pagination-link-unavailable-cursor: default; -// $pagination-link-unavailable-font-color: #999; -// $pagination-link-unavailable-bg-active: transparent; - -// We use these for currently selected anchor links - -// $pagination-link-current-background: $primary-color; -// $pagination-link-current-font-color: #fff; -// $pagination-link-current-font-weight: bold; -// $pagination-link-current-cursor: default; -// $pagination-link-current-active-bg: $primary-color; - -// -// Panel Variables -// - -// We use these to control the background and border styles - -// $panel-bg: darken(#fff, 5%); -// $panel-border-style: solid; -// $panel-border-size: 1px; - -// We use this % to control how much we darken things on hover - -// $panel-function-factor: 10%; -// $panel-border-color: darken($panel-bg, $panel-function-factor); - -// We use these to set default inner padding and bottom margin - -// $panel-margin-bottom: em-calc(20); -// $panel-padding: em-calc(20); - -// We use these to set default font colors - -// $panel-font-color: #333; -// $panel-font-color-alt: #fff; - -// $panel-header-adjust: true; - -// -// Pricing Table Variables -// - -// We use this to control the border color - -// $price-table-border: solid 1px #ddd; - -// We use this to control the bottom margin of the pricing table - -// $price-table-margin-bottom: em-calc(20); - -// We use these to control the title styles - -// $price-title-bg: #ddd; -// $price-title-padding: em-calc(15 20); -// $price-title-align: center; -// $price-title-color: #333; -// $price-title-weight: bold; -// $price-title-size: em-calc(16); - -// We use these to control the price styles - -// $price-money-bg: #eee; -// $price-money-padding: em-calc(15, 20); -// $price-money-align: center; -// $price-money-color: #333; -// $price-money-weight: normal; -// $price-money-size: em-calc(20); - -// We use these to control the description styles - -// $price-bg: #fff; -// $price-desc-color: #777; -// $price-desc-padding: em-calc(15); -// $price-desc-align: center; -// $price-desc-font-size: em-calc(12); -// $price-desc-weight: normal; -// $price-desc-line-height: 1.4; -// $price-desc-bottom-border: dotted 1px #ddd; - -// We use these to control the list item styles - -// $price-item-color: #333; -// $price-item-padding: em-calc(15); -// $price-item-align: center; -// $price-item-font-size: em-calc(14); -// $price-item-weight: normal; -// $price-item-bottom-border: dotted 1px #ddd; - -// We use these to control the CTA area styles - -// $price-cta-bg: #f5f5f5; -// $price-cta-align: center; -// $price-cta-padding: em-calc(20 20 0); - -// -// Progress Bar Variables -// - -// We use this to se the prog bar height - -// $progress-bar-height: em-calc(25); -// $progress-bar-color: transparent; - -// We use these to control the border styles - -// $progress-bar-border-color: darken(#fff, 20%); -// $progress-bar-border-size: 1px; -// $progress-bar-border-style: solid; -// $progress-bar-border-radius: $global-radius; - -// We use these to control the margin & padding - -// $progress-bar-pad: em-calc(2); -// $progress-bar-margin-bottom: em-calc(10); - -// We use these to set the meter colors - -// $progress-meter-color: $primary-color; -// $progress-meter-secondary-color: $secondary-color; -// $progress-meter-success-color: $success-color; -// $progress-meter-alert-color: $alert-color; - -// -// Reveal Variables -// - -// We use these to control the style of the reveal overlay. - -// $reveal-overlay-bg: rgba(#000, .45); -// $reveal-overlay-bg-old: #000; - -// We use these to control the style of the modal itself. - -// $reveal-modal-bg: #fff; -// $reveal-position-top: 50px; -// $reveal-default-width: 80%; -// $reveal-modal-padding: em-calc(20); -// $reveal-box-shadow: 0 0 10px rgba(#000,.4); - -// We use these to style the reveal close button - -// $reveal-close-font-size: em-calc(22); -// $reveal-close-top: em-calc(8); -// $reveal-close-side: em-calc(11); -// $reveal-close-color: #aaa; -// $reveal-close-weight: bold; - -// We use these to control the modal border - -// $reveal-border-style: solid; -// $reveal-border-width: 1px; -// $reveal-border-color: #666; - -// $reveal-modal-class: "reveal-modal"; -// $close-reveal-modal-class: "close-reveal-modal"; - -// -// Section Variables -// - -// We use these to set padding and hover factor - -// $section-title-padding: em-calc(15); -// $section-content-padding: em-calc(15); -// $section-function-factor: 10%; - -// These style the titles - -// $section-title-color: #333; -// $section-title-color-active: #333; -// $section-title-bg: #efefef; -// $section-title-bg-active: darken($section-title-bg, $section-function-factor); -// $section-title-bg-active-tabs: #fff; -// $section-title-bg-hover: darken($section-title-bg, $section-function-factor / 2); - -// Want to control border size, here ya go! - -// $section-border-size: 1px; -// $section-border-style: solid; -// $section-border-color: #ccc; - -// Font controls - -// $section-font-size: em-calc(14); - -// Control the color of the background and some size options - -// $section-content-bg: #fff; -// $section-vertical-nav-min-width: em-calc(200); -// $section-vertical-tabs-title-width: em-calc(200); -// $section-bottom-margin: em-calc(20); - -// $title-selector: ".title"; -// $content-selector: ".content"; -// $active-region-selector: ".active"; - -// -// Side Nav Variables -// - -// We use this to control padding. - -// $side-nav-padding: em-calc(14 0); - -// We use these to control list styles. - -// $side-nav-list-type: none; -// $side-nav-list-position: inside; -// $side-nav-list-margin: em-calc(0 0 7 0); - -// We use these to control link styles. - -// $side-nav-link-color: $primary-color; -// $side-nav-link-color-active: lighten(#000, 30%); -// $side-nav-font-size: em-calc(14); -// $side-nav-font-weight: bold; - -// We use these to control border styles - -// $side-nav-divider-size: 1px; -// $side-nav-divider-style: solid; -// $side-nav-divider-color: darken(#fff, 10%); - -// -// Sub Nav Variables -// - -// We use these to control margin and padding - -// $sub-nav-list-margin: em-calc(-4 0 18); -// $sub-nav-list-padding-top: em-calc(4); - -// We use this to control the definition - -// $sub-nav-font-size: em-calc(14); -// $sub-nav-font-color: #999; -// $sub-nav-font-weight: normal; -// $sub-nav-text-decoration: none; -// $sub-nav-border-radius: 1000px; - -// We use these to control the active item styles - -// $sub-nav-active-font-weight: bold; -// $sub-nav-active-bg: $primary-color; -// $sub-nav-active-color: #fff; -// $sub-nav-active-padding: em-calc(3 9); -// $sub-nav-active-cursor: default; - -// $sub-nav-item-divider: "" !default; -// $sub-nav-item-divider-margin: emCalc(12) !default; - -// -// Switch Variables -// - -// Controlling border styles and background colors for the switch container - -// $switch-border-color: darken(#fff, 20%); -// $switch-border-style: solid; -// $switch-border-width: 1px; -// $switch-bg: #fff; - -// We use these to control the switch heights for our default classes - -// $switch-height-tny: 22px; -// $switch-height-sml: 28px; -// $switch-height-med: 36px; -// $switch-height-lrg: 44px; -// $switch-bottom-margin: em-calc(20); - -// We use these to control default font sizes for our classes. - -// $switch-font-size-tny: 11px; -// $switch-font-size-sml: 12px; -// $switch-font-size-med: 14px; -// $switch-font-size-lrg: 17px; -// $switch-label-side-padding: 6px; - -// We use these to style the switch-paddle - -// $switch-paddle-bg: #fff; -// $switch-paddle-fade-to-color: darken($switch-paddle-bg, 10%); -// $switch-paddle-border-color: darken($switch-paddle-bg, 35%); -// $switch-paddle-border-width: 1px; -// $switch-paddle-border-style: solid; -// $switch-paddle-transition-speed: .1s; -// $switch-paddle-transition-ease: ease-out; -// $switch-positive-color: lighten($success-color, 50%); -// $switch-negative-color: #f5f5f5; - -// Outline Style for tabbing through switches - -// $switch-label-outline: 1px dotted #888; - -// -// Table Variables -// - -// These control the background color for the table and even rows - -// $table-bg: #fff; -// $table-even-row-bg: #f9f9f9; - -// These control the table cell border style - -// $table-border-style: solid; -// $table-border-size: 1px; -// $table-border-color: #ddd; - -// These control the table head styles - -// $table-head-bg: #f5f5f5; -// $table-head-font-size: em-calc(14); -// $table-head-font-color: #222; -// $table-head-font-weight: bold; -// $table-head-padding: em-calc(8 10 10); - -// These control the row padding and font styles - -// $table-row-padding: em-calc(9 10); -// $table-row-font-size: em-calc(14); -// $table-row-font-color: #222; -// $table-line-height: em-calc(18); - -// These are for controlling the display and margin of tables - -// $table-display: table-cell; -// $table-margin-bottom: em-calc(20); - -// -// Image Thumbnail Variables -// - -// We use these to control border styles - -// $thumb-border-style: solid; -// $thumb-border-width: 4px; -// $thumb-border-color: #fff; -// $thumb-box-shadow: 0 0 0 1px rgba(#000,.2); -// $thumb-box-shadow-hover: 0 0 6px 1px rgba($primary-color,0.5); - -// Radius and transition speed for thumbs - -// $thumb-radius: $global-radius; -// $thumb-transition-speed: 200ms; - -// -// Tooltip Variables -// - -// $has-tip-border-bottom: dotted 1px #ccc; -// $has-tip-font-weight: bold; -// $has-tip-font-color: #333; -// $has-tip-border-bottom-hover: dotted 1px darken($primary-color, 20%); -// $has-tip-font-color-hover: $primary-color; -// $has-tip-cursor-type: help; - -// $tooltip-padding: em-calc(8); -// $tooltip-bg: #000; -// $tooltip-font-size: em-calc(15); -// $tooltip-font-weight: bold; -// $tooltip-font-color: #fff; -// $tooltip-line-height: 1.3; -// $tooltip-close-font-size: em-calc(10); -// $tooltip-close-font-weight: normal; -// $tooltip-close-font-color: #888; -// $tooltip-font-size-sml: em-calc(14); -// $tooltip-radius: $global-radius; -// $tooltip-pip-size: 5px; - -// -// Top Bar Variables -// - -// Background color for the top bar - -// $topbar-bg-color: #111; -// $topbar-bg: $topbar-bg-color; - -// Height and margin - -// $topbar-height: 45px; -// $topbar-margin-bottom: 0; - -// Control Input height for top bar - -// $topbar-input-height: 2.45em; - -// Controlling the styles for the title in the top bar - -// $topbar-title-weight: bold; -// $topbar-title-font-size: em-calc(17); - -// Style the top bar dropdown elements - -// $topbar-dropdown-bg: #222; -// $topbar-dropdown-link-color: #fff; -// // $topbar-dropdown-link-bg: lighten($topbar-bg-color, 5%); -// $topbar-dropdown-toggle-size: 5px; -// $topbar-dropdown-toggle-color: #fff; -// $topbar-dropdown-toggle-alpha: 0.5; - -// Set the link colors and styles for top-level nav - -// $topbar-link-color: #fff; -// $topbar-link-color-hover: #fff; -// $topbar-link-color-active: #fff; -// $topbar-link-weight: bold; -// $topbar-link-font-size: em-calc(13); -// $topbar-link-hover-lightness: -30%; // Darken by 30% -// $topbar-link-bg-hover: darken($topbar-bg-color, 3%); -// $topbar-link-bg-active: darken($topbar-bg-color, 3%); - -// $topbar-dropdown-label-color: #555; -// $topbar-dropdown-label-text-transform: uppercase; -// $topbar-dropdown-label-font-weight: bold; -// $topbar-dropdown-label-font-size: em-calc(10); -// $topbar-dropdown-label-bg: lighten($topbar-bg-color, 5%); - -// Top menu icon styles - -// $topbar-menu-link-transform: uppercase; -// $topbar-menu-link-font-size: em-calc(13); -// $topbar-menu-link-weight: bold; -// $topbar-menu-link-color: #fff; -// $topbar-menu-icon-color: #fff; -// $topbar-menu-link-color-toggled: #888; -// $topbar-menu-icon-color-toggled: #888; - -// Transitions and breakpoint styles - -// $topbar-transition-speed: 300ms; -// $topbar-breakpoint: 940 !default; // Change to 9999px for always mobile layout -// $topbar-media-query: "only screen and (min-width: #{$topbar-breakpoint})"; - -// Divider Styles - -// $topbar-divider-border-bottom: solid 1px lighten($topbar-bg-color, 10%); -// $topbar-divider-border-top: solid 1px darken($topbar-bg-color, 10%); - -// Sticky Class - -// $topbar-sticky-class: ".sticky"; -// $topbar-arrows: true; //Set false to remove the triangle icon from the menu item diff --git a/stylesheets/app.css b/stylesheets/app.css new file mode 100644 index 0000000..80ca631 --- /dev/null +++ b/stylesheets/app.css @@ -0,0 +1,5818 @@ +/*! normalize.css v2.1.2 | MIT License | git.io/normalize */ +/* ========================================================================== + HTML5 display definitions + ========================================================================== */ +/** + * Correct `block` display not defined in IE 8/9. + */ +/* line 22, /home/aslak/dev/source/javaee/javaee-samples.github.io/stylesheets/_normalize.scss */ +article, aside, details, figcaption, figure, footer, header, hgroup, main, nav, section, summary { + display: block; } + +/** + * Correct `inline-block` display not defined in IE 8/9. + */ +/* line 32, /home/aslak/dev/source/javaee/javaee-samples.github.io/stylesheets/_normalize.scss */ +audio, canvas, video { + display: inline-block; } + +/** + * Prevent modern browsers from displaying `audio` without controls. + * Remove excess height in iOS 5 devices. + */ +/* line 41, /home/aslak/dev/source/javaee/javaee-samples.github.io/stylesheets/_normalize.scss */ +audio:not([controls]) { + display: none; + height: 0; } + +/** + * Address `[hidden]` styling not present in IE 8/9. + * Hide the `template` element in IE, Safari, and Firefox < 22. + */ +/* line 52, /home/aslak/dev/source/javaee/javaee-samples.github.io/stylesheets/_normalize.scss */ +[hidden], template { + display: none; } + +/* line 56, /home/aslak/dev/source/javaee/javaee-samples.github.io/stylesheets/_normalize.scss */ +script { + display: none !important; } + +/* ========================================================================== + Base + ========================================================================== */ +/** + * 1. Set default font family to sans-serif. + * 2. Prevent iOS text size adjust after orientation change, without disabling + * user zoom. + */ +/* line 70, /home/aslak/dev/source/javaee/javaee-samples.github.io/stylesheets/_normalize.scss */ +html { + font-family: sans-serif; + /* 1 */ + -ms-text-size-adjust: 100%; + /* 2 */ + -webkit-text-size-adjust: 100%; + /* 2 */ } + +/** + * Remove default margin. + */ +/* line 80, /home/aslak/dev/source/javaee/javaee-samples.github.io/stylesheets/_normalize.scss */ +body { + margin: 0; } + +/* ========================================================================== + Links + ========================================================================== */ +/** + * Remove the gray background color from active links in IE 10. + */ +/* line 92, /home/aslak/dev/source/javaee/javaee-samples.github.io/stylesheets/_normalize.scss */ +a { + background: transparent; } + +/** + * Address `outline` inconsistency between Chrome and other browsers. + */ +/* line 100, /home/aslak/dev/source/javaee/javaee-samples.github.io/stylesheets/_normalize.scss */ +a:focus { + outline: thin dotted; } + +/** + * Improve readability when focused and also mouse hovered in all browsers. + */ +/* line 109, /home/aslak/dev/source/javaee/javaee-samples.github.io/stylesheets/_normalize.scss */ +a:active, a:hover { + outline: 0; } + +/* ========================================================================== + Typography + ========================================================================== */ +/** + * Address variable `h1` font-size and margin within `section` and `article` + * contexts in Firefox 4+, Safari 5, and Chrome. + */ +/* line 122, /home/aslak/dev/source/javaee/javaee-samples.github.io/stylesheets/_normalize.scss */ +h1 { + font-size: 2em; + margin: 0.67em 0; } + +/** + * Address styling not present in IE 8/9, Safari 5, and Chrome. + */ +/* line 131, /home/aslak/dev/source/javaee/javaee-samples.github.io/stylesheets/_normalize.scss */ +abbr[title] { + border-bottom: 1px dotted; } + +/** + * Address style set to `bolder` in Firefox 4+, Safari 5, and Chrome. + */ +/* line 140, /home/aslak/dev/source/javaee/javaee-samples.github.io/stylesheets/_normalize.scss */ +b, strong { + font-weight: bold; } + +/** + * Address styling not present in Safari 5 and Chrome. + */ +/* line 148, /home/aslak/dev/source/javaee/javaee-samples.github.io/stylesheets/_normalize.scss */ +dfn { + font-style: italic; } + +/** + * Address differences between Firefox and other browsers. + */ +/* line 156, /home/aslak/dev/source/javaee/javaee-samples.github.io/stylesheets/_normalize.scss */ +hr { + -moz-box-sizing: content-box; + box-sizing: content-box; + height: 0; } + +/** + * Address styling not present in IE 8/9. + */ +/* line 166, /home/aslak/dev/source/javaee/javaee-samples.github.io/stylesheets/_normalize.scss */ +mark { + background: #ff0; + color: #000; } + +/** + * Correct font family set oddly in Safari 5 and Chrome. + */ +/* line 178, /home/aslak/dev/source/javaee/javaee-samples.github.io/stylesheets/_normalize.scss */ +code, kbd, pre, samp { + font-family: monospace, serif; + font-size: 1em; } + +/** + * Improve readability of pre-formatted text in all browsers. + */ +/* line 187, /home/aslak/dev/source/javaee/javaee-samples.github.io/stylesheets/_normalize.scss */ +pre { + white-space: pre-wrap; } + +/** + * Set consistent quote types. + */ +/* line 195, /home/aslak/dev/source/javaee/javaee-samples.github.io/stylesheets/_normalize.scss */ +q { + quotes: "\201C" "\201D" "\2018" "\2019"; } + +/** + * Address inconsistent and variable font size in all browsers. + */ +/* line 203, /home/aslak/dev/source/javaee/javaee-samples.github.io/stylesheets/_normalize.scss */ +small { + font-size: 80%; } + +/** + * Prevent `sub` and `sup` affecting `line-height` in all browsers. + */ +/* line 212, /home/aslak/dev/source/javaee/javaee-samples.github.io/stylesheets/_normalize.scss */ +sub, sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; } + +/* line 219, /home/aslak/dev/source/javaee/javaee-samples.github.io/stylesheets/_normalize.scss */ +sup { + top: -0.5em; } + +/* line 223, /home/aslak/dev/source/javaee/javaee-samples.github.io/stylesheets/_normalize.scss */ +sub { + bottom: -0.25em; } + +/* ========================================================================== + Embedded content + ========================================================================== */ +/** + * Remove border when inside `a` element in IE 8/9. + */ +/* line 235, /home/aslak/dev/source/javaee/javaee-samples.github.io/stylesheets/_normalize.scss */ +img { + border: 0; } + +/** + * Correct overflow displayed oddly in IE 9. + */ +/* line 243, /home/aslak/dev/source/javaee/javaee-samples.github.io/stylesheets/_normalize.scss */ +svg:not(:root) { + overflow: hidden; } + +/* ========================================================================== + Figures + ========================================================================== */ +/** + * Address margin not present in IE 8/9 and Safari 5. + */ +/* line 255, /home/aslak/dev/source/javaee/javaee-samples.github.io/stylesheets/_normalize.scss */ +figure { + margin: 0; } + +/* ========================================================================== + Forms + ========================================================================== */ +/** + * Define consistent border, margin, and padding. + */ +/* line 267, /home/aslak/dev/source/javaee/javaee-samples.github.io/stylesheets/_normalize.scss */ +fieldset { + border: 1px solid #c0c0c0; + margin: 0 2px; + padding: 0.35em 0.625em 0.75em; } + +/** + * 1. Correct `color` not being inherited in IE 8/9. + * 2. Remove padding so people aren't caught out if they zero out fieldsets. + */ +/* line 278, /home/aslak/dev/source/javaee/javaee-samples.github.io/stylesheets/_normalize.scss */ +legend { + border: 0; + /* 1 */ + padding: 0; + /* 2 */ } + +/** + * 1. Correct font family not being inherited in all browsers. + * 2. Correct font size not being inherited in all browsers. + * 3. Address margins set differently in Firefox 4+, Safari 5, and Chrome. + */ +/* line 292, /home/aslak/dev/source/javaee/javaee-samples.github.io/stylesheets/_normalize.scss */ +button, input, select, textarea { + font-family: inherit; + /* 1 */ + font-size: 100%; + /* 2 */ + margin: 0; + /* 3 */ } + +/** + * Address Firefox 4+ setting `line-height` on `input` using `!important` in + * the UA stylesheet. + */ +/* line 304, /home/aslak/dev/source/javaee/javaee-samples.github.io/stylesheets/_normalize.scss */ +button, input { + line-height: normal; } + +/** + * Address inconsistent `text-transform` inheritance for `button` and `select`. + * All other form control elements do not inherit `text-transform` values. + * Correct `button` style inheritance in Chrome, Safari 5+, and IE 8+. + * Correct `select` style inheritance in Firefox 4+ and Opera. + */ +/* line 316, /home/aslak/dev/source/javaee/javaee-samples.github.io/stylesheets/_normalize.scss */ +button, select { + text-transform: none; } + +/** + * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` + * and `video` controls. + * 2. Correct inability to style clickable `input` types in iOS. + * 3. Improve usability and consistency of cursor style between image-type + * `input` and others. + */ +/* line 331, /home/aslak/dev/source/javaee/javaee-samples.github.io/stylesheets/_normalize.scss */ +button, html input[type="button"], input[type="reset"], input[type="submit"] { + -webkit-appearance: button; + /* 2 */ + cursor: pointer; + /* 3 */ } + +/** + * Re-set default cursor for disabled elements. + */ +/* line 341, /home/aslak/dev/source/javaee/javaee-samples.github.io/stylesheets/_normalize.scss */ +button[disabled], html input[disabled] { + cursor: default; } + +/** + * 1. Address box sizing set to `content-box` in IE 8/9. + * 2. Remove excess padding in IE 8/9. + */ +/* line 351, /home/aslak/dev/source/javaee/javaee-samples.github.io/stylesheets/_normalize.scss */ +input[type="checkbox"], input[type="radio"] { + box-sizing: border-box; + /* 1 */ + padding: 0; + /* 2 */ } + +/** + * 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome. + * 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome + * (include `-moz` to future-proof). + */ +/* line 362, /home/aslak/dev/source/javaee/javaee-samples.github.io/stylesheets/_normalize.scss */ +input[type="search"] { + -webkit-appearance: textfield; + /* 1 */ + -moz-box-sizing: content-box; + -webkit-box-sizing: content-box; + /* 2 */ + box-sizing: content-box; } + +/** + * Remove inner padding and search cancel button in Safari 5 and Chrome + * on OS X. + */ +/* line 375, /home/aslak/dev/source/javaee/javaee-samples.github.io/stylesheets/_normalize.scss */ +input[type="search"]::-webkit-search-cancel-button, input[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; } + +/** + * Remove inner padding and border in Firefox 4+. + */ +/* line 384, /home/aslak/dev/source/javaee/javaee-samples.github.io/stylesheets/_normalize.scss */ +button::-moz-focus-inner, input::-moz-focus-inner { + border: 0; + padding: 0; } + +/** + * 1. Remove default vertical scrollbar in IE 8/9. + * 2. Improve readability and alignment in all browsers. + */ +/* line 394, /home/aslak/dev/source/javaee/javaee-samples.github.io/stylesheets/_normalize.scss */ +textarea { + overflow: auto; + /* 1 */ + vertical-align: top; + /* 2 */ } + +/* ========================================================================== + Tables + ========================================================================== */ +/** + * Remove most spacing between table cells. + */ +/* line 407, /home/aslak/dev/source/javaee/javaee-samples.github.io/stylesheets/_normalize.scss */ +table { + border-collapse: collapse; + border-spacing: 0; } + +/* line 264, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_global.scss */ +meta.foundation-mq-small { + font-family: "only screen and (min-width: 768px)"; + width: 768px; } + +/* line 269, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_global.scss */ +meta.foundation-mq-medium { + font-family: "only screen and (min-width:1280px)"; + width: 1280px; } + +/* line 274, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_global.scss */ +meta.foundation-mq-large { + font-family: "only screen and (min-width:1440px)"; + width: 1440px; } + +/* line 292, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_global.scss */ +*, *:before, *:after { + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; } + +/* line 297, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_global.scss */ +html, body { + font-size: 100%; } + +/* line 300, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_global.scss */ +body { + background: white; + color: #222222; + padding: 0; + margin: 0; + font-family: "Helvetica Neue", "Helvetica", Helvetica, Arial, sans-serif; + font-weight: normal; + font-style: normal; + line-height: 1; + position: relative; + cursor: default; } + +/* line 313, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_global.scss */ +a:hover { + cursor: pointer; } + +/* line 318, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_global.scss */ +img, object, embed { + max-width: 100%; + height: auto; } + +/* line 321, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_global.scss */ +object, embed { + height: 100%; } + +/* line 322, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_global.scss */ +img { + -ms-interpolation-mode: bicubic; } + +/* line 328, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_global.scss */ +#map_canvas img, #map_canvas embed, #map_canvas object, .map_canvas img, .map_canvas embed, .map_canvas object { + max-width: none !important; } + +/* line 333, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_global.scss */ +.left { + float: left !important; } + +/* line 334, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_global.scss */ +.right { + float: right !important; } + +/* line 335, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_global.scss */ +.text-left { + text-align: left !important; } + +/* line 336, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_global.scss */ +.text-right { + text-align: right !important; } + +/* line 337, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_global.scss */ +.text-center { + text-align: center !important; } + +/* line 338, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_global.scss */ +.text-justify { + text-align: justify !important; } + +/* line 339, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_global.scss */ +.hide { + display: none; } + +/* line 345, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_global.scss */ +.antialiased { + -webkit-font-smoothing: antialiased; } + +/* line 348, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_global.scss */ +img { + display: inline-block; + vertical-align: middle; } + +/* line 358, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_global.scss */ +textarea { + height: auto; + min-height: 50px; } + +/* line 361, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_global.scss */ +select { + width: 100%; } + +/* Grid HTML Classes */ +/* line 116, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_grid.scss */ +.row { + width: 100%; + margin-left: auto; + margin-right: auto; + margin-top: 0; + margin-bottom: 0; + max-width: 62.5em; + *zoom: 1; } +/* line 121, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_global.scss */ +.row:before, .row:after { + content: " "; + display: table; } +/* line 122, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_global.scss */ +.row:after { + clear: both; } +/* line 121, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_grid.scss */ +.row.collapse > .column, .row.collapse > .columns { + position: relative; + padding-left: 0; + padding-right: 0; + float: left; } +/* line 123, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_grid.scss */ +.row.collapse .row { + margin-left: 0; + margin-right: 0; } +/* line 126, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_grid.scss */ +.row .row { + width: auto; + margin-left: -0.9375em; + margin-right: -0.9375em; + margin-top: 0; + margin-bottom: 0; + max-width: none; + *zoom: 1; } +/* line 121, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_global.scss */ +.row .row:before, .row .row:after { + content: " "; + display: table; } +/* line 122, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_global.scss */ +.row .row:after { + clear: both; } +/* line 127, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_grid.scss */ +.row .row.collapse { + width: auto; + margin: 0; + max-width: none; + *zoom: 1; } +/* line 121, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_global.scss */ +.row .row.collapse:before, .row .row.collapse:after { + content: " "; + display: table; } +/* line 122, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_global.scss */ +.row .row.collapse:after { + clear: both; } + +/* line 132, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_grid.scss */ +.column, .columns { + position: relative; + padding-left: 0.9375em; + padding-right: 0.9375em; + width: 100%; + float: left; } + +@media only screen { + /* line 137, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_grid.scss */ + .column, .columns { + position: relative; + padding-left: 0.9375em; + padding-right: 0.9375em; + float: left; } + + /* line 140, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_grid.scss */ + .small-1 { + position: relative; + width: 8.33333%; } + + /* line 140, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_grid.scss */ + .small-2 { + position: relative; + width: 16.66667%; } + + /* line 140, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_grid.scss */ + .small-3 { + position: relative; + width: 25%; } + + /* line 140, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_grid.scss */ + .small-4 { + position: relative; + width: 33.33333%; } + + /* line 140, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_grid.scss */ + .small-5 { + position: relative; + width: 41.66667%; } + + /* line 140, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_grid.scss */ + .small-6 { + position: relative; + width: 50%; } + + /* line 140, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_grid.scss */ + .small-7 { + position: relative; + width: 58.33333%; } + + /* line 140, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_grid.scss */ + .small-8 { + position: relative; + width: 66.66667%; } + + /* line 140, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_grid.scss */ + .small-9 { + position: relative; + width: 75%; } + + /* line 140, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_grid.scss */ + .small-10 { + position: relative; + width: 83.33333%; } + + /* line 140, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_grid.scss */ + .small-11 { + position: relative; + width: 91.66667%; } + + /* line 140, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_grid.scss */ + .small-12 { + position: relative; + width: 100%; } + + /* line 144, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_grid.scss */ + .small-offset-0 { + position: relative; + margin-left: 0%; } + + /* line 144, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_grid.scss */ + .small-offset-1 { + position: relative; + margin-left: 8.33333%; } + + /* line 144, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_grid.scss */ + .small-offset-2 { + position: relative; + margin-left: 16.66667%; } + + /* line 144, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_grid.scss */ + .small-offset-3 { + position: relative; + margin-left: 25%; } + + /* line 144, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_grid.scss */ + .small-offset-4 { + position: relative; + margin-left: 33.33333%; } + + /* line 144, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_grid.scss */ + .small-offset-5 { + position: relative; + margin-left: 41.66667%; } + + /* line 144, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_grid.scss */ + .small-offset-6 { + position: relative; + margin-left: 50%; } + + /* line 144, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_grid.scss */ + .small-offset-7 { + position: relative; + margin-left: 58.33333%; } + + /* line 144, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_grid.scss */ + .small-offset-8 { + position: relative; + margin-left: 66.66667%; } + + /* line 144, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_grid.scss */ + .small-offset-9 { + position: relative; + margin-left: 75%; } + + /* line 144, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_grid.scss */ + .small-offset-10 { + position: relative; + margin-left: 83.33333%; } + + /* line 147, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_grid.scss */ + [class*="column"] + [class*="column"]:last-child { + float: right; } + + /* line 148, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_grid.scss */ + [class*="column"] + [class*="column"].end { + float: left; } + + /* line 151, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_grid.scss */ + .column.small-centered, .columns.small-centered { + position: relative; + margin-left: auto; + margin-right: auto; + float: none !important; } } +/* Styles for screens that are atleast 768px; */ +@media only screen and (min-width: 768px) { + /* line 158, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_grid.scss */ + .large-1 { + position: relative; + width: 8.33333%; } + + /* line 158, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_grid.scss */ + .large-2 { + position: relative; + width: 16.66667%; } + + /* line 158, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_grid.scss */ + .large-3 { + position: relative; + width: 25%; } + + /* line 158, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_grid.scss */ + .large-4 { + position: relative; + width: 33.33333%; } + + /* line 158, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_grid.scss */ + .large-5 { + position: relative; + width: 41.66667%; } + + /* line 158, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_grid.scss */ + .large-6 { + position: relative; + width: 50%; } + + /* line 158, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_grid.scss */ + .large-7 { + position: relative; + width: 58.33333%; } + + /* line 158, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_grid.scss */ + .large-8 { + position: relative; + width: 66.66667%; } + + /* line 158, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_grid.scss */ + .large-9 { + position: relative; + width: 75%; } + + /* line 158, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_grid.scss */ + .large-10 { + position: relative; + width: 83.33333%; } + + /* line 158, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_grid.scss */ + .large-11 { + position: relative; + width: 91.66667%; } + + /* line 158, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_grid.scss */ + .large-12 { + position: relative; + width: 100%; } + + /* line 162, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_grid.scss */ + .row .large-offset-0 { + position: relative; + margin-left: 0%; } + + /* line 162, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_grid.scss */ + .row .large-offset-1 { + position: relative; + margin-left: 8.33333%; } + + /* line 162, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_grid.scss */ + .row .large-offset-2 { + position: relative; + margin-left: 16.66667%; } + + /* line 162, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_grid.scss */ + .row .large-offset-3 { + position: relative; + margin-left: 25%; } + + /* line 162, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_grid.scss */ + .row .large-offset-4 { + position: relative; + margin-left: 33.33333%; } + + /* line 162, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_grid.scss */ + .row .large-offset-5 { + position: relative; + margin-left: 41.66667%; } + + /* line 162, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_grid.scss */ + .row .large-offset-6 { + position: relative; + margin-left: 50%; } + + /* line 162, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_grid.scss */ + .row .large-offset-7 { + position: relative; + margin-left: 58.33333%; } + + /* line 162, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_grid.scss */ + .row .large-offset-8 { + position: relative; + margin-left: 66.66667%; } + + /* line 162, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_grid.scss */ + .row .large-offset-9 { + position: relative; + margin-left: 75%; } + + /* line 162, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_grid.scss */ + .row .large-offset-10 { + position: relative; + margin-left: 83.33333%; } + + /* line 162, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_grid.scss */ + .row .large-offset-11 { + position: relative; + margin-left: 91.66667%; } + + /* line 166, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_grid.scss */ + .push-1 { + position: relative; + left: 8.33333%; + right: auto; } + + /* line 167, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_grid.scss */ + .pull-1 { + position: relative; + right: 8.33333%; + left: auto; } + + /* line 166, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_grid.scss */ + .push-2 { + position: relative; + left: 16.66667%; + right: auto; } + + /* line 167, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_grid.scss */ + .pull-2 { + position: relative; + right: 16.66667%; + left: auto; } + + /* line 166, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_grid.scss */ + .push-3 { + position: relative; + left: 25%; + right: auto; } + + /* line 167, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_grid.scss */ + .pull-3 { + position: relative; + right: 25%; + left: auto; } + + /* line 166, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_grid.scss */ + .push-4 { + position: relative; + left: 33.33333%; + right: auto; } + + /* line 167, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_grid.scss */ + .pull-4 { + position: relative; + right: 33.33333%; + left: auto; } + + /* line 166, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_grid.scss */ + .push-5 { + position: relative; + left: 41.66667%; + right: auto; } + + /* line 167, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_grid.scss */ + .pull-5 { + position: relative; + right: 41.66667%; + left: auto; } + + /* line 166, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_grid.scss */ + .push-6 { + position: relative; + left: 50%; + right: auto; } + + /* line 167, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_grid.scss */ + .pull-6 { + position: relative; + right: 50%; + left: auto; } + + /* line 166, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_grid.scss */ + .push-7 { + position: relative; + left: 58.33333%; + right: auto; } + + /* line 167, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_grid.scss */ + .pull-7 { + position: relative; + right: 58.33333%; + left: auto; } + + /* line 166, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_grid.scss */ + .push-8 { + position: relative; + left: 66.66667%; + right: auto; } + + /* line 167, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_grid.scss */ + .pull-8 { + position: relative; + right: 66.66667%; + left: auto; } + + /* line 166, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_grid.scss */ + .push-9 { + position: relative; + left: 75%; + right: auto; } + + /* line 167, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_grid.scss */ + .pull-9 { + position: relative; + right: 75%; + left: auto; } + + /* line 166, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_grid.scss */ + .push-10 { + position: relative; + left: 83.33333%; + right: auto; } + + /* line 167, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_grid.scss */ + .pull-10 { + position: relative; + right: 83.33333%; + left: auto; } + + /* line 166, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_grid.scss */ + .push-11 { + position: relative; + left: 91.66667%; + right: auto; } + + /* line 167, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_grid.scss */ + .pull-11 { + position: relative; + right: 91.66667%; + left: auto; } + + /* line 171, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_grid.scss */ + .column.large-centered, .columns.large-centered { + position: relative; + margin-left: auto; + margin-right: auto; + float: none !important; } + + /* line 174, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_grid.scss */ + .column.large-uncentered, .columns.large-uncentered { + margin-left: 0; + margin-right: 0; + float: left !important; } + + /* line 181, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_grid.scss */ + .column.large-uncentered.opposite, .columns.large-uncentered.opposite { + float: right !important; } } +/* Foundation Visibility HTML Classes */ +/* line 11, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_visibility.scss */ +.show-for-small, .show-for-medium-down, .show-for-large-down { + display: inherit !important; } + +/* line 17, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_visibility.scss */ +.show-for-medium, .show-for-medium-up, .show-for-large, .show-for-large-up, .show-for-xlarge { + display: none !important; } + +/* line 23, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_visibility.scss */ +.hide-for-medium, .hide-for-medium-up, .hide-for-large, .hide-for-large-up, .hide-for-xlarge { + display: inherit !important; } + +/* line 27, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_visibility.scss */ +.hide-for-small, .hide-for-medium-down, .hide-for-large-down { + display: none !important; } + +/* Specific visilbity for tables */ +/* line 38, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_visibility.scss */ +table.show-for-small, table.show-for-medium-down, table.show-for-large-down, table.hide-for-medium, table.hide-for-medium-up, table.hide-for-large, table.hide-for-large-up, table.hide-for-xlarge { + display: table; } + +/* line 48, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_visibility.scss */ +thead.show-for-small, thead.show-for-medium-down, thead.show-for-large-down, thead.hide-for-medium, thead.hide-for-medium-up, thead.hide-for-large, thead.hide-for-large-up, thead.hide-for-xlarge { + display: table-header-group !important; } + +/* line 58, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_visibility.scss */ +tbody.show-for-small, tbody.show-for-medium-down, tbody.show-for-large-down, tbody.hide-for-medium, tbody.hide-for-medium-up, tbody.hide-for-large, tbody.hide-for-large-up, tbody.hide-for-xlarge { + display: table-row-group !important; } + +/* line 68, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_visibility.scss */ +tr.show-for-small, tr.show-for-medium-down, tr.show-for-large-down, tr.hide-for-medium, tr.hide-for-medium-up, tr.hide-for-large, tr.hide-for-large-up, tr.hide-for-xlarge { + display: table-row !important; } + +/* line 79, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_visibility.scss */ +td.show-for-small, td.show-for-medium-down, td.show-for-large-down, td.hide-for-medium, td.hide-for-medium-up, td.hide-for-large, td.hide-for-large-up, td.hide-for-xlarge, th.show-for-small, th.show-for-medium-down, th.show-for-large-down, th.hide-for-medium, th.hide-for-medium-up, th.hide-for-large, th.hide-for-large-up, th.hide-for-xlarge { + display: table-cell !important; } + +/* Medium Displays: 768px - 1279px */ +@media only screen and (min-width: 768px) { + /* line 85, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_visibility.scss */ + .show-for-medium, .show-for-medium-up { + display: inherit !important; } + + /* line 87, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_visibility.scss */ + .show-for-small { + display: none !important; } + + /* line 89, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_visibility.scss */ + .hide-for-small { + display: inherit !important; } + + /* line 92, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_visibility.scss */ + .hide-for-medium, .hide-for-medium-up { + display: none !important; } + + /* Specific visilbity for tables */ + /* line 98, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_visibility.scss */ + table.show-for-medium, table.show-for-medium-up, table.hide-for-small { + display: table; } + + /* line 103, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_visibility.scss */ + thead.show-for-medium, thead.show-for-medium-up, thead.hide-for-small { + display: table-header-group !important; } + + /* line 108, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_visibility.scss */ + tbody.show-for-medium, tbody.show-for-medium-up, tbody.hide-for-small { + display: table-row-group !important; } + + /* line 113, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_visibility.scss */ + tr.show-for-medium, tr.show-for-medium-up, tr.hide-for-small { + display: table-row !important; } + + /* line 119, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_visibility.scss */ + td.show-for-medium, td.show-for-medium-up, td.hide-for-small, th.show-for-medium, th.show-for-medium-up, th.hide-for-small { + display: table-cell !important; } } +/* Large Displays: 1280px - 1440px */ +@media only screen and (min-width: 1280px) { + /* line 126, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_visibility.scss */ + .show-for-large, .show-for-large-up { + display: inherit !important; } + + /* line 129, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_visibility.scss */ + .show-for-medium, .show-for-medium-down { + display: none !important; } + + /* line 132, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_visibility.scss */ + .hide-for-medium, .hide-for-medium-down { + display: inherit !important; } + + /* line 135, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_visibility.scss */ + .hide-for-large, .hide-for-large-up { + display: none !important; } + + /* Specific visilbity for tables */ + /* line 142, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_visibility.scss */ + table.show-for-large, table.show-for-large-up, table.hide-for-medium, table.hide-for-medium-down { + display: table; } + + /* line 148, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_visibility.scss */ + thead.show-for-large, thead.show-for-large-up, thead.hide-for-medium, thead.hide-for-medium-down { + display: table-header-group !important; } + + /* line 154, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_visibility.scss */ + tbody.show-for-large, tbody.show-for-large-up, tbody.hide-for-medium, tbody.hide-for-medium-down { + display: table-row-group !important; } + + /* line 160, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_visibility.scss */ + tr.show-for-large, tr.show-for-large-up, tr.hide-for-medium, tr.hide-for-medium-down { + display: table-row !important; } + + /* line 167, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_visibility.scss */ + td.show-for-large, td.show-for-large-up, td.hide-for-medium, td.hide-for-medium-down, th.show-for-large, th.show-for-large-up, th.hide-for-medium, th.hide-for-medium-down { + display: table-cell !important; } } +/* X-Large Displays: 1400px and up */ +@media only screen and (min-width: 1440px) { + /* line 173, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_visibility.scss */ + .show-for-xlarge { + display: inherit !important; } + + /* line 176, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_visibility.scss */ + .show-for-large, .show-for-large-down { + display: none !important; } + + /* line 179, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_visibility.scss */ + .hide-for-large, .hide-for-large-down { + display: inherit !important; } + + /* line 181, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_visibility.scss */ + .hide-for-xlarge { + display: none !important; } + + /* Specific visilbity for tables */ + /* line 187, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_visibility.scss */ + table.show-for-xlarge, table.hide-for-large, table.hide-for-large-down { + display: table; } + + /* line 192, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_visibility.scss */ + thead.show-for-xlarge, thead.hide-for-large, thead.hide-for-large-down { + display: table-header-group !important; } + + /* line 197, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_visibility.scss */ + tbody.show-for-xlarge, tbody.hide-for-large, tbody.hide-for-large-down { + display: table-row-group !important; } + + /* line 202, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_visibility.scss */ + tr.show-for-xlarge, tr.hide-for-large, tr.hide-for-large-down { + display: table-row !important; } + + /* line 208, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_visibility.scss */ + td.show-for-xlarge, td.hide-for-large, td.hide-for-large-down, th.show-for-xlarge, th.hide-for-large, th.hide-for-large-down { + display: table-cell !important; } } +/* Orientation targeting */ +/* line 215, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_visibility.scss */ +.show-for-landscape, .hide-for-portrait { + display: inherit !important; } + +/* line 217, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_visibility.scss */ +.hide-for-landscape, .show-for-portrait { + display: none !important; } + +/* Specific visilbity for tables */ +/* line 222, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_visibility.scss */ +table.hide-for-landscape, table.show-for-portrait { + display: table; } + +/* line 226, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_visibility.scss */ +thead.hide-for-landscape, thead.show-for-portrait { + display: table-header-group !important; } + +/* line 230, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_visibility.scss */ +tbody.hide-for-landscape, tbody.show-for-portrait { + display: table-row-group !important; } + +/* line 234, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_visibility.scss */ +tr.hide-for-landscape, tr.show-for-portrait { + display: table-row !important; } + +/* line 239, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_visibility.scss */ +td.hide-for-landscape, td.show-for-portrait, th.hide-for-landscape, th.show-for-portrait { + display: table-cell !important; } + +@media only screen and (orientation: landscape) { + /* line 244, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_visibility.scss */ + .show-for-landscape, .hide-for-portrait { + display: inherit !important; } + + /* line 246, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_visibility.scss */ + .hide-for-landscape, .show-for-portrait { + display: none !important; } + + /* Specific visilbity for tables */ + /* line 251, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_visibility.scss */ + table.show-for-landscape, table.hide-for-portrait { + display: table; } + + /* line 255, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_visibility.scss */ + thead.show-for-landscape, thead.hide-for-portrait { + display: table-header-group !important; } + + /* line 259, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_visibility.scss */ + tbody.show-for-landscape, tbody.hide-for-portrait { + display: table-row-group !important; } + + /* line 263, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_visibility.scss */ + tr.show-for-landscape, tr.hide-for-portrait { + display: table-row !important; } + + /* line 268, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_visibility.scss */ + td.show-for-landscape, td.hide-for-portrait, th.show-for-landscape, th.hide-for-portrait { + display: table-cell !important; } } +@media only screen and (orientation: portrait) { + /* line 274, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_visibility.scss */ + .show-for-portrait, .hide-for-landscape { + display: inherit !important; } + + /* line 276, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_visibility.scss */ + .hide-for-portrait, .show-for-landscape { + display: none !important; } + + /* Specific visilbity for tables */ + /* line 281, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_visibility.scss */ + table.show-for-portrait, table.hide-for-landscape { + display: table; } + + /* line 285, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_visibility.scss */ + thead.show-for-portrait, thead.hide-for-landscape { + display: table-header-group !important; } + + /* line 289, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_visibility.scss */ + tbody.show-for-portrait, tbody.hide-for-landscape { + display: table-row-group !important; } + + /* line 293, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_visibility.scss */ + tr.show-for-portrait, tr.hide-for-landscape { + display: table-row !important; } + + /* line 298, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_visibility.scss */ + td.show-for-portrait, td.hide-for-landscape, th.show-for-portrait, th.hide-for-landscape { + display: table-cell !important; } } +/* Touch-enabled device targeting */ +/* line 303, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_visibility.scss */ +.show-for-touch { + display: none !important; } + +/* line 304, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_visibility.scss */ +.hide-for-touch { + display: inherit !important; } + +/* line 305, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_visibility.scss */ +.touch .show-for-touch { + display: inherit !important; } + +/* line 306, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_visibility.scss */ +.touch .hide-for-touch { + display: none !important; } + +/* Specific visilbity for tables */ +/* line 309, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_visibility.scss */ +table.hide-for-touch { + display: table; } + +/* line 310, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_visibility.scss */ +.touch table.show-for-touch { + display: table; } + +/* line 311, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_visibility.scss */ +thead.hide-for-touch { + display: table-header-group !important; } + +/* line 312, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_visibility.scss */ +.touch thead.show-for-touch { + display: table-header-group !important; } + +/* line 313, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_visibility.scss */ +tbody.hide-for-touch { + display: table-row-group !important; } + +/* line 314, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_visibility.scss */ +.touch tbody.show-for-touch { + display: table-row-group !important; } + +/* line 315, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_visibility.scss */ +tr.hide-for-touch { + display: table-row !important; } + +/* line 316, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_visibility.scss */ +.touch tr.show-for-touch { + display: table-row !important; } + +/* line 317, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_visibility.scss */ +td.hide-for-touch { + display: table-cell !important; } + +/* line 318, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_visibility.scss */ +.touch td.show-for-touch { + display: table-cell !important; } + +/* line 319, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_visibility.scss */ +th.hide-for-touch { + display: table-cell !important; } + +/* line 320, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_visibility.scss */ +.touch th.show-for-touch { + display: table-cell !important; } + +/* Foundation Block Grids for below small breakpoint */ +@media only screen { + /* line 50, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_block-grid.scss */ + [class*="block-grid-"] { + display: block; + padding: 0; + margin: 0 -0.625em; + *zoom: 1; } + /* line 121, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_global.scss */ + [class*="block-grid-"]:before, [class*="block-grid-"]:after { + content: " "; + display: table; } + /* line 122, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_global.scss */ + [class*="block-grid-"]:after { + clear: both; } + /* line 27, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_block-grid.scss */ + [class*="block-grid-"] > li { + display: inline; + height: auto; + float: left; + padding: 0 0.625em 1.25em; } + + /* line 36, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_block-grid.scss */ + .small-block-grid-1 > li { + width: 100%; + padding: 0 0.625em 1.25em; } + /* line 40, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_block-grid.scss */ + .small-block-grid-1 > li:nth-of-type(n) { + clear: none; } + /* line 41, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_block-grid.scss */ + .small-block-grid-1 > li:nth-of-type(1n+1) { + clear: both; } + + /* line 36, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_block-grid.scss */ + .small-block-grid-2 > li { + width: 50%; + padding: 0 0.625em 1.25em; } + /* line 40, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_block-grid.scss */ + .small-block-grid-2 > li:nth-of-type(n) { + clear: none; } + /* line 41, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_block-grid.scss */ + .small-block-grid-2 > li:nth-of-type(2n+1) { + clear: both; } + + /* line 36, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_block-grid.scss */ + .small-block-grid-3 > li { + width: 33.33333%; + padding: 0 0.625em 1.25em; } + /* line 40, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_block-grid.scss */ + .small-block-grid-3 > li:nth-of-type(n) { + clear: none; } + /* line 41, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_block-grid.scss */ + .small-block-grid-3 > li:nth-of-type(3n+1) { + clear: both; } + + /* line 36, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_block-grid.scss */ + .small-block-grid-4 > li { + width: 25%; + padding: 0 0.625em 1.25em; } + /* line 40, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_block-grid.scss */ + .small-block-grid-4 > li:nth-of-type(n) { + clear: none; } + /* line 41, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_block-grid.scss */ + .small-block-grid-4 > li:nth-of-type(4n+1) { + clear: both; } + + /* line 36, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_block-grid.scss */ + .small-block-grid-5 > li { + width: 20%; + padding: 0 0.625em 1.25em; } + /* line 40, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_block-grid.scss */ + .small-block-grid-5 > li:nth-of-type(n) { + clear: none; } + /* line 41, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_block-grid.scss */ + .small-block-grid-5 > li:nth-of-type(5n+1) { + clear: both; } + + /* line 36, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_block-grid.scss */ + .small-block-grid-6 > li { + width: 16.66667%; + padding: 0 0.625em 1.25em; } + /* line 40, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_block-grid.scss */ + .small-block-grid-6 > li:nth-of-type(n) { + clear: none; } + /* line 41, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_block-grid.scss */ + .small-block-grid-6 > li:nth-of-type(6n+1) { + clear: both; } + + /* line 36, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_block-grid.scss */ + .small-block-grid-7 > li { + width: 14.28571%; + padding: 0 0.625em 1.25em; } + /* line 40, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_block-grid.scss */ + .small-block-grid-7 > li:nth-of-type(n) { + clear: none; } + /* line 41, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_block-grid.scss */ + .small-block-grid-7 > li:nth-of-type(7n+1) { + clear: both; } + + /* line 36, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_block-grid.scss */ + .small-block-grid-8 > li { + width: 12.5%; + padding: 0 0.625em 1.25em; } + /* line 40, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_block-grid.scss */ + .small-block-grid-8 > li:nth-of-type(n) { + clear: none; } + /* line 41, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_block-grid.scss */ + .small-block-grid-8 > li:nth-of-type(8n+1) { + clear: both; } + + /* line 36, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_block-grid.scss */ + .small-block-grid-9 > li { + width: 11.11111%; + padding: 0 0.625em 1.25em; } + /* line 40, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_block-grid.scss */ + .small-block-grid-9 > li:nth-of-type(n) { + clear: none; } + /* line 41, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_block-grid.scss */ + .small-block-grid-9 > li:nth-of-type(9n+1) { + clear: both; } + + /* line 36, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_block-grid.scss */ + .small-block-grid-10 > li { + width: 10%; + padding: 0 0.625em 1.25em; } + /* line 40, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_block-grid.scss */ + .small-block-grid-10 > li:nth-of-type(n) { + clear: none; } + /* line 41, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_block-grid.scss */ + .small-block-grid-10 > li:nth-of-type(10n+1) { + clear: both; } + + /* line 36, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_block-grid.scss */ + .small-block-grid-11 > li { + width: 9.09091%; + padding: 0 0.625em 1.25em; } + /* line 40, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_block-grid.scss */ + .small-block-grid-11 > li:nth-of-type(n) { + clear: none; } + /* line 41, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_block-grid.scss */ + .small-block-grid-11 > li:nth-of-type(11n+1) { + clear: both; } + + /* line 36, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_block-grid.scss */ + .small-block-grid-12 > li { + width: 8.33333%; + padding: 0 0.625em 1.25em; } + /* line 40, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_block-grid.scss */ + .small-block-grid-12 > li:nth-of-type(n) { + clear: none; } + /* line 41, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_block-grid.scss */ + .small-block-grid-12 > li:nth-of-type(12n+1) { + clear: both; } } +/* Foundation Block Grids for above small breakpoint */ +@media only screen and (min-width: 768px) { + /* Remove small grid clearing */ + /* line 63, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_block-grid.scss */ + .small-block-grid-1 > li:nth-of-type(1n+1) { + clear: none; } + + /* line 63, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_block-grid.scss */ + .small-block-grid-2 > li:nth-of-type(2n+1) { + clear: none; } + + /* line 63, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_block-grid.scss */ + .small-block-grid-3 > li:nth-of-type(3n+1) { + clear: none; } + + /* line 63, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_block-grid.scss */ + .small-block-grid-4 > li:nth-of-type(4n+1) { + clear: none; } + + /* line 63, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_block-grid.scss */ + .small-block-grid-5 > li:nth-of-type(5n+1) { + clear: none; } + + /* line 63, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_block-grid.scss */ + .small-block-grid-6 > li:nth-of-type(6n+1) { + clear: none; } + + /* line 63, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_block-grid.scss */ + .small-block-grid-7 > li:nth-of-type(7n+1) { + clear: none; } + + /* line 63, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_block-grid.scss */ + .small-block-grid-8 > li:nth-of-type(8n+1) { + clear: none; } + + /* line 63, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_block-grid.scss */ + .small-block-grid-9 > li:nth-of-type(9n+1) { + clear: none; } + + /* line 63, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_block-grid.scss */ + .small-block-grid-10 > li:nth-of-type(10n+1) { + clear: none; } + + /* line 63, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_block-grid.scss */ + .small-block-grid-11 > li:nth-of-type(11n+1) { + clear: none; } + + /* line 63, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_block-grid.scss */ + .small-block-grid-12 > li:nth-of-type(12n+1) { + clear: none; } + + /* line 36, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_block-grid.scss */ + .large-block-grid-1 > li { + width: 100%; + padding: 0 0.625em 1.25em; } + /* line 40, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_block-grid.scss */ + .large-block-grid-1 > li:nth-of-type(n) { + clear: none; } + /* line 41, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_block-grid.scss */ + .large-block-grid-1 > li:nth-of-type(1n+1) { + clear: both; } + + /* line 36, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_block-grid.scss */ + .large-block-grid-2 > li { + width: 50%; + padding: 0 0.625em 1.25em; } + /* line 40, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_block-grid.scss */ + .large-block-grid-2 > li:nth-of-type(n) { + clear: none; } + /* line 41, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_block-grid.scss */ + .large-block-grid-2 > li:nth-of-type(2n+1) { + clear: both; } + + /* line 36, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_block-grid.scss */ + .large-block-grid-3 > li { + width: 33.33333%; + padding: 0 0.625em 1.25em; } + /* line 40, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_block-grid.scss */ + .large-block-grid-3 > li:nth-of-type(n) { + clear: none; } + /* line 41, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_block-grid.scss */ + .large-block-grid-3 > li:nth-of-type(3n+1) { + clear: both; } + + /* line 36, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_block-grid.scss */ + .large-block-grid-4 > li { + width: 25%; + padding: 0 0.625em 1.25em; } + /* line 40, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_block-grid.scss */ + .large-block-grid-4 > li:nth-of-type(n) { + clear: none; } + /* line 41, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_block-grid.scss */ + .large-block-grid-4 > li:nth-of-type(4n+1) { + clear: both; } + + /* line 36, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_block-grid.scss */ + .large-block-grid-5 > li { + width: 20%; + padding: 0 0.625em 1.25em; } + /* line 40, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_block-grid.scss */ + .large-block-grid-5 > li:nth-of-type(n) { + clear: none; } + /* line 41, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_block-grid.scss */ + .large-block-grid-5 > li:nth-of-type(5n+1) { + clear: both; } + + /* line 36, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_block-grid.scss */ + .large-block-grid-6 > li { + width: 16.66667%; + padding: 0 0.625em 1.25em; } + /* line 40, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_block-grid.scss */ + .large-block-grid-6 > li:nth-of-type(n) { + clear: none; } + /* line 41, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_block-grid.scss */ + .large-block-grid-6 > li:nth-of-type(6n+1) { + clear: both; } + + /* line 36, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_block-grid.scss */ + .large-block-grid-7 > li { + width: 14.28571%; + padding: 0 0.625em 1.25em; } + /* line 40, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_block-grid.scss */ + .large-block-grid-7 > li:nth-of-type(n) { + clear: none; } + /* line 41, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_block-grid.scss */ + .large-block-grid-7 > li:nth-of-type(7n+1) { + clear: both; } + + /* line 36, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_block-grid.scss */ + .large-block-grid-8 > li { + width: 12.5%; + padding: 0 0.625em 1.25em; } + /* line 40, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_block-grid.scss */ + .large-block-grid-8 > li:nth-of-type(n) { + clear: none; } + /* line 41, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_block-grid.scss */ + .large-block-grid-8 > li:nth-of-type(8n+1) { + clear: both; } + + /* line 36, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_block-grid.scss */ + .large-block-grid-9 > li { + width: 11.11111%; + padding: 0 0.625em 1.25em; } + /* line 40, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_block-grid.scss */ + .large-block-grid-9 > li:nth-of-type(n) { + clear: none; } + /* line 41, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_block-grid.scss */ + .large-block-grid-9 > li:nth-of-type(9n+1) { + clear: both; } + + /* line 36, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_block-grid.scss */ + .large-block-grid-10 > li { + width: 10%; + padding: 0 0.625em 1.25em; } + /* line 40, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_block-grid.scss */ + .large-block-grid-10 > li:nth-of-type(n) { + clear: none; } + /* line 41, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_block-grid.scss */ + .large-block-grid-10 > li:nth-of-type(10n+1) { + clear: both; } + + /* line 36, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_block-grid.scss */ + .large-block-grid-11 > li { + width: 9.09091%; + padding: 0 0.625em 1.25em; } + /* line 40, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_block-grid.scss */ + .large-block-grid-11 > li:nth-of-type(n) { + clear: none; } + /* line 41, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_block-grid.scss */ + .large-block-grid-11 > li:nth-of-type(11n+1) { + clear: both; } + + /* line 36, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_block-grid.scss */ + .large-block-grid-12 > li { + width: 8.33333%; + padding: 0 0.625em 1.25em; } + /* line 40, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_block-grid.scss */ + .large-block-grid-12 > li:nth-of-type(n) { + clear: none; } + /* line 41, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_block-grid.scss */ + .large-block-grid-12 > li:nth-of-type(12n+1) { + clear: both; } } +/* line 111, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_type.scss */ +p.lead { + font-size: 1.21875em; + line-height: 1.6; } + +/* line 116, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_type.scss */ +.subheader { + line-height: 1.4; + color: #6f6f6f; + font-weight: 300; + margin-top: 0.2em; + margin-bottom: 0.5em; } + +/* Typography resets */ +/* line 145, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_type.scss */ +div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, form, p, blockquote, th, td { + margin: 0; + padding: 0; + direction: ltr; } + +/* Default Link Styles */ +/* line 152, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_type.scss */ +a { + color: #2ba6cb; + text-decoration: none; + line-height: inherit; } +/* line 158, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_type.scss */ +a:hover, a:focus { + color: #2795b6; } +/* line 160, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_type.scss */ +a img { + border: none; } + +/* Default paragraph styles */ +/* line 164, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_type.scss */ +p { + font-family: inherit; + font-weight: normal; + font-size: 1em; + line-height: 1.6; + margin-bottom: 1.25em; + text-rendering: optimizeLegibility; } +/* line 174, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_type.scss */ +p aside { + font-size: 0.875em; + line-height: 1.35; + font-style: italic; } + +/* Default header styles */ +/* line 182, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_type.scss */ +h1, h2, h3, h4, h5, h6 { + font-family: "Helvetica Neue", "Helvetica", Helvetica, Arial, sans-serif; + font-weight: bold; + font-style: normal; + color: #222222; + text-rendering: optimizeLegibility; + margin-top: 0.2em; + margin-bottom: 0.5em; + line-height: 1.2125em; } +/* line 192, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_type.scss */ +h1 small, h2 small, h3 small, h4 small, h5 small, h6 small { + font-size: 60%; + color: #6f6f6f; + line-height: 0; } + +/* line 199, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_type.scss */ +h1 { + font-size: 2.125em; } + +/* line 200, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_type.scss */ +h2 { + font-size: 1.6875em; } + +/* line 201, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_type.scss */ +h3 { + font-size: 1.375em; } + +/* line 202, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_type.scss */ +h4 { + font-size: 1.125em; } + +/* line 203, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_type.scss */ +h5 { + font-size: 1.125em; } + +/* line 204, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_type.scss */ +h6 { + font-size: 1em; } + +/* line 208, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_type.scss */ +hr { + border: solid #dddddd; + border-width: 1px 0 0; + clear: both; + margin: 1.25em 0 1.1875em; + height: 0; } + +/* Helpful Typography Defaults */ +/* line 218, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_type.scss */ +em, i { + font-style: italic; + line-height: inherit; } + +/* line 224, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_type.scss */ +strong, b { + font-weight: bold; + line-height: inherit; } + +/* line 229, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_type.scss */ +small { + font-size: 60%; + line-height: inherit; } + +/* line 234, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_type.scss */ +code { + font-family: Consolas, "Liberation Mono", Courier, monospace; + font-weight: bold; + color: #7f0a0c; } + +/* Lists */ +/* line 243, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_type.scss */ +ul, ol, dl { + font-size: 1em; + line-height: 1.6; + margin-bottom: 1.25em; + list-style-position: outside; + font-family: inherit; } + +/* line 251, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_type.scss */ +ul, ol { + margin-left: 0; } +/* line 253, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_type.scss */ +ul.no-bullet, ol.no-bullet { + margin-left: 0; } + +/* Unordered Lists */ +/* line 260, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_type.scss */ +ul li ul, ul li ol { + margin-left: 1.25em; + margin-bottom: 0; + font-size: 1em; + /* Override nested font-size change */ } +/* line 269, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_type.scss */ +ul.square li ul, ul.circle li ul, ul.disc li ul { + list-style: inherit; } +/* line 272, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_type.scss */ +ul.square { + list-style-type: square; } +/* line 273, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_type.scss */ +ul.circle { + list-style-type: circle; } +/* line 274, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_type.scss */ +ul.disc { + list-style-type: disc; } +/* line 275, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_type.scss */ +ul.no-bullet { + list-style: none; } + +/* Ordered Lists */ +/* line 282, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_type.scss */ +ol li ul, ol li ol { + margin-left: 1.25em; + margin-bottom: 0; } + +/* Definition Lists */ +/* line 291, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_type.scss */ +dl dt { + margin-bottom: 0.3em; + font-weight: bold; } +/* line 295, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_type.scss */ +dl dd { + margin-bottom: 0.75em; } + +/* Abbreviations */ +/* line 300, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_type.scss */ +abbr, acronym { + text-transform: uppercase; + font-size: 90%; + color: #222222; + border-bottom: 1px dotted #dddddd; + cursor: help; } + +/* line 307, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_type.scss */ +abbr { + text-transform: none; } + +/* Blockquotes */ +/* line 312, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_type.scss */ +blockquote { + margin: 0 0 1.25em; + padding: 0.5625em 1.25em 0 1.1875em; + border-left: 1px solid #dddddd; } +/* line 317, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_type.scss */ +blockquote cite { + display: block; + font-size: 0.8125em; + color: #555555; } +/* line 321, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_type.scss */ +blockquote cite:before { + content: "\2014 \0020"; } +/* line 326, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_type.scss */ +blockquote cite a, blockquote cite a:visited { + color: #555555; } + +/* line 332, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_type.scss */ +blockquote, blockquote p { + line-height: 1.6; + color: #6f6f6f; } + +/* Microformats */ +/* line 338, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_type.scss */ +.vcard { + display: inline-block; + margin: 0 0 1.25em 0; + border: 1px solid #dddddd; + padding: 0.625em 0.75em; } +/* line 344, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_type.scss */ +.vcard li { + margin: 0; + display: block; } +/* line 348, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_type.scss */ +.vcard .fn { + font-weight: bold; + font-size: 0.9375em; } + +/* line 355, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_type.scss */ +.vevent .summary { + font-weight: bold; } +/* line 357, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_type.scss */ +.vevent abbr { + cursor: default; + text-decoration: none; + font-weight: bold; + border: none; + padding: 0 0.0625em; } + +@media only screen and (min-width: 768px) { + /* line 368, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_type.scss */ + h1, h2, h3, h4, h5, h6 { + line-height: 1.4; } + + /* line 369, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_type.scss */ + h1 { + font-size: 2.75em; } + + /* line 370, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_type.scss */ + h2 { + font-size: 2.3125em; } + + /* line 371, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_type.scss */ + h3 { + font-size: 1.6875em; } + + /* line 372, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_type.scss */ + h4 { + font-size: 1.4375em; } } +/* + * Print styles. + * + * Inlined to avoid required HTTP connection: www.phpied.com/delay-loading-your-print-css/ + * Credit to Paul Irish and HTML5 Boilerplate (html5boilerplate.com) +*/ +/* line 383, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_type.scss */ +.print-only { + display: none !important; } + +@media print { + /* line 385, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_type.scss */ + * { + background: transparent !important; + color: #000 !important; + /* Black prints faster: h5bp.com/s */ + box-shadow: none !important; + text-shadow: none !important; } + + /* line 393, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_type.scss */ + a, a:visited { + text-decoration: underline; } + + /* line 394, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_type.scss */ + a[href]:after { + content: " (" attr(href) ")"; } + + /* line 396, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_type.scss */ + abbr[title]:after { + content: " (" attr(title) ")"; } + + /* line 401, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_type.scss */ + .ir a:after, a[href^="javascript:"]:after, a[href^="#"]:after { + content: ""; } + + /* line 404, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_type.scss */ + pre, blockquote { + border: 1px solid #999; + page-break-inside: avoid; } + + /* line 409, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_type.scss */ + thead { + display: table-header-group; + /* h5bp.com/t */ } + + /* line 412, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_type.scss */ + tr, img { + page-break-inside: avoid; } + + /* line 414, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_type.scss */ + img { + max-width: 100% !important; } + + @page { + margin: 0.5cm; } + + /* line 420, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_type.scss */ + p, h2, h3 { + orphans: 3; + widows: 3; } + + /* line 426, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_type.scss */ + h2, h3 { + page-break-after: avoid; } + + /* line 428, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_type.scss */ + .hide-on-print { + display: none !important; } + + /* line 429, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_type.scss */ + .print-only { + display: block !important; } + + /* line 430, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_type.scss */ + .hide-for-print { + display: none !important; } + + /* line 431, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_type.scss */ + .show-for-print { + display: inherit !important; } } +/* line 171, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_buttons.scss */ +button, .button { + border-style: solid; + border-width: 1px; + cursor: pointer; + font-family: inherit; + font-weight: bold; + line-height: normal; + margin: 0 0 1.25em; + position: relative; + text-decoration: none; + text-align: center; + display: inline-block; + padding-top: 0.75em; + padding-right: 1.5em; + padding-bottom: 0.8125em; + padding-left: 1.5em; + font-size: 1em; + background-color: #2ba6cb; + border-color: #2284a1; + color: white; } +/* line 122, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_buttons.scss */ +button:hover, button:focus, .button:hover, .button:focus { + background-color: #2284a1; } +/* line 133, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_buttons.scss */ +button:hover, button:focus, .button:hover, .button:focus { + color: white; } +/* line 176, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_buttons.scss */ +button.secondary, .button.secondary { + background-color: #e9e9e9; + border-color: #d0d0d0; + color: #333333; } +/* line 122, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_buttons.scss */ +button.secondary:hover, button.secondary:focus, .button.secondary:hover, .button.secondary:focus { + background-color: #d0d0d0; } +/* line 128, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_buttons.scss */ +button.secondary:hover, button.secondary:focus, .button.secondary:hover, .button.secondary:focus { + color: #333333; } +/* line 177, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_buttons.scss */ +button.success, .button.success { + background-color: #5da423; + border-color: #457a1a; + color: white; } +/* line 122, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_buttons.scss */ +button.success:hover, button.success:focus, .button.success:hover, .button.success:focus { + background-color: #457a1a; } +/* line 133, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_buttons.scss */ +button.success:hover, button.success:focus, .button.success:hover, .button.success:focus { + color: white; } +/* line 178, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_buttons.scss */ +button.alert, .button.alert { + background-color: #c60f13; + border-color: #970b0e; + color: white; } +/* line 122, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_buttons.scss */ +button.alert:hover, button.alert:focus, .button.alert:hover, .button.alert:focus { + background-color: #970b0e; } +/* line 133, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_buttons.scss */ +button.alert:hover, button.alert:focus, .button.alert:hover, .button.alert:focus { + color: white; } +/* line 180, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_buttons.scss */ +button.large, .button.large { + padding-top: 1em; + padding-right: 2em; + padding-bottom: 1.0625em; + padding-left: 2em; + font-size: 1.25em; } +/* line 181, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_buttons.scss */ +button.small, .button.small { + padding-top: 0.5625em; + padding-right: 1.125em; + padding-bottom: 0.625em; + padding-left: 1.125em; + font-size: 0.8125em; } +/* line 182, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_buttons.scss */ +button.tiny, .button.tiny { + padding-top: 0.4375em; + padding-right: 0.875em; + padding-bottom: 0.5em; + padding-left: 0.875em; + font-size: 0.6875em; } +/* line 183, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_buttons.scss */ +button.expand, .button.expand { + padding-right: 0; + padding-left: 0; + width: 100%; } +/* line 185, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_buttons.scss */ +button.left-align, .button.left-align { + text-align: left; + text-indent: 0.75em; } +/* line 186, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_buttons.scss */ +button.right-align, .button.right-align { + text-align: right; + padding-right: 0.75em; } +/* line 188, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_buttons.scss */ +button.disabled, button[disabled], .button.disabled, .button[disabled] { + background-color: #2ba6cb; + border-color: #2284a1; + color: white; + cursor: default; + opacity: 0.6; + -webkit-box-shadow: none; + box-shadow: none; } +/* line 122, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_buttons.scss */ +button.disabled:hover, button.disabled:focus, button[disabled]:hover, button[disabled]:focus, .button.disabled:hover, .button.disabled:focus, .button[disabled]:hover, .button[disabled]:focus { + background-color: #2284a1; } +/* line 133, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_buttons.scss */ +button.disabled:hover, button.disabled:focus, button[disabled]:hover, button[disabled]:focus, .button.disabled:hover, .button.disabled:focus, .button[disabled]:hover, .button[disabled]:focus { + color: white; } +/* line 146, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_buttons.scss */ +button.disabled:hover, button.disabled:focus, button[disabled]:hover, button[disabled]:focus, .button.disabled:hover, .button.disabled:focus, .button[disabled]:hover, .button[disabled]:focus { + background-color: #2ba6cb; } +/* line 189, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_buttons.scss */ +button.disabled.secondary, button[disabled].secondary, .button.disabled.secondary, .button[disabled].secondary { + background-color: #e9e9e9; + border-color: #d0d0d0; + color: #333333; + cursor: default; + opacity: 0.6; + -webkit-box-shadow: none; + box-shadow: none; } +/* line 122, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_buttons.scss */ +button.disabled.secondary:hover, button.disabled.secondary:focus, button[disabled].secondary:hover, button[disabled].secondary:focus, .button.disabled.secondary:hover, .button.disabled.secondary:focus, .button[disabled].secondary:hover, .button[disabled].secondary:focus { + background-color: #d0d0d0; } +/* line 128, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_buttons.scss */ +button.disabled.secondary:hover, button.disabled.secondary:focus, button[disabled].secondary:hover, button[disabled].secondary:focus, .button.disabled.secondary:hover, .button.disabled.secondary:focus, .button[disabled].secondary:hover, .button[disabled].secondary:focus { + color: #333333; } +/* line 146, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_buttons.scss */ +button.disabled.secondary:hover, button.disabled.secondary:focus, button[disabled].secondary:hover, button[disabled].secondary:focus, .button.disabled.secondary:hover, .button.disabled.secondary:focus, .button[disabled].secondary:hover, .button[disabled].secondary:focus { + background-color: #e9e9e9; } +/* line 190, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_buttons.scss */ +button.disabled.success, button[disabled].success, .button.disabled.success, .button[disabled].success { + background-color: #5da423; + border-color: #457a1a; + color: white; + cursor: default; + opacity: 0.6; + -webkit-box-shadow: none; + box-shadow: none; } +/* line 122, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_buttons.scss */ +button.disabled.success:hover, button.disabled.success:focus, button[disabled].success:hover, button[disabled].success:focus, .button.disabled.success:hover, .button.disabled.success:focus, .button[disabled].success:hover, .button[disabled].success:focus { + background-color: #457a1a; } +/* line 133, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_buttons.scss */ +button.disabled.success:hover, button.disabled.success:focus, button[disabled].success:hover, button[disabled].success:focus, .button.disabled.success:hover, .button.disabled.success:focus, .button[disabled].success:hover, .button[disabled].success:focus { + color: white; } +/* line 146, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_buttons.scss */ +button.disabled.success:hover, button.disabled.success:focus, button[disabled].success:hover, button[disabled].success:focus, .button.disabled.success:hover, .button.disabled.success:focus, .button[disabled].success:hover, .button[disabled].success:focus { + background-color: #5da423; } +/* line 191, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_buttons.scss */ +button.disabled.alert, button[disabled].alert, .button.disabled.alert, .button[disabled].alert { + background-color: #c60f13; + border-color: #970b0e; + color: white; + cursor: default; + opacity: 0.6; + -webkit-box-shadow: none; + box-shadow: none; } +/* line 122, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_buttons.scss */ +button.disabled.alert:hover, button.disabled.alert:focus, button[disabled].alert:hover, button[disabled].alert:focus, .button.disabled.alert:hover, .button.disabled.alert:focus, .button[disabled].alert:hover, .button[disabled].alert:focus { + background-color: #970b0e; } +/* line 133, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_buttons.scss */ +button.disabled.alert:hover, button.disabled.alert:focus, button[disabled].alert:hover, button[disabled].alert:focus, .button.disabled.alert:hover, .button.disabled.alert:focus, .button[disabled].alert:hover, .button[disabled].alert:focus { + color: white; } +/* line 146, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_buttons.scss */ +button.disabled.alert:hover, button.disabled.alert:focus, button[disabled].alert:hover, button[disabled].alert:focus, .button.disabled.alert:hover, .button.disabled.alert:focus, .button[disabled].alert:hover, .button[disabled].alert:focus { + background-color: #c60f13; } + +/* line 196, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_buttons.scss */ +button, .button { + padding-top: 0.8125em; + padding-bottom: 0.75em; + -webkit-appearance: none; } +/* line 198, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_buttons.scss */ +button.tiny, .button.tiny { + padding-top: 0.5em; + padding-bottom: 0.4375em; + -webkit-appearance: none; } +/* line 199, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_buttons.scss */ +button.small, .button.small { + padding-top: 0.625em; + padding-bottom: 0.5625em; + -webkit-appearance: none; } +/* line 200, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_buttons.scss */ +button.large, .button.large { + padding-top: 1.03125em; + padding-bottom: 1.03125em; + -webkit-appearance: none; } + +@media only screen { + /* line 206, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_buttons.scss */ + button, .button { + -webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset; + box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset; + -webkit-transition: background-color 300ms ease-out; + -moz-transition: background-color 300ms ease-out; + transition: background-color 300ms ease-out; } + /* line 68, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_global.scss */ + button:active, .button:active { + -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2) inset; + box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2) inset; } + /* line 214, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_buttons.scss */ + button.radius, .button.radius { + -webkit-border-radius: 3px; + border-radius: 3px; } + /* line 215, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_buttons.scss */ + button.round, .button.round { + -webkit-border-radius: 1000px; + border-radius: 1000px; } } +@media only screen and (min-width: 768px) { + /* line 223, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_buttons.scss */ + button, .button { + display: inline-block; } } +/* Standard Forms */ +/* line 264, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_forms.scss */ +form { + margin: 0 0 1em; } + +/* Using forms within rows, we need to set some defaults */ +/* line 67, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_forms.scss */ +form .row .row { + margin: 0 -0.5em; } +/* line 70, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_forms.scss */ +form .row .row .column, form .row .row .columns { + padding: 0 0.5em; } +/* line 73, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_forms.scss */ +form .row .row.collapse { + margin: 0; } +/* line 76, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_forms.scss */ +form .row .row.collapse .column, form .row .row.collapse .columns { + padding: 0; } +/* line 77, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_forms.scss */ +form .row .row.collapse input { + -moz-border-radius-bottomright: 0; + -moz-border-radius-topright: 0; + -webkit-border-bottom-right-radius: 0; + -webkit-border-top-right-radius: 0; } +/* line 89, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_forms.scss */ +form .row input.column, form .row input.columns, form .row textarea.column, form .row textarea.columns { + padding-left: 0.5em; } + +/* Label Styles */ +/* line 270, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_forms.scss */ +label { + font-size: 0.875em; + color: #4d4d4d; + cursor: pointer; + display: block; + font-weight: 500; + margin-bottom: 0.1875em; + /* Styles for required inputs */ } +/* line 271, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_forms.scss */ +label.right { + float: none; + text-align: right; } +/* line 272, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_forms.scss */ +label.inline { + margin: 0 0 1em 0; + padding: 0.625em 0; } +/* line 274, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_forms.scss */ +label small { + text-transform: capitalize; + color: #666666; } + +/* Attach elements to the beginning or end of an input */ +/* line 282, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_forms.scss */ +.prefix, .postfix { + display: block; + position: relative; + z-index: 2; + text-align: center; + width: 100%; + padding-top: 0; + padding-bottom: 0; + border-style: solid; + border-width: 1px; + overflow: hidden; + font-size: 0.875em; + height: 2.3125em; + line-height: 2.3125em; } + +/* Adjust padding, alignment and radius if pre/post element is a button */ +/* line 285, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_forms.scss */ +.postfix.button { + padding-left: 0; + padding-right: 0; + padding-top: 0; + padding-bottom: 0; + text-align: center; + line-height: 2.125em; } + +/* line 286, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_forms.scss */ +.prefix.button { + padding-left: 0; + padding-right: 0; + padding-top: 0; + padding-bottom: 0; + text-align: center; + line-height: 2.125em; } + +/* line 288, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_forms.scss */ +.prefix.button.radius { + -webkit-border-radius: 0; + border-radius: 0; + -moz-border-radius-bottomleft: 3px; + -moz-border-radius-topleft: 3px; + -webkit-border-bottom-left-radius: 3px; + -webkit-border-top-left-radius: 3px; + border-bottom-left-radius: 3px; + border-top-left-radius: 3px; } + +/* line 289, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_forms.scss */ +.postfix.button.radius { + -webkit-border-radius: 0; + border-radius: 0; + -moz-border-radius-topright: 3px; + -moz-border-radius-bottomright: 3px; + -webkit-border-top-right-radius: 3px; + -webkit-border-bottom-right-radius: 3px; + border-top-right-radius: 3px; + border-bottom-right-radius: 3px; } + +/* line 290, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_forms.scss */ +.prefix.button.round { + -webkit-border-radius: 0; + border-radius: 0; + -moz-border-radius-bottomleft: 1000px; + -moz-border-radius-topleft: 1000px; + -webkit-border-bottom-left-radius: 1000px; + -webkit-border-top-left-radius: 1000px; + border-bottom-left-radius: 1000px; + border-top-left-radius: 1000px; } + +/* line 291, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_forms.scss */ +.postfix.button.round { + -webkit-border-radius: 0; + border-radius: 0; + -moz-border-radius-topright: 1000px; + -moz-border-radius-bottomright: 1000px; + -webkit-border-top-right-radius: 1000px; + -webkit-border-bottom-right-radius: 1000px; + border-top-right-radius: 1000px; + border-bottom-right-radius: 1000px; } + +/* Separate prefix and postfix styles when on span or label so buttons keep their own */ +/* line 294, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_forms.scss */ +span.prefix, label.prefix { + background: #f2f2f2; + border-color: #d9d9d9; + border-right: none; + color: #333333; } +/* line 295, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_forms.scss */ +span.prefix.radius, label.prefix.radius { + -webkit-border-radius: 0; + border-radius: 0; + -moz-border-radius-bottomleft: 3px; + -moz-border-radius-topleft: 3px; + -webkit-border-bottom-left-radius: 3px; + -webkit-border-top-left-radius: 3px; + border-bottom-left-radius: 3px; + border-top-left-radius: 3px; } + +/* line 297, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_forms.scss */ +span.postfix, label.postfix { + background: #f2f2f2; + border-color: #cccccc; + border-left: none; + color: #333333; } +/* line 298, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_forms.scss */ +span.postfix.radius, label.postfix.radius { + -webkit-border-radius: 0; + border-radius: 0; + -moz-border-radius-topright: 3px; + -moz-border-radius-bottomright: 3px; + -webkit-border-top-right-radius: 3px; + -webkit-border-bottom-right-radius: 3px; + border-top-right-radius: 3px; + border-bottom-right-radius: 3px; } + +/* Input groups will automatically style first and last elements of the group */ +/* line 304, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_forms.scss */ +.input-group.radius > *:first-child, .input-group.radius > *:first-child * { + -moz-border-radius-bottomleft: 3px; + -moz-border-radius-topleft: 3px; + -webkit-border-bottom-left-radius: 3px; + -webkit-border-top-left-radius: 3px; + border-bottom-left-radius: 3px; + border-top-left-radius: 3px; } +/* line 307, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_forms.scss */ +.input-group.radius > *:last-child, .input-group.radius > *:last-child * { + -moz-border-radius-topright: 3px; + -moz-border-radius-bottomright: 3px; + -webkit-border-top-right-radius: 3px; + -webkit-border-bottom-right-radius: 3px; + border-top-right-radius: 3px; + border-bottom-right-radius: 3px; } +/* line 312, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_forms.scss */ +.input-group.round > *:first-child, .input-group.round > *:first-child * { + -moz-border-radius-bottomleft: 1000px; + -moz-border-radius-topleft: 1000px; + -webkit-border-bottom-left-radius: 1000px; + -webkit-border-top-left-radius: 1000px; + border-bottom-left-radius: 1000px; + border-top-left-radius: 1000px; } +/* line 315, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_forms.scss */ +.input-group.round > *:last-child, .input-group.round > *:last-child * { + -moz-border-radius-topright: 1000px; + -moz-border-radius-bottomright: 1000px; + -webkit-border-top-right-radius: 1000px; + -webkit-border-bottom-right-radius: 1000px; + border-top-right-radius: 1000px; + border-bottom-right-radius: 1000px; } + +/* We use this to get basic styling on all basic form elements */ +/* line 335, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_forms.scss */ +input[type="text"], input[type="password"], input[type="date"], input[type="datetime"], input[type="datetime-local"], input[type="month"], input[type="week"], input[type="email"], input[type="number"], input[type="search"], input[type="tel"], input[type="time"], input[type="url"], textarea { + -webkit-appearance: none; + -webkit-border-radius: 0; + border-radius: 0; + background-color: white; + font-family: inherit; + border: 1px solid #cccccc; + -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); + box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); + color: rgba(0, 0, 0, 0.75); + display: block; + font-size: 0.875em; + margin: 0 0 1em 0; + padding: 0.5em; + height: 2.3125em; + width: 100%; + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; + -webkit-transition: -webkit-box-shadow 0.45s, border-color 0.45s ease-in-out; + -moz-transition: -moz-box-shadow 0.45s, border-color 0.45s ease-in-out; + transition: box-shadow 0.45s, border-color 0.45s ease-in-out; } +/* line 134, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_global.scss */ +input[type="text"]:focus, input[type="password"]:focus, input[type="date"]:focus, input[type="datetime"]:focus, input[type="datetime-local"]:focus, input[type="month"]:focus, input[type="week"]:focus, input[type="email"]:focus, input[type="number"]:focus, input[type="search"]:focus, input[type="tel"]:focus, input[type="time"]:focus, input[type="url"]:focus, textarea:focus { + -webkit-box-shadow: 0 0 5px #999999; + -moz-box-shadow: 0 0 5px #999999; + box-shadow: 0 0 5px #999999; + border-color: #999999; } +/* line 113, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_forms.scss */ +input[type="text"]:focus, input[type="password"]:focus, input[type="date"]:focus, input[type="datetime"]:focus, input[type="datetime-local"]:focus, input[type="month"]:focus, input[type="week"]:focus, input[type="email"]:focus, input[type="number"]:focus, input[type="search"]:focus, input[type="tel"]:focus, input[type="time"]:focus, input[type="url"]:focus, textarea:focus { + background: #fafafa; + border-color: #999999; + outline: none; } +/* line 120, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_forms.scss */ +input[type="text"][disabled], input[type="password"][disabled], input[type="date"][disabled], input[type="datetime"][disabled], input[type="datetime-local"][disabled], input[type="month"][disabled], input[type="week"][disabled], input[type="email"][disabled], input[type="number"][disabled], input[type="search"][disabled], input[type="tel"][disabled], input[type="time"][disabled], input[type="url"][disabled], textarea[disabled] { + background-color: #dddddd; } + +/* Adjust margin for form elements below */ +/* line 349, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_forms.scss */ +input[type="file"], input[type="checkbox"], input[type="radio"], select { + margin: 0 0 1em 0; } + +/* Normalize file input width */ +/* line 354, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_forms.scss */ +input[type="file"] { + width: 100%; } + +/* We add basic fieldset styling */ +/* line 359, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_forms.scss */ +fieldset { + border: solid 1px #dddddd; + padding: 1.25em; + margin: 1.125em 0; } +/* line 221, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_forms.scss */ +fieldset legend { + font-weight: bold; + background: white; + padding: 0 0.1875em; + margin: 0; + margin-left: -0.1875em; } + +/* Error Handling */ +/* line 366, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_forms.scss */ +[data-abide] .error small.error, [data-abide] span.error, [data-abide] small.error { + display: block; + padding: 0.375em 0.25em; + margin-top: 0; + margin-bottom: 1em; + font-size: 0.75em; + font-weight: bold; + background: #c60f13; + color: white; } +/* line 369, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_forms.scss */ +[data-abide] span.error, [data-abide] small.error { + display: none; } + +/* line 371, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_forms.scss */ +span.error, small.error { + display: block; + padding: 0.375em 0.25em; + margin-top: 0; + margin-bottom: 1em; + font-size: 0.75em; + font-weight: bold; + background: #c60f13; + color: white; } + +/* line 377, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_forms.scss */ +.error input, .error textarea, .error select { + border-color: #c60f13; + background-color: rgba(198, 15, 19, 0.1); + margin-bottom: 0; } +/* line 236, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_forms.scss */ +.error input:focus, .error textarea:focus, .error select:focus { + background: #fafafa; + border-color: #999999; } +/* line 383, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_forms.scss */ +.error label, .error label.error { + color: #c60f13; } +/* line 388, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_forms.scss */ +.error > small, .error small.error { + display: block; + padding: 0.375em 0.25em; + margin-top: 0; + margin-bottom: 1em; + font-size: 0.75em; + font-weight: bold; + background: #c60f13; + color: white; } +/* line 392, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_forms.scss */ +.error span.error-message { + display: block; } + +/* line 398, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_forms.scss */ +input.error, textarea.error { + border-color: #c60f13; + background-color: rgba(198, 15, 19, 0.1); + margin-bottom: 0; } +/* line 236, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_forms.scss */ +input.error:focus, textarea.error:focus { + background: #fafafa; + border-color: #999999; } + +/* line 403, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_forms.scss */ +.error select { + border-color: #c60f13; + background-color: rgba(198, 15, 19, 0.1); } +/* line 236, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_forms.scss */ +.error select:focus { + background: #fafafa; + border-color: #999999; } + +/* line 407, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_forms.scss */ +label.error { + color: #c60f13; } + +/* Button Groups */ +/* line 72, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_button-groups.scss */ +.button-group { + list-style: none; + margin: 0; + *zoom: 1; } +/* line 121, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_global.scss */ +.button-group:before, .button-group:after { + content: " "; + display: table; } +/* line 122, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_global.scss */ +.button-group:after { + clear: both; } +/* line 74, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_button-groups.scss */ +.button-group > * { + margin: 0 0 0 -1px; + float: left; } +/* line 35, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_button-groups.scss */ +.button-group > *:first-child { + margin-left: 0; } +/* line 53, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_button-groups.scss */ +.button-group.radius > *:first-child, .button-group.radius > *:first-child > a, .button-group.radius > *:first-child > button, .button-group.radius > *:first-child > .button { + -moz-border-radius-bottomleft: 3px; + -moz-border-radius-topleft: 3px; + -webkit-border-bottom-left-radius: 3px; + -webkit-border-top-left-radius: 3px; + border-bottom-left-radius: 3px; + border-top-left-radius: 3px; } +/* line 57, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_button-groups.scss */ +.button-group.radius > *:last-child, .button-group.radius > *:last-child > a, .button-group.radius > *:last-child > button, .button-group.radius > *:last-child > .button { + -moz-border-radius-topright: 3px; + -moz-border-radius-bottomright: 3px; + -webkit-border-top-right-radius: 3px; + -webkit-border-bottom-right-radius: 3px; + border-top-right-radius: 3px; + border-bottom-right-radius: 3px; } +/* line 53, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_button-groups.scss */ +.button-group.round > *:first-child, .button-group.round > *:first-child > a, .button-group.round > *:first-child > button, .button-group.round > *:first-child > .button { + -moz-border-radius-bottomleft: 1000px; + -moz-border-radius-topleft: 1000px; + -webkit-border-bottom-left-radius: 1000px; + -webkit-border-top-left-radius: 1000px; + border-bottom-left-radius: 1000px; + border-top-left-radius: 1000px; } +/* line 57, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_button-groups.scss */ +.button-group.round > *:last-child, .button-group.round > *:last-child > a, .button-group.round > *:last-child > button, .button-group.round > *:last-child > .button { + -moz-border-radius-topright: 1000px; + -moz-border-radius-bottomright: 1000px; + -webkit-border-top-right-radius: 1000px; + -webkit-border-bottom-right-radius: 1000px; + border-top-right-radius: 1000px; + border-bottom-right-radius: 1000px; } +/* line 80, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_button-groups.scss */ +.button-group.even-2 li { + width: 50%; } +/* line 63, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_button-groups.scss */ +.button-group.even-2 li button, .button-group.even-2 li .button { + width: 100%; } +/* line 80, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_button-groups.scss */ +.button-group.even-3 li { + width: 33.33333%; } +/* line 63, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_button-groups.scss */ +.button-group.even-3 li button, .button-group.even-3 li .button { + width: 100%; } +/* line 80, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_button-groups.scss */ +.button-group.even-4 li { + width: 25%; } +/* line 63, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_button-groups.scss */ +.button-group.even-4 li button, .button-group.even-4 li .button { + width: 100%; } +/* line 80, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_button-groups.scss */ +.button-group.even-5 li { + width: 20%; } +/* line 63, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_button-groups.scss */ +.button-group.even-5 li button, .button-group.even-5 li .button { + width: 100%; } +/* line 80, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_button-groups.scss */ +.button-group.even-6 li { + width: 16.66667%; } +/* line 63, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_button-groups.scss */ +.button-group.even-6 li button, .button-group.even-6 li .button { + width: 100%; } +/* line 80, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_button-groups.scss */ +.button-group.even-7 li { + width: 14.28571%; } +/* line 63, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_button-groups.scss */ +.button-group.even-7 li button, .button-group.even-7 li .button { + width: 100%; } +/* line 80, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_button-groups.scss */ +.button-group.even-8 li { + width: 12.5%; } +/* line 63, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_button-groups.scss */ +.button-group.even-8 li button, .button-group.even-8 li .button { + width: 100%; } + +/* line 84, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_button-groups.scss */ +.button-bar { + *zoom: 1; } +/* line 121, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_global.scss */ +.button-bar:before, .button-bar:after { + content: " "; + display: table; } +/* line 122, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_global.scss */ +.button-bar:after { + clear: both; } +/* line 86, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_button-groups.scss */ +.button-bar .button-group { + float: left; + margin-right: 0.625em; } +/* line 23, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_button-groups.scss */ +.button-bar .button-group div { + overflow: hidden; } + +/* Dropdown Button */ +/* line 108, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_dropdown-buttons.scss */ +.dropdown.button { + position: relative; + padding-right: 3.1875em; } +/* line 46, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_dropdown-buttons.scss */ +.dropdown.button:before { + position: absolute; + content: ""; + width: 0; + height: 0; + display: block; + border-style: solid; + border-color: white transparent transparent transparent; + top: 50%; } +/* line 81, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_dropdown-buttons.scss */ +.dropdown.button:before { + border-width: 0.5625em; + right: 1.5em; + margin-top: -0.25em; } +/* line 100, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_dropdown-buttons.scss */ +.dropdown.button:before { + border-color: white transparent transparent transparent; } +/* line 109, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_dropdown-buttons.scss */ +.dropdown.button.tiny { + padding-right: 2.1875em; } +/* line 61, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_dropdown-buttons.scss */ +.dropdown.button.tiny:before { + border-width: 0.4375em; + right: 0.875em; + margin-top: -0.15625em; } +/* line 100, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_dropdown-buttons.scss */ +.dropdown.button.tiny:before { + border-color: white transparent transparent transparent; } +/* line 110, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_dropdown-buttons.scss */ +.dropdown.button.small { + padding-right: 2.8125em; } +/* line 71, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_dropdown-buttons.scss */ +.dropdown.button.small:before { + border-width: 0.5625em; + right: 1.125em; + margin-top: -0.21875em; } +/* line 100, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_dropdown-buttons.scss */ +.dropdown.button.small:before { + border-color: white transparent transparent transparent; } +/* line 111, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_dropdown-buttons.scss */ +.dropdown.button.large { + padding-right: 4em; } +/* line 91, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_dropdown-buttons.scss */ +.dropdown.button.large:before { + border-width: 0.625em; + right: 1.75em; + margin-top: -0.3125em; } +/* line 100, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_dropdown-buttons.scss */ +.dropdown.button.large:before { + border-color: white transparent transparent transparent; } +/* line 112, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_dropdown-buttons.scss */ +.dropdown.button.secondary:before { + border-color: #333333 transparent transparent transparent; } + +/* Split Buttons */ +/* line 150, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_split-buttons.scss */ +.split.button { + position: relative; + padding-right: 4.8em; } +/* line 53, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_split-buttons.scss */ +.split.button span { + display: block; + height: 100%; + position: absolute; + right: 0; + top: 0; + border-left: solid 1px; } +/* line 62, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_split-buttons.scss */ +.split.button span:before { + position: absolute; + content: ""; + width: 0; + height: 0; + display: block; + border-style: inset; + left: 50%; } +/* line 73, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_split-buttons.scss */ +.split.button span:active { + background-color: rgba(0, 0, 0, 0.1); } +/* line 79, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_split-buttons.scss */ +.split.button span { + border-left-color: #1e728c; } +/* line 116, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_split-buttons.scss */ +.split.button span { + width: 3em; } +/* line 117, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_split-buttons.scss */ +.split.button span:before { + border-top-style: solid; + border-width: 0.5625em; + top: 1.125em; + margin-left: -0.5625em; } +/* line 142, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_split-buttons.scss */ +.split.button span:before { + border-color: white transparent transparent transparent; } +/* line 79, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_split-buttons.scss */ +.split.button.secondary span { + border-left-color: #c3c3c3; } +/* line 142, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_split-buttons.scss */ +.split.button.secondary span:before { + border-color: white transparent transparent transparent; } +/* line 79, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_split-buttons.scss */ +.split.button.alert span { + border-left-color: #7f0a0c; } +/* line 79, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_split-buttons.scss */ +.split.button.success span { + border-left-color: #396516; } +/* line 156, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_split-buttons.scss */ +.split.button.tiny { + padding-right: 3.9375em; } +/* line 88, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_split-buttons.scss */ +.split.button.tiny span { + width: 2.84375em; } +/* line 89, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_split-buttons.scss */ +.split.button.tiny span:before { + border-top-style: solid; + border-width: 0.4375em; + top: 0.875em; + margin-left: -0.3125em; } +/* line 157, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_split-buttons.scss */ +.split.button.small { + padding-right: 3.9375em; } +/* line 102, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_split-buttons.scss */ +.split.button.small span { + width: 2.8125em; } +/* line 103, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_split-buttons.scss */ +.split.button.small span:before { + border-top-style: solid; + border-width: 0.5625em; + top: 0.84375em; + margin-left: -0.5625em; } +/* line 158, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_split-buttons.scss */ +.split.button.large { + padding-right: 6em; } +/* line 130, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_split-buttons.scss */ +.split.button.large span { + width: 3.75em; } +/* line 131, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_split-buttons.scss */ +.split.button.large span:before { + border-top-style: solid; + border-width: 0.625em; + top: 1.3125em; + margin-left: -0.5625em; } +/* line 159, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_split-buttons.scss */ +.split.button.expand { + padding-left: 2em; } +/* line 142, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_split-buttons.scss */ +.split.button.secondary span:before { + border-color: #333333 transparent transparent transparent; } +/* line 163, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_split-buttons.scss */ +.split.button.radius span { + -moz-border-radius-topright: 3px; + -moz-border-radius-bottomright: 3px; + -webkit-border-top-right-radius: 3px; + -webkit-border-bottom-right-radius: 3px; + border-top-right-radius: 3px; + border-bottom-right-radius: 3px; } +/* line 164, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_split-buttons.scss */ +.split.button.round span { + -moz-border-radius-topright: 1000px; + -moz-border-radius-bottomright: 1000px; + -webkit-border-top-right-radius: 1000px; + -webkit-border-bottom-right-radius: 1000px; + border-top-right-radius: 1000px; + border-bottom-right-radius: 1000px; } + +/* Flex Video */ +/* line 44, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_flex-video.scss */ +.flex-video { + position: relative; + padding-top: 1.5625em; + padding-bottom: 67.5%; + height: 0; + margin-bottom: 1em; + overflow: hidden; } +/* line 26, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_flex-video.scss */ +.flex-video.widescreen { + padding-bottom: 57.25%; } +/* line 27, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_flex-video.scss */ +.flex-video.vimeo { + padding-top: 0; } +/* line 32, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_flex-video.scss */ +.flex-video iframe, .flex-video object, .flex-video embed, .flex-video video { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; } + +/* Sections */ +/* line 285, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ +[data-section=''], [data-section='auto'], .section-container.auto, [data-section='vertical-tabs'], .section-container.vertical-tabs, [data-section='vertical-nav'], .section-container.vertical-nav, [data-section='horizontal-nav'], .section-container.horizontal-nav, [data-section='accordion'], .section-container.accordion { + width: 100%; + position: relative; + display: block; + margin-bottom: 1.25em; } +/* line 55, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ +[data-section=''][data-section-small-style], [data-section='auto'][data-section-small-style], .section-container.auto[data-section-small-style], [data-section='vertical-tabs'][data-section-small-style], .section-container.vertical-tabs[data-section-small-style], [data-section='vertical-nav'][data-section-small-style], .section-container.vertical-nav[data-section-small-style], [data-section='horizontal-nav'][data-section-small-style], .section-container.horizontal-nav[data-section-small-style], [data-section='accordion'][data-section-small-style], .section-container.accordion[data-section-small-style] { + width: 100% !important; } +/* line 58, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ +[data-section=''][data-section-small-style] > [data-section-region], [data-section=''][data-section-small-style] > section, [data-section=''][data-section-small-style] > .section, [data-section='auto'][data-section-small-style] > [data-section-region], [data-section='auto'][data-section-small-style] > section, [data-section='auto'][data-section-small-style] > .section, .section-container.auto[data-section-small-style] > [data-section-region], .section-container.auto[data-section-small-style] > section, .section-container.auto[data-section-small-style] > .section, [data-section='vertical-tabs'][data-section-small-style] > [data-section-region], [data-section='vertical-tabs'][data-section-small-style] > section, [data-section='vertical-tabs'][data-section-small-style] > .section, .section-container.vertical-tabs[data-section-small-style] > [data-section-region], .section-container.vertical-tabs[data-section-small-style] > section, .section-container.vertical-tabs[data-section-small-style] > .section, [data-section='vertical-nav'][data-section-small-style] > [data-section-region], [data-section='vertical-nav'][data-section-small-style] > section, [data-section='vertical-nav'][data-section-small-style] > .section, .section-container.vertical-nav[data-section-small-style] > [data-section-region], .section-container.vertical-nav[data-section-small-style] > section, .section-container.vertical-nav[data-section-small-style] > .section, [data-section='horizontal-nav'][data-section-small-style] > [data-section-region], [data-section='horizontal-nav'][data-section-small-style] > section, [data-section='horizontal-nav'][data-section-small-style] > .section, .section-container.horizontal-nav[data-section-small-style] > [data-section-region], .section-container.horizontal-nav[data-section-small-style] > section, .section-container.horizontal-nav[data-section-small-style] > .section, [data-section='accordion'][data-section-small-style] > [data-section-region], [data-section='accordion'][data-section-small-style] > section, [data-section='accordion'][data-section-small-style] > .section, .section-container.accordion[data-section-small-style] > [data-section-region], .section-container.accordion[data-section-small-style] > section, .section-container.accordion[data-section-small-style] > .section { + padding: 0 !important; + margin: 0 !important; } +/* line 61, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ +[data-section=''][data-section-small-style] > [data-section-region] > [data-section-title], [data-section=''][data-section-small-style] > [data-section-region] > .title, [data-section=''][data-section-small-style] > section > [data-section-title], [data-section=''][data-section-small-style] > section > .title, [data-section=''][data-section-small-style] > .section > [data-section-title], [data-section=''][data-section-small-style] > .section > .title, [data-section='auto'][data-section-small-style] > [data-section-region] > [data-section-title], [data-section='auto'][data-section-small-style] > [data-section-region] > .title, [data-section='auto'][data-section-small-style] > section > [data-section-title], [data-section='auto'][data-section-small-style] > section > .title, [data-section='auto'][data-section-small-style] > .section > [data-section-title], [data-section='auto'][data-section-small-style] > .section > .title, .section-container.auto[data-section-small-style] > [data-section-region] > [data-section-title], .section-container.auto[data-section-small-style] > [data-section-region] > .title, .section-container.auto[data-section-small-style] > section > [data-section-title], .section-container.auto[data-section-small-style] > section > .title, .section-container.auto[data-section-small-style] > .section > [data-section-title], .section-container.auto[data-section-small-style] > .section > .title, [data-section='vertical-tabs'][data-section-small-style] > [data-section-region] > [data-section-title], [data-section='vertical-tabs'][data-section-small-style] > [data-section-region] > .title, [data-section='vertical-tabs'][data-section-small-style] > section > [data-section-title], [data-section='vertical-tabs'][data-section-small-style] > section > .title, [data-section='vertical-tabs'][data-section-small-style] > .section > [data-section-title], [data-section='vertical-tabs'][data-section-small-style] > .section > .title, .section-container.vertical-tabs[data-section-small-style] > [data-section-region] > [data-section-title], .section-container.vertical-tabs[data-section-small-style] > [data-section-region] > .title, .section-container.vertical-tabs[data-section-small-style] > section > [data-section-title], .section-container.vertical-tabs[data-section-small-style] > section > .title, .section-container.vertical-tabs[data-section-small-style] > .section > [data-section-title], .section-container.vertical-tabs[data-section-small-style] > .section > .title, [data-section='vertical-nav'][data-section-small-style] > [data-section-region] > [data-section-title], [data-section='vertical-nav'][data-section-small-style] > [data-section-region] > .title, [data-section='vertical-nav'][data-section-small-style] > section > [data-section-title], [data-section='vertical-nav'][data-section-small-style] > section > .title, [data-section='vertical-nav'][data-section-small-style] > .section > [data-section-title], [data-section='vertical-nav'][data-section-small-style] > .section > .title, .section-container.vertical-nav[data-section-small-style] > [data-section-region] > [data-section-title], .section-container.vertical-nav[data-section-small-style] > [data-section-region] > .title, .section-container.vertical-nav[data-section-small-style] > section > [data-section-title], .section-container.vertical-nav[data-section-small-style] > section > .title, .section-container.vertical-nav[data-section-small-style] > .section > [data-section-title], .section-container.vertical-nav[data-section-small-style] > .section > .title, [data-section='horizontal-nav'][data-section-small-style] > [data-section-region] > [data-section-title], [data-section='horizontal-nav'][data-section-small-style] > [data-section-region] > .title, [data-section='horizontal-nav'][data-section-small-style] > section > [data-section-title], [data-section='horizontal-nav'][data-section-small-style] > section > .title, [data-section='horizontal-nav'][data-section-small-style] > .section > [data-section-title], [data-section='horizontal-nav'][data-section-small-style] > .section > .title, .section-container.horizontal-nav[data-section-small-style] > [data-section-region] > [data-section-title], .section-container.horizontal-nav[data-section-small-style] > [data-section-region] > .title, .section-container.horizontal-nav[data-section-small-style] > section > [data-section-title], .section-container.horizontal-nav[data-section-small-style] > section > .title, .section-container.horizontal-nav[data-section-small-style] > .section > [data-section-title], .section-container.horizontal-nav[data-section-small-style] > .section > .title, [data-section='accordion'][data-section-small-style] > [data-section-region] > [data-section-title], [data-section='accordion'][data-section-small-style] > [data-section-region] > .title, [data-section='accordion'][data-section-small-style] > section > [data-section-title], [data-section='accordion'][data-section-small-style] > section > .title, [data-section='accordion'][data-section-small-style] > .section > [data-section-title], [data-section='accordion'][data-section-small-style] > .section > .title, .section-container.accordion[data-section-small-style] > [data-section-region] > [data-section-title], .section-container.accordion[data-section-small-style] > [data-section-region] > .title, .section-container.accordion[data-section-small-style] > section > [data-section-title], .section-container.accordion[data-section-small-style] > section > .title, .section-container.accordion[data-section-small-style] > .section > [data-section-title], .section-container.accordion[data-section-small-style] > .section > .title { + width: 100% !important; } +/* line 287, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ +[data-section=''] > section, [data-section=''] > .section, [data-section=''] > [data-section-region], [data-section='auto'] > section, [data-section='auto'] > .section, [data-section='auto'] > [data-section-region], .section-container.auto > section, .section-container.auto > .section, .section-container.auto > [data-section-region], [data-section='vertical-tabs'] > section, [data-section='vertical-tabs'] > .section, [data-section='vertical-tabs'] > [data-section-region], .section-container.vertical-tabs > section, .section-container.vertical-tabs > .section, .section-container.vertical-tabs > [data-section-region], [data-section='vertical-nav'] > section, [data-section='vertical-nav'] > .section, [data-section='vertical-nav'] > [data-section-region], .section-container.vertical-nav > section, .section-container.vertical-nav > .section, .section-container.vertical-nav > [data-section-region], [data-section='horizontal-nav'] > section, [data-section='horizontal-nav'] > .section, [data-section='horizontal-nav'] > [data-section-region], .section-container.horizontal-nav > section, .section-container.horizontal-nav > .section, .section-container.horizontal-nav > [data-section-region], [data-section='accordion'] > section, [data-section='accordion'] > .section, [data-section='accordion'] > [data-section-region], .section-container.accordion > section, .section-container.accordion > .section, .section-container.accordion > [data-section-region] { + margin: 0; } +/* line 102, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ +[data-section=''] > section > [data-section-title], [data-section=''] > section > .title, [data-section=''] > .section > [data-section-title], [data-section=''] > .section > .title, [data-section=''] > [data-section-region] > [data-section-title], [data-section=''] > [data-section-region] > .title, [data-section='auto'] > section > [data-section-title], [data-section='auto'] > section > .title, [data-section='auto'] > .section > [data-section-title], [data-section='auto'] > .section > .title, [data-section='auto'] > [data-section-region] > [data-section-title], [data-section='auto'] > [data-section-region] > .title, .section-container.auto > section > [data-section-title], .section-container.auto > section > .title, .section-container.auto > .section > [data-section-title], .section-container.auto > .section > .title, .section-container.auto > [data-section-region] > [data-section-title], .section-container.auto > [data-section-region] > .title, [data-section='vertical-tabs'] > section > [data-section-title], [data-section='vertical-tabs'] > section > .title, [data-section='vertical-tabs'] > .section > [data-section-title], [data-section='vertical-tabs'] > .section > .title, [data-section='vertical-tabs'] > [data-section-region] > [data-section-title], [data-section='vertical-tabs'] > [data-section-region] > .title, .section-container.vertical-tabs > section > [data-section-title], .section-container.vertical-tabs > section > .title, .section-container.vertical-tabs > .section > [data-section-title], .section-container.vertical-tabs > .section > .title, .section-container.vertical-tabs > [data-section-region] > [data-section-title], .section-container.vertical-tabs > [data-section-region] > .title, [data-section='vertical-nav'] > section > [data-section-title], [data-section='vertical-nav'] > section > .title, [data-section='vertical-nav'] > .section > [data-section-title], [data-section='vertical-nav'] > .section > .title, [data-section='vertical-nav'] > [data-section-region] > [data-section-title], [data-section='vertical-nav'] > [data-section-region] > .title, .section-container.vertical-nav > section > [data-section-title], .section-container.vertical-nav > section > .title, .section-container.vertical-nav > .section > [data-section-title], .section-container.vertical-nav > .section > .title, .section-container.vertical-nav > [data-section-region] > [data-section-title], .section-container.vertical-nav > [data-section-region] > .title, [data-section='horizontal-nav'] > section > [data-section-title], [data-section='horizontal-nav'] > section > .title, [data-section='horizontal-nav'] > .section > [data-section-title], [data-section='horizontal-nav'] > .section > .title, [data-section='horizontal-nav'] > [data-section-region] > [data-section-title], [data-section='horizontal-nav'] > [data-section-region] > .title, .section-container.horizontal-nav > section > [data-section-title], .section-container.horizontal-nav > section > .title, .section-container.horizontal-nav > .section > [data-section-title], .section-container.horizontal-nav > .section > .title, .section-container.horizontal-nav > [data-section-region] > [data-section-title], .section-container.horizontal-nav > [data-section-region] > .title, [data-section='accordion'] > section > [data-section-title], [data-section='accordion'] > section > .title, [data-section='accordion'] > .section > [data-section-title], [data-section='accordion'] > .section > .title, [data-section='accordion'] > [data-section-region] > [data-section-title], [data-section='accordion'] > [data-section-region] > .title, .section-container.accordion > section > [data-section-title], .section-container.accordion > section > .title, .section-container.accordion > .section > [data-section-title], .section-container.accordion > .section > .title, .section-container.accordion > [data-section-region] > [data-section-title], .section-container.accordion > [data-section-region] > .title { + margin-bottom: 0; } +/* line 104, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ +[data-section=''] > section > [data-section-title] a, [data-section=''] > section > .title a, [data-section=''] > .section > [data-section-title] a, [data-section=''] > .section > .title a, [data-section=''] > [data-section-region] > [data-section-title] a, [data-section=''] > [data-section-region] > .title a, [data-section='auto'] > section > [data-section-title] a, [data-section='auto'] > section > .title a, [data-section='auto'] > .section > [data-section-title] a, [data-section='auto'] > .section > .title a, [data-section='auto'] > [data-section-region] > [data-section-title] a, [data-section='auto'] > [data-section-region] > .title a, .section-container.auto > section > [data-section-title] a, .section-container.auto > section > .title a, .section-container.auto > .section > [data-section-title] a, .section-container.auto > .section > .title a, .section-container.auto > [data-section-region] > [data-section-title] a, .section-container.auto > [data-section-region] > .title a, [data-section='vertical-tabs'] > section > [data-section-title] a, [data-section='vertical-tabs'] > section > .title a, [data-section='vertical-tabs'] > .section > [data-section-title] a, [data-section='vertical-tabs'] > .section > .title a, [data-section='vertical-tabs'] > [data-section-region] > [data-section-title] a, [data-section='vertical-tabs'] > [data-section-region] > .title a, .section-container.vertical-tabs > section > [data-section-title] a, .section-container.vertical-tabs > section > .title a, .section-container.vertical-tabs > .section > [data-section-title] a, .section-container.vertical-tabs > .section > .title a, .section-container.vertical-tabs > [data-section-region] > [data-section-title] a, .section-container.vertical-tabs > [data-section-region] > .title a, [data-section='vertical-nav'] > section > [data-section-title] a, [data-section='vertical-nav'] > section > .title a, [data-section='vertical-nav'] > .section > [data-section-title] a, [data-section='vertical-nav'] > .section > .title a, [data-section='vertical-nav'] > [data-section-region] > [data-section-title] a, [data-section='vertical-nav'] > [data-section-region] > .title a, .section-container.vertical-nav > section > [data-section-title] a, .section-container.vertical-nav > section > .title a, .section-container.vertical-nav > .section > [data-section-title] a, .section-container.vertical-nav > .section > .title a, .section-container.vertical-nav > [data-section-region] > [data-section-title] a, .section-container.vertical-nav > [data-section-region] > .title a, [data-section='horizontal-nav'] > section > [data-section-title] a, [data-section='horizontal-nav'] > section > .title a, [data-section='horizontal-nav'] > .section > [data-section-title] a, [data-section='horizontal-nav'] > .section > .title a, [data-section='horizontal-nav'] > [data-section-region] > [data-section-title] a, [data-section='horizontal-nav'] > [data-section-region] > .title a, .section-container.horizontal-nav > section > [data-section-title] a, .section-container.horizontal-nav > section > .title a, .section-container.horizontal-nav > .section > [data-section-title] a, .section-container.horizontal-nav > .section > .title a, .section-container.horizontal-nav > [data-section-region] > [data-section-title] a, .section-container.horizontal-nav > [data-section-region] > .title a, [data-section='accordion'] > section > [data-section-title] a, [data-section='accordion'] > section > .title a, [data-section='accordion'] > .section > [data-section-title] a, [data-section='accordion'] > .section > .title a, [data-section='accordion'] > [data-section-region] > [data-section-title] a, [data-section='accordion'] > [data-section-region] > .title a, .section-container.accordion > section > [data-section-title] a, .section-container.accordion > section > .title a, .section-container.accordion > .section > [data-section-title] a, .section-container.accordion > .section > .title a, .section-container.accordion > [data-section-region] > [data-section-title] a, .section-container.accordion > [data-section-region] > .title a { + width: 100%; + display: inline-block; + white-space: nowrap; } +/* line 111, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ +[data-section=''] > section > [data-section-content], [data-section=''] > section > .content, [data-section=''] > .section > [data-section-content], [data-section=''] > .section > .content, [data-section=''] > [data-section-region] > [data-section-content], [data-section=''] > [data-section-region] > .content, [data-section='auto'] > section > [data-section-content], [data-section='auto'] > section > .content, [data-section='auto'] > .section > [data-section-content], [data-section='auto'] > .section > .content, [data-section='auto'] > [data-section-region] > [data-section-content], [data-section='auto'] > [data-section-region] > .content, .section-container.auto > section > [data-section-content], .section-container.auto > section > .content, .section-container.auto > .section > [data-section-content], .section-container.auto > .section > .content, .section-container.auto > [data-section-region] > [data-section-content], .section-container.auto > [data-section-region] > .content, [data-section='vertical-tabs'] > section > [data-section-content], [data-section='vertical-tabs'] > section > .content, [data-section='vertical-tabs'] > .section > [data-section-content], [data-section='vertical-tabs'] > .section > .content, [data-section='vertical-tabs'] > [data-section-region] > [data-section-content], [data-section='vertical-tabs'] > [data-section-region] > .content, .section-container.vertical-tabs > section > [data-section-content], .section-container.vertical-tabs > section > .content, .section-container.vertical-tabs > .section > [data-section-content], .section-container.vertical-tabs > .section > .content, .section-container.vertical-tabs > [data-section-region] > [data-section-content], .section-container.vertical-tabs > [data-section-region] > .content, [data-section='vertical-nav'] > section > [data-section-content], [data-section='vertical-nav'] > section > .content, [data-section='vertical-nav'] > .section > [data-section-content], [data-section='vertical-nav'] > .section > .content, [data-section='vertical-nav'] > [data-section-region] > [data-section-content], [data-section='vertical-nav'] > [data-section-region] > .content, .section-container.vertical-nav > section > [data-section-content], .section-container.vertical-nav > section > .content, .section-container.vertical-nav > .section > [data-section-content], .section-container.vertical-nav > .section > .content, .section-container.vertical-nav > [data-section-region] > [data-section-content], .section-container.vertical-nav > [data-section-region] > .content, [data-section='horizontal-nav'] > section > [data-section-content], [data-section='horizontal-nav'] > section > .content, [data-section='horizontal-nav'] > .section > [data-section-content], [data-section='horizontal-nav'] > .section > .content, [data-section='horizontal-nav'] > [data-section-region] > [data-section-content], [data-section='horizontal-nav'] > [data-section-region] > .content, .section-container.horizontal-nav > section > [data-section-content], .section-container.horizontal-nav > section > .content, .section-container.horizontal-nav > .section > [data-section-content], .section-container.horizontal-nav > .section > .content, .section-container.horizontal-nav > [data-section-region] > [data-section-content], .section-container.horizontal-nav > [data-section-region] > .content, [data-section='accordion'] > section > [data-section-content], [data-section='accordion'] > section > .content, [data-section='accordion'] > .section > [data-section-content], [data-section='accordion'] > .section > .content, [data-section='accordion'] > [data-section-region] > [data-section-content], [data-section='accordion'] > [data-section-region] > .content, .section-container.accordion > section > [data-section-content], .section-container.accordion > section > .content, .section-container.accordion > .section > [data-section-content], .section-container.accordion > .section > .content, .section-container.accordion > [data-section-region] > [data-section-content], .section-container.accordion > [data-section-region] > .content { + display: none; } +/* line 116, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ +[data-section=''] > section.active > [data-section-content], [data-section=''] > section.active > .content, [data-section=''] > .section.active > [data-section-content], [data-section=''] > .section.active > .content, [data-section=''] > [data-section-region].active > [data-section-content], [data-section=''] > [data-section-region].active > .content, [data-section='auto'] > section.active > [data-section-content], [data-section='auto'] > section.active > .content, [data-section='auto'] > .section.active > [data-section-content], [data-section='auto'] > .section.active > .content, [data-section='auto'] > [data-section-region].active > [data-section-content], [data-section='auto'] > [data-section-region].active > .content, .section-container.auto > section.active > [data-section-content], .section-container.auto > section.active > .content, .section-container.auto > .section.active > [data-section-content], .section-container.auto > .section.active > .content, .section-container.auto > [data-section-region].active > [data-section-content], .section-container.auto > [data-section-region].active > .content, [data-section='vertical-tabs'] > section.active > [data-section-content], [data-section='vertical-tabs'] > section.active > .content, [data-section='vertical-tabs'] > .section.active > [data-section-content], [data-section='vertical-tabs'] > .section.active > .content, [data-section='vertical-tabs'] > [data-section-region].active > [data-section-content], [data-section='vertical-tabs'] > [data-section-region].active > .content, .section-container.vertical-tabs > section.active > [data-section-content], .section-container.vertical-tabs > section.active > .content, .section-container.vertical-tabs > .section.active > [data-section-content], .section-container.vertical-tabs > .section.active > .content, .section-container.vertical-tabs > [data-section-region].active > [data-section-content], .section-container.vertical-tabs > [data-section-region].active > .content, [data-section='vertical-nav'] > section.active > [data-section-content], [data-section='vertical-nav'] > section.active > .content, [data-section='vertical-nav'] > .section.active > [data-section-content], [data-section='vertical-nav'] > .section.active > .content, [data-section='vertical-nav'] > [data-section-region].active > [data-section-content], [data-section='vertical-nav'] > [data-section-region].active > .content, .section-container.vertical-nav > section.active > [data-section-content], .section-container.vertical-nav > section.active > .content, .section-container.vertical-nav > .section.active > [data-section-content], .section-container.vertical-nav > .section.active > .content, .section-container.vertical-nav > [data-section-region].active > [data-section-content], .section-container.vertical-nav > [data-section-region].active > .content, [data-section='horizontal-nav'] > section.active > [data-section-content], [data-section='horizontal-nav'] > section.active > .content, [data-section='horizontal-nav'] > .section.active > [data-section-content], [data-section='horizontal-nav'] > .section.active > .content, [data-section='horizontal-nav'] > [data-section-region].active > [data-section-content], [data-section='horizontal-nav'] > [data-section-region].active > .content, .section-container.horizontal-nav > section.active > [data-section-content], .section-container.horizontal-nav > section.active > .content, .section-container.horizontal-nav > .section.active > [data-section-content], .section-container.horizontal-nav > .section.active > .content, .section-container.horizontal-nav > [data-section-region].active > [data-section-content], .section-container.horizontal-nav > [data-section-region].active > .content, [data-section='accordion'] > section.active > [data-section-content], [data-section='accordion'] > section.active > .content, [data-section='accordion'] > .section.active > [data-section-content], [data-section='accordion'] > .section.active > .content, [data-section='accordion'] > [data-section-region].active > [data-section-content], [data-section='accordion'] > [data-section-region].active > .content, .section-container.accordion > section.active > [data-section-content], .section-container.accordion > section.active > .content, .section-container.accordion > .section.active > [data-section-content], .section-container.accordion > .section.active > .content, .section-container.accordion > [data-section-region].active > [data-section-content], .section-container.accordion > [data-section-region].active > .content { + display: block; } +/* line 119, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ +[data-section=''] > section:not(.active), [data-section=''] > .section:not(.active), [data-section=''] > [data-section-region]:not(.active), [data-section='auto'] > section:not(.active), [data-section='auto'] > .section:not(.active), [data-section='auto'] > [data-section-region]:not(.active), .section-container.auto > section:not(.active), .section-container.auto > .section:not(.active), .section-container.auto > [data-section-region]:not(.active), [data-section='vertical-tabs'] > section:not(.active), [data-section='vertical-tabs'] > .section:not(.active), [data-section='vertical-tabs'] > [data-section-region]:not(.active), .section-container.vertical-tabs > section:not(.active), .section-container.vertical-tabs > .section:not(.active), .section-container.vertical-tabs > [data-section-region]:not(.active), [data-section='vertical-nav'] > section:not(.active), [data-section='vertical-nav'] > .section:not(.active), [data-section='vertical-nav'] > [data-section-region]:not(.active), .section-container.vertical-nav > section:not(.active), .section-container.vertical-nav > .section:not(.active), .section-container.vertical-nav > [data-section-region]:not(.active), [data-section='horizontal-nav'] > section:not(.active), [data-section='horizontal-nav'] > .section:not(.active), [data-section='horizontal-nav'] > [data-section-region]:not(.active), .section-container.horizontal-nav > section:not(.active), .section-container.horizontal-nav > .section:not(.active), .section-container.horizontal-nav > [data-section-region]:not(.active), [data-section='accordion'] > section:not(.active), [data-section='accordion'] > .section:not(.active), [data-section='accordion'] > [data-section-region]:not(.active), .section-container.accordion > section:not(.active), .section-container.accordion > .section:not(.active), .section-container.accordion > [data-section-region]:not(.active) { + padding: 0 !important; } +/* line 126, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ +[data-section=''] > section > [data-section-title], [data-section=''] > section > .title, [data-section=''] > .section > [data-section-title], [data-section=''] > .section > .title, [data-section=''] > [data-section-region] > [data-section-title], [data-section=''] > [data-section-region] > .title, [data-section='auto'] > section > [data-section-title], [data-section='auto'] > section > .title, [data-section='auto'] > .section > [data-section-title], [data-section='auto'] > .section > .title, [data-section='auto'] > [data-section-region] > [data-section-title], [data-section='auto'] > [data-section-region] > .title, .section-container.auto > section > [data-section-title], .section-container.auto > section > .title, .section-container.auto > .section > [data-section-title], .section-container.auto > .section > .title, .section-container.auto > [data-section-region] > [data-section-title], .section-container.auto > [data-section-region] > .title, [data-section='vertical-tabs'] > section > [data-section-title], [data-section='vertical-tabs'] > section > .title, [data-section='vertical-tabs'] > .section > [data-section-title], [data-section='vertical-tabs'] > .section > .title, [data-section='vertical-tabs'] > [data-section-region] > [data-section-title], [data-section='vertical-tabs'] > [data-section-region] > .title, .section-container.vertical-tabs > section > [data-section-title], .section-container.vertical-tabs > section > .title, .section-container.vertical-tabs > .section > [data-section-title], .section-container.vertical-tabs > .section > .title, .section-container.vertical-tabs > [data-section-region] > [data-section-title], .section-container.vertical-tabs > [data-section-region] > .title, [data-section='vertical-nav'] > section > [data-section-title], [data-section='vertical-nav'] > section > .title, [data-section='vertical-nav'] > .section > [data-section-title], [data-section='vertical-nav'] > .section > .title, [data-section='vertical-nav'] > [data-section-region] > [data-section-title], [data-section='vertical-nav'] > [data-section-region] > .title, .section-container.vertical-nav > section > [data-section-title], .section-container.vertical-nav > section > .title, .section-container.vertical-nav > .section > [data-section-title], .section-container.vertical-nav > .section > .title, .section-container.vertical-nav > [data-section-region] > [data-section-title], .section-container.vertical-nav > [data-section-region] > .title, [data-section='horizontal-nav'] > section > [data-section-title], [data-section='horizontal-nav'] > section > .title, [data-section='horizontal-nav'] > .section > [data-section-title], [data-section='horizontal-nav'] > .section > .title, [data-section='horizontal-nav'] > [data-section-region] > [data-section-title], [data-section='horizontal-nav'] > [data-section-region] > .title, .section-container.horizontal-nav > section > [data-section-title], .section-container.horizontal-nav > section > .title, .section-container.horizontal-nav > .section > [data-section-title], .section-container.horizontal-nav > .section > .title, .section-container.horizontal-nav > [data-section-region] > [data-section-title], .section-container.horizontal-nav > [data-section-region] > .title, [data-section='accordion'] > section > [data-section-title], [data-section='accordion'] > section > .title, [data-section='accordion'] > .section > [data-section-title], [data-section='accordion'] > .section > .title, [data-section='accordion'] > [data-section-region] > [data-section-title], [data-section='accordion'] > [data-section-region] > .title, .section-container.accordion > section > [data-section-title], .section-container.accordion > section > .title, .section-container.accordion > .section > [data-section-title], .section-container.accordion > .section > .title, .section-container.accordion > [data-section-region] > [data-section-title], .section-container.accordion > [data-section-region] > .title { + width: 100%; } + +/* line 296, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ +.section-container.auto, .section-container.vertical-tabs, .section-container.vertical-nav, .section-container.horizontal-nav, .section-container.accordion { + border-top: 1px solid #cccccc; } +/* line 207, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ +.section-container.auto > section > .title, .section-container.auto > .section > .title, .section-container.vertical-tabs > section > .title, .section-container.vertical-tabs > .section > .title, .section-container.vertical-nav > section > .title, .section-container.vertical-nav > .section > .title, .section-container.horizontal-nav > section > .title, .section-container.horizontal-nav > .section > .title, .section-container.accordion > section > .title, .section-container.accordion > .section > .title { + background-color: #efefef; + cursor: pointer; + border: solid 1px #cccccc; } +/* line 211, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ +.section-container.auto > section > .title a, .section-container.auto > .section > .title a, .section-container.vertical-tabs > section > .title a, .section-container.vertical-tabs > .section > .title a, .section-container.vertical-nav > section > .title a, .section-container.vertical-nav > .section > .title a, .section-container.horizontal-nav > section > .title a, .section-container.horizontal-nav > .section > .title a, .section-container.accordion > section > .title a, .section-container.accordion > .section > .title a { + padding: 0.9375em; + color: #333333; + font-size: 0.875em; + background: none; } +/* line 217, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ +.section-container.auto > section > .title:hover, .section-container.auto > .section > .title:hover, .section-container.vertical-tabs > section > .title:hover, .section-container.vertical-tabs > .section > .title:hover, .section-container.vertical-nav > section > .title:hover, .section-container.vertical-nav > .section > .title:hover, .section-container.horizontal-nav > section > .title:hover, .section-container.horizontal-nav > .section > .title:hover, .section-container.accordion > section > .title:hover, .section-container.accordion > .section > .title:hover { + background-color: #e2e2e2; } +/* line 220, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ +.section-container.auto > section > .content, .section-container.auto > .section > .content, .section-container.vertical-tabs > section > .content, .section-container.vertical-tabs > .section > .content, .section-container.vertical-nav > section > .content, .section-container.vertical-nav > .section > .content, .section-container.horizontal-nav > section > .content, .section-container.horizontal-nav > .section > .content, .section-container.accordion > section > .content, .section-container.accordion > .section > .content { + padding: 0.9375em; + background-color: white; + border: solid 1px #cccccc; } +/* line 225, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ +.section-container.auto > section > .content > *:last-child, .section-container.auto > .section > .content > *:last-child, .section-container.vertical-tabs > section > .content > *:last-child, .section-container.vertical-tabs > .section > .content > *:last-child, .section-container.vertical-nav > section > .content > *:last-child, .section-container.vertical-nav > .section > .content > *:last-child, .section-container.horizontal-nav > section > .content > *:last-child, .section-container.horizontal-nav > .section > .content > *:last-child, .section-container.accordion > section > .content > *:last-child, .section-container.accordion > .section > .content > *:last-child { + margin-bottom: 0; } +/* line 226, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ +.section-container.auto > section > .content > *:first-child, .section-container.auto > .section > .content > *:first-child, .section-container.vertical-tabs > section > .content > *:first-child, .section-container.vertical-tabs > .section > .content > *:first-child, .section-container.vertical-nav > section > .content > *:first-child, .section-container.vertical-nav > .section > .content > *:first-child, .section-container.horizontal-nav > section > .content > *:first-child, .section-container.horizontal-nav > .section > .content > *:first-child, .section-container.accordion > section > .content > *:first-child, .section-container.accordion > .section > .content > *:first-child { + padding-top: 0; } +/* line 227, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ +.section-container.auto > section > .content > *:last-child:not(.flex-video), .section-container.auto > .section > .content > *:last-child:not(.flex-video), .section-container.vertical-tabs > section > .content > *:last-child:not(.flex-video), .section-container.vertical-tabs > .section > .content > *:last-child:not(.flex-video), .section-container.vertical-nav > section > .content > *:last-child:not(.flex-video), .section-container.vertical-nav > .section > .content > *:last-child:not(.flex-video), .section-container.horizontal-nav > section > .content > *:last-child:not(.flex-video), .section-container.horizontal-nav > .section > .content > *:last-child:not(.flex-video), .section-container.accordion > section > .content > *:last-child:not(.flex-video), .section-container.accordion > .section > .content > *:last-child:not(.flex-video) { + padding-bottom: 0; } +/* line 231, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ +.section-container.auto > section.active > .title, .section-container.auto > .section.active > .title, .section-container.vertical-tabs > section.active > .title, .section-container.vertical-tabs > .section.active > .title, .section-container.vertical-nav > section.active > .title, .section-container.vertical-nav > .section.active > .title, .section-container.horizontal-nav > section.active > .title, .section-container.horizontal-nav > .section.active > .title, .section-container.accordion > section.active > .title, .section-container.accordion > .section.active > .title { + background: #d5d5d5; } +/* line 233, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ +.section-container.auto > section.active > .title a, .section-container.auto > .section.active > .title a, .section-container.vertical-tabs > section.active > .title a, .section-container.vertical-tabs > .section.active > .title a, .section-container.vertical-nav > section.active > .title a, .section-container.vertical-nav > .section.active > .title a, .section-container.horizontal-nav > section.active > .title a, .section-container.horizontal-nav > .section.active > .title a, .section-container.accordion > section.active > .title a, .section-container.accordion > .section.active > .title a { + color: #333333; } +/* line 237, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ +.section-container.auto > section:not(.active), .section-container.auto > .section:not(.active), .section-container.vertical-tabs > section:not(.active), .section-container.vertical-tabs > .section:not(.active), .section-container.vertical-nav > section:not(.active), .section-container.vertical-nav > .section:not(.active), .section-container.horizontal-nav > section:not(.active), .section-container.horizontal-nav > .section:not(.active), .section-container.accordion > section:not(.active), .section-container.accordion > .section:not(.active) { + padding: 0 !important; } +/* line 243, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ +.section-container.auto > section > .title, .section-container.auto > .section > .title, .section-container.vertical-tabs > section > .title, .section-container.vertical-tabs > .section > .title, .section-container.vertical-nav > section > .title, .section-container.vertical-nav > .section > .title, .section-container.horizontal-nav > section > .title, .section-container.horizontal-nav > .section > .title, .section-container.accordion > section > .title, .section-container.accordion > .section > .title { + border-top: none; } + +/* line 303, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ +[data-section='tabs'], .section-container.tabs { + width: 100%; + position: relative; + display: block; + margin-bottom: 1.25em; } +/* line 49, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ +[data-section='tabs']:not([data-section-resized]):not([data-section-small-style]), .section-container.tabs:not([data-section-resized]):not([data-section-small-style]) { + visibility: hidden; } +/* line 102, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ +[data-section='tabs'] > section > [data-section-title], [data-section='tabs'] > section > .title, [data-section='tabs'] > .section > [data-section-title], [data-section='tabs'] > .section > .title, [data-section='tabs'] > [data-section-region] > [data-section-title], [data-section='tabs'] > [data-section-region] > .title, .section-container.tabs > section > [data-section-title], .section-container.tabs > section > .title, .section-container.tabs > .section > [data-section-title], .section-container.tabs > .section > .title, .section-container.tabs > [data-section-region] > [data-section-title], .section-container.tabs > [data-section-region] > .title { + margin-bottom: 0; } +/* line 104, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ +[data-section='tabs'] > section > [data-section-title] a, [data-section='tabs'] > section > .title a, [data-section='tabs'] > .section > [data-section-title] a, [data-section='tabs'] > .section > .title a, [data-section='tabs'] > [data-section-region] > [data-section-title] a, [data-section='tabs'] > [data-section-region] > .title a, .section-container.tabs > section > [data-section-title] a, .section-container.tabs > section > .title a, .section-container.tabs > .section > [data-section-title] a, .section-container.tabs > .section > .title a, .section-container.tabs > [data-section-region] > [data-section-title] a, .section-container.tabs > [data-section-region] > .title a { + width: 100%; + display: inline-block; + white-space: nowrap; } +/* line 111, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ +[data-section='tabs'] > section > [data-section-content], [data-section='tabs'] > section > .content, [data-section='tabs'] > .section > [data-section-content], [data-section='tabs'] > .section > .content, [data-section='tabs'] > [data-section-region] > [data-section-content], [data-section='tabs'] > [data-section-region] > .content, .section-container.tabs > section > [data-section-content], .section-container.tabs > section > .content, .section-container.tabs > .section > [data-section-content], .section-container.tabs > .section > .content, .section-container.tabs > [data-section-region] > [data-section-content], .section-container.tabs > [data-section-region] > .content { + display: none; } +/* line 116, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ +[data-section='tabs'] > section.active > [data-section-content], [data-section='tabs'] > section.active > .content, [data-section='tabs'] > .section.active > [data-section-content], [data-section='tabs'] > .section.active > .content, [data-section='tabs'] > [data-section-region].active > [data-section-content], [data-section='tabs'] > [data-section-region].active > .content, .section-container.tabs > section.active > [data-section-content], .section-container.tabs > section.active > .content, .section-container.tabs > .section.active > [data-section-content], .section-container.tabs > .section.active > .content, .section-container.tabs > [data-section-region].active > [data-section-content], .section-container.tabs > [data-section-region].active > .content { + display: block; } +/* line 119, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ +[data-section='tabs'] > section:not(.active), [data-section='tabs'] > .section:not(.active), [data-section='tabs'] > [data-section-region]:not(.active), .section-container.tabs > section:not(.active), .section-container.tabs > .section:not(.active), .section-container.tabs > [data-section-region]:not(.active) { + padding: 0 !important; } +/* line 132, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ +[data-section='tabs'] > section > [data-section-title], [data-section='tabs'] > section > .title, [data-section='tabs'] > .section > [data-section-title], [data-section='tabs'] > .section > .title, [data-section='tabs'] > [data-section-region] > [data-section-title], [data-section='tabs'] > [data-section-region] > .title, .section-container.tabs > section > [data-section-title], .section-container.tabs > section > .title, .section-container.tabs > .section > [data-section-title], .section-container.tabs > .section > .title, .section-container.tabs > [data-section-region] > [data-section-title], .section-container.tabs > [data-section-region] > .title { + width: auto; + position: absolute; + top: 0; + left: 0; } + +/* line 310, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ +.section-container.tabs { + border: none; } +/* line 207, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ +.section-container.tabs > section > .title, .section-container.tabs > .section > .title { + background-color: #efefef; + cursor: pointer; + border: solid 1px #cccccc; } +/* line 211, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ +.section-container.tabs > section > .title a, .section-container.tabs > .section > .title a { + padding: 0.9375em; + color: #333333; + font-size: 0.875em; + background: none; } +/* line 217, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ +.section-container.tabs > section > .title:hover, .section-container.tabs > .section > .title:hover { + background-color: #e2e2e2; } +/* line 220, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ +.section-container.tabs > section > .content, .section-container.tabs > .section > .content { + padding: 0.9375em; + background-color: white; + border: solid 1px #cccccc; } +/* line 225, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ +.section-container.tabs > section > .content > *:last-child, .section-container.tabs > .section > .content > *:last-child { + margin-bottom: 0; } +/* line 226, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ +.section-container.tabs > section > .content > *:first-child, .section-container.tabs > .section > .content > *:first-child { + padding-top: 0; } +/* line 227, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ +.section-container.tabs > section > .content > *:last-child:not(.flex-video), .section-container.tabs > .section > .content > *:last-child:not(.flex-video) { + padding-bottom: 0; } +/* line 231, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ +.section-container.tabs > section.active > .title, .section-container.tabs > .section.active > .title { + background: white; } +/* line 233, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ +.section-container.tabs > section.active > .title a, .section-container.tabs > .section.active > .title a { + color: #333333; } +/* line 237, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ +.section-container.tabs > section:not(.active), .section-container.tabs > .section:not(.active) { + padding: 0 !important; } +/* line 249, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ +.section-container.tabs > section.active > .title, .section-container.tabs > .section.active > .title { + border-bottom: 0; } + +@media only screen and (min-width: 768px) { + /* line 319, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + [data-section=''], [data-section='auto'], .section-container.auto { + width: 100%; + position: relative; + display: block; + margin-bottom: 1.25em; } + /* line 49, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + [data-section='']:not([data-section-resized]):not([data-section-small-style]), [data-section='auto']:not([data-section-resized]):not([data-section-small-style]), .section-container.auto:not([data-section-resized]):not([data-section-small-style]) { + visibility: hidden; } + /* line 102, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + [data-section=''] > section > [data-section-title], [data-section=''] > section > .title, [data-section=''] > .section > [data-section-title], [data-section=''] > .section > .title, [data-section=''] > [data-section-region] > [data-section-title], [data-section=''] > [data-section-region] > .title, [data-section='auto'] > section > [data-section-title], [data-section='auto'] > section > .title, [data-section='auto'] > .section > [data-section-title], [data-section='auto'] > .section > .title, [data-section='auto'] > [data-section-region] > [data-section-title], [data-section='auto'] > [data-section-region] > .title, .section-container.auto > section > [data-section-title], .section-container.auto > section > .title, .section-container.auto > .section > [data-section-title], .section-container.auto > .section > .title, .section-container.auto > [data-section-region] > [data-section-title], .section-container.auto > [data-section-region] > .title { + margin-bottom: 0; } + /* line 104, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + [data-section=''] > section > [data-section-title] a, [data-section=''] > section > .title a, [data-section=''] > .section > [data-section-title] a, [data-section=''] > .section > .title a, [data-section=''] > [data-section-region] > [data-section-title] a, [data-section=''] > [data-section-region] > .title a, [data-section='auto'] > section > [data-section-title] a, [data-section='auto'] > section > .title a, [data-section='auto'] > .section > [data-section-title] a, [data-section='auto'] > .section > .title a, [data-section='auto'] > [data-section-region] > [data-section-title] a, [data-section='auto'] > [data-section-region] > .title a, .section-container.auto > section > [data-section-title] a, .section-container.auto > section > .title a, .section-container.auto > .section > [data-section-title] a, .section-container.auto > .section > .title a, .section-container.auto > [data-section-region] > [data-section-title] a, .section-container.auto > [data-section-region] > .title a { + width: 100%; + display: inline-block; + white-space: nowrap; } + /* line 111, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + [data-section=''] > section > [data-section-content], [data-section=''] > section > .content, [data-section=''] > .section > [data-section-content], [data-section=''] > .section > .content, [data-section=''] > [data-section-region] > [data-section-content], [data-section=''] > [data-section-region] > .content, [data-section='auto'] > section > [data-section-content], [data-section='auto'] > section > .content, [data-section='auto'] > .section > [data-section-content], [data-section='auto'] > .section > .content, [data-section='auto'] > [data-section-region] > [data-section-content], [data-section='auto'] > [data-section-region] > .content, .section-container.auto > section > [data-section-content], .section-container.auto > section > .content, .section-container.auto > .section > [data-section-content], .section-container.auto > .section > .content, .section-container.auto > [data-section-region] > [data-section-content], .section-container.auto > [data-section-region] > .content { + display: none; } + /* line 116, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + [data-section=''] > section.active > [data-section-content], [data-section=''] > section.active > .content, [data-section=''] > .section.active > [data-section-content], [data-section=''] > .section.active > .content, [data-section=''] > [data-section-region].active > [data-section-content], [data-section=''] > [data-section-region].active > .content, [data-section='auto'] > section.active > [data-section-content], [data-section='auto'] > section.active > .content, [data-section='auto'] > .section.active > [data-section-content], [data-section='auto'] > .section.active > .content, [data-section='auto'] > [data-section-region].active > [data-section-content], [data-section='auto'] > [data-section-region].active > .content, .section-container.auto > section.active > [data-section-content], .section-container.auto > section.active > .content, .section-container.auto > .section.active > [data-section-content], .section-container.auto > .section.active > .content, .section-container.auto > [data-section-region].active > [data-section-content], .section-container.auto > [data-section-region].active > .content { + display: block; } + /* line 119, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + [data-section=''] > section:not(.active), [data-section=''] > .section:not(.active), [data-section=''] > [data-section-region]:not(.active), [data-section='auto'] > section:not(.active), [data-section='auto'] > .section:not(.active), [data-section='auto'] > [data-section-region]:not(.active), .section-container.auto > section:not(.active), .section-container.auto > .section:not(.active), .section-container.auto > [data-section-region]:not(.active) { + padding: 0 !important; } + /* line 132, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + [data-section=''] > section > [data-section-title], [data-section=''] > section > .title, [data-section=''] > .section > [data-section-title], [data-section=''] > .section > .title, [data-section=''] > [data-section-region] > [data-section-title], [data-section=''] > [data-section-region] > .title, [data-section='auto'] > section > [data-section-title], [data-section='auto'] > section > .title, [data-section='auto'] > .section > [data-section-title], [data-section='auto'] > .section > .title, [data-section='auto'] > [data-section-region] > [data-section-title], [data-section='auto'] > [data-section-region] > .title, .section-container.auto > section > [data-section-title], .section-container.auto > section > .title, .section-container.auto > .section > [data-section-title], .section-container.auto > .section > .title, .section-container.auto > [data-section-region] > [data-section-title], .section-container.auto > [data-section-region] > .title { + width: auto; + position: absolute; + top: 0; + left: 0; } + + /* line 326, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + .section-container.auto { + border: none; } + /* line 207, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + .section-container.auto > section > .title, .section-container.auto > .section > .title { + background-color: #efefef; + cursor: pointer; + border: solid 1px #cccccc; } + /* line 211, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + .section-container.auto > section > .title a, .section-container.auto > .section > .title a { + padding: 0.9375em; + color: #333333; + font-size: 0.875em; + background: none; } + /* line 217, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + .section-container.auto > section > .title:hover, .section-container.auto > .section > .title:hover { + background-color: #e2e2e2; } + /* line 220, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + .section-container.auto > section > .content, .section-container.auto > .section > .content { + padding: 0.9375em; + background-color: white; + border: solid 1px #cccccc; } + /* line 225, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + .section-container.auto > section > .content > *:last-child, .section-container.auto > .section > .content > *:last-child { + margin-bottom: 0; } + /* line 226, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + .section-container.auto > section > .content > *:first-child, .section-container.auto > .section > .content > *:first-child { + padding-top: 0; } + /* line 227, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + .section-container.auto > section > .content > *:last-child:not(.flex-video), .section-container.auto > .section > .content > *:last-child:not(.flex-video) { + padding-bottom: 0; } + /* line 231, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + .section-container.auto > section.active > .title, .section-container.auto > .section.active > .title { + background: white; } + /* line 233, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + .section-container.auto > section.active > .title a, .section-container.auto > .section.active > .title a { + color: #333333; } + /* line 237, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + .section-container.auto > section:not(.active), .section-container.auto > .section:not(.active) { + padding: 0 !important; } + /* line 249, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + .section-container.auto > section.active > .title, .section-container.auto > .section.active > .title { + border-bottom: 0; } + + /* line 333, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + [data-section='vertical-tabs'], .section-container.vertical-tabs { + width: 100%; + position: relative; + display: block; + margin-bottom: 1.25em; } + /* line 49, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + [data-section='vertical-tabs']:not([data-section-resized]):not([data-section-small-style]), .section-container.vertical-tabs:not([data-section-resized]):not([data-section-small-style]) { + visibility: hidden; } + /* line 55, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + [data-section='vertical-tabs'][data-section-small-style], .section-container.vertical-tabs[data-section-small-style] { + width: 100% !important; } + /* line 58, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + [data-section='vertical-tabs'][data-section-small-style] > [data-section-region], [data-section='vertical-tabs'][data-section-small-style] > section, [data-section='vertical-tabs'][data-section-small-style] > .section, .section-container.vertical-tabs[data-section-small-style] > [data-section-region], .section-container.vertical-tabs[data-section-small-style] > section, .section-container.vertical-tabs[data-section-small-style] > .section { + padding: 0 !important; + margin: 0 !important; } + /* line 61, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + [data-section='vertical-tabs'][data-section-small-style] > [data-section-region] > [data-section-title], [data-section='vertical-tabs'][data-section-small-style] > [data-section-region] > .title, [data-section='vertical-tabs'][data-section-small-style] > section > [data-section-title], [data-section='vertical-tabs'][data-section-small-style] > section > .title, [data-section='vertical-tabs'][data-section-small-style] > .section > [data-section-title], [data-section='vertical-tabs'][data-section-small-style] > .section > .title, .section-container.vertical-tabs[data-section-small-style] > [data-section-region] > [data-section-title], .section-container.vertical-tabs[data-section-small-style] > [data-section-region] > .title, .section-container.vertical-tabs[data-section-small-style] > section > [data-section-title], .section-container.vertical-tabs[data-section-small-style] > section > .title, .section-container.vertical-tabs[data-section-small-style] > .section > [data-section-title], .section-container.vertical-tabs[data-section-small-style] > .section > .title { + width: 100% !important; } + /* line 102, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + [data-section='vertical-tabs'] > section > [data-section-title], [data-section='vertical-tabs'] > section > .title, [data-section='vertical-tabs'] > .section > [data-section-title], [data-section='vertical-tabs'] > .section > .title, [data-section='vertical-tabs'] > [data-section-region] > [data-section-title], [data-section='vertical-tabs'] > [data-section-region] > .title, .section-container.vertical-tabs > section > [data-section-title], .section-container.vertical-tabs > section > .title, .section-container.vertical-tabs > .section > [data-section-title], .section-container.vertical-tabs > .section > .title, .section-container.vertical-tabs > [data-section-region] > [data-section-title], .section-container.vertical-tabs > [data-section-region] > .title { + margin-bottom: 0; } + /* line 104, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + [data-section='vertical-tabs'] > section > [data-section-title] a, [data-section='vertical-tabs'] > section > .title a, [data-section='vertical-tabs'] > .section > [data-section-title] a, [data-section='vertical-tabs'] > .section > .title a, [data-section='vertical-tabs'] > [data-section-region] > [data-section-title] a, [data-section='vertical-tabs'] > [data-section-region] > .title a, .section-container.vertical-tabs > section > [data-section-title] a, .section-container.vertical-tabs > section > .title a, .section-container.vertical-tabs > .section > [data-section-title] a, .section-container.vertical-tabs > .section > .title a, .section-container.vertical-tabs > [data-section-region] > [data-section-title] a, .section-container.vertical-tabs > [data-section-region] > .title a { + width: 100%; + display: inline-block; + white-space: nowrap; } + /* line 111, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + [data-section='vertical-tabs'] > section > [data-section-content], [data-section='vertical-tabs'] > section > .content, [data-section='vertical-tabs'] > .section > [data-section-content], [data-section='vertical-tabs'] > .section > .content, [data-section='vertical-tabs'] > [data-section-region] > [data-section-content], [data-section='vertical-tabs'] > [data-section-region] > .content, .section-container.vertical-tabs > section > [data-section-content], .section-container.vertical-tabs > section > .content, .section-container.vertical-tabs > .section > [data-section-content], .section-container.vertical-tabs > .section > .content, .section-container.vertical-tabs > [data-section-region] > [data-section-content], .section-container.vertical-tabs > [data-section-region] > .content { + display: none; } + /* line 116, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + [data-section='vertical-tabs'] > section.active > [data-section-content], [data-section='vertical-tabs'] > section.active > .content, [data-section='vertical-tabs'] > .section.active > [data-section-content], [data-section='vertical-tabs'] > .section.active > .content, [data-section='vertical-tabs'] > [data-section-region].active > [data-section-content], [data-section='vertical-tabs'] > [data-section-region].active > .content, .section-container.vertical-tabs > section.active > [data-section-content], .section-container.vertical-tabs > section.active > .content, .section-container.vertical-tabs > .section.active > [data-section-content], .section-container.vertical-tabs > .section.active > .content, .section-container.vertical-tabs > [data-section-region].active > [data-section-content], .section-container.vertical-tabs > [data-section-region].active > .content { + display: block; } + /* line 119, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + [data-section='vertical-tabs'] > section:not(.active), [data-section='vertical-tabs'] > .section:not(.active), [data-section='vertical-tabs'] > [data-section-region]:not(.active), .section-container.vertical-tabs > section:not(.active), .section-container.vertical-tabs > .section:not(.active), .section-container.vertical-tabs > [data-section-region]:not(.active) { + padding: 0 !important; } + /* line 143, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + [data-section='vertical-tabs'] > section > [data-section-title], [data-section='vertical-tabs'] > section > .title, [data-section='vertical-tabs'] > .section > [data-section-title], [data-section='vertical-tabs'] > .section > .title, [data-section='vertical-tabs'] > [data-section-region] > [data-section-title], [data-section='vertical-tabs'] > [data-section-region] > .title, .section-container.vertical-tabs > section > [data-section-title], .section-container.vertical-tabs > section > .title, .section-container.vertical-tabs > .section > [data-section-title], .section-container.vertical-tabs > .section > .title, .section-container.vertical-tabs > [data-section-region] > [data-section-title], .section-container.vertical-tabs > [data-section-region] > .title { + position: absolute; + top: 0; + left: 0; + width: 12.5em; } + /* line 150, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + [data-section='vertical-tabs'] > section.active, [data-section='vertical-tabs'] > .section.active, [data-section='vertical-tabs'] > [data-section-region].active, .section-container.vertical-tabs > section.active, .section-container.vertical-tabs > .section.active, .section-container.vertical-tabs > [data-section-region].active { + padding-left: 12.5em; } + /* line 153, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + [data-section='vertical-tabs'] > section.active > [data-section-title], [data-section='vertical-tabs'] > section.active > .title, [data-section='vertical-tabs'] > .section.active > [data-section-title], [data-section='vertical-tabs'] > .section.active > .title, [data-section='vertical-tabs'] > [data-section-region].active > [data-section-title], [data-section='vertical-tabs'] > [data-section-region].active > .title, .section-container.vertical-tabs > section.active > [data-section-title], .section-container.vertical-tabs > section.active > .title, .section-container.vertical-tabs > .section.active > [data-section-title], .section-container.vertical-tabs > .section.active > .title, .section-container.vertical-tabs > [data-section-region].active > [data-section-title], .section-container.vertical-tabs > [data-section-region].active > .title { + width: 12.5em; } + + /* line 340, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + .section-container.vertical-tabs { + border: none; } + /* line 207, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + .section-container.vertical-tabs > section > .title, .section-container.vertical-tabs > .section > .title { + background-color: #efefef; + cursor: pointer; + border: solid 1px #cccccc; } + /* line 211, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + .section-container.vertical-tabs > section > .title a, .section-container.vertical-tabs > .section > .title a { + padding: 0.9375em; + color: #333333; + font-size: 0.875em; + background: none; } + /* line 217, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + .section-container.vertical-tabs > section > .title:hover, .section-container.vertical-tabs > .section > .title:hover { + background-color: #e2e2e2; } + /* line 220, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + .section-container.vertical-tabs > section > .content, .section-container.vertical-tabs > .section > .content { + padding: 0.9375em; + background-color: white; + border: solid 1px #cccccc; } + /* line 225, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + .section-container.vertical-tabs > section > .content > *:last-child, .section-container.vertical-tabs > .section > .content > *:last-child { + margin-bottom: 0; } + /* line 226, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + .section-container.vertical-tabs > section > .content > *:first-child, .section-container.vertical-tabs > .section > .content > *:first-child { + padding-top: 0; } + /* line 227, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + .section-container.vertical-tabs > section > .content > *:last-child:not(.flex-video), .section-container.vertical-tabs > .section > .content > *:last-child:not(.flex-video) { + padding-bottom: 0; } + /* line 231, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + .section-container.vertical-tabs > section.active > .title, .section-container.vertical-tabs > .section.active > .title { + background: #d5d5d5; } + /* line 233, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + .section-container.vertical-tabs > section.active > .title a, .section-container.vertical-tabs > .section.active > .title a { + color: #333333; } + /* line 237, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + .section-container.vertical-tabs > section:not(.active), .section-container.vertical-tabs > .section:not(.active) { + padding: 0 !important; } + /* line 257, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + .section-container.vertical-tabs > section.active, .section-container.vertical-tabs > .section.active { + padding-left: 12.4375em; } + /* line 260, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + .section-container.vertical-tabs > section.active > .title, .section-container.vertical-tabs > .section.active > .title { + background-color: #d5d5d5; } + + /* line 347, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + [data-section='vertical-nav'], .section-container.vertical-nav { + width: 100%; + position: relative; + display: block; + margin-bottom: 1.25em; } + /* line 49, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + [data-section='vertical-nav']:not([data-section-resized]):not([data-section-small-style]), .section-container.vertical-nav:not([data-section-resized]):not([data-section-small-style]) { + visibility: hidden; } + /* line 55, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + [data-section='vertical-nav'][data-section-small-style], .section-container.vertical-nav[data-section-small-style] { + width: 100% !important; } + /* line 58, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + [data-section='vertical-nav'][data-section-small-style] > [data-section-region], [data-section='vertical-nav'][data-section-small-style] > section, [data-section='vertical-nav'][data-section-small-style] > .section, .section-container.vertical-nav[data-section-small-style] > [data-section-region], .section-container.vertical-nav[data-section-small-style] > section, .section-container.vertical-nav[data-section-small-style] > .section { + padding: 0 !important; + margin: 0 !important; } + /* line 61, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + [data-section='vertical-nav'][data-section-small-style] > [data-section-region] > [data-section-title], [data-section='vertical-nav'][data-section-small-style] > [data-section-region] > .title, [data-section='vertical-nav'][data-section-small-style] > section > [data-section-title], [data-section='vertical-nav'][data-section-small-style] > section > .title, [data-section='vertical-nav'][data-section-small-style] > .section > [data-section-title], [data-section='vertical-nav'][data-section-small-style] > .section > .title, .section-container.vertical-nav[data-section-small-style] > [data-section-region] > [data-section-title], .section-container.vertical-nav[data-section-small-style] > [data-section-region] > .title, .section-container.vertical-nav[data-section-small-style] > section > [data-section-title], .section-container.vertical-nav[data-section-small-style] > section > .title, .section-container.vertical-nav[data-section-small-style] > .section > [data-section-title], .section-container.vertical-nav[data-section-small-style] > .section > .title { + width: 100% !important; } + /* line 349, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + [data-section='vertical-nav'] > section, [data-section='vertical-nav'] > .section, [data-section='vertical-nav'] > [data-section-region], .section-container.vertical-nav > section, .section-container.vertical-nav > .section, .section-container.vertical-nav > [data-section-region] { + position: relative; + display: inline-block; } + /* line 102, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + [data-section='vertical-nav'] > section > [data-section-title], [data-section='vertical-nav'] > section > .title, [data-section='vertical-nav'] > .section > [data-section-title], [data-section='vertical-nav'] > .section > .title, [data-section='vertical-nav'] > [data-section-region] > [data-section-title], [data-section='vertical-nav'] > [data-section-region] > .title, .section-container.vertical-nav > section > [data-section-title], .section-container.vertical-nav > section > .title, .section-container.vertical-nav > .section > [data-section-title], .section-container.vertical-nav > .section > .title, .section-container.vertical-nav > [data-section-region] > [data-section-title], .section-container.vertical-nav > [data-section-region] > .title { + margin-bottom: 0; } + /* line 104, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + [data-section='vertical-nav'] > section > [data-section-title] a, [data-section='vertical-nav'] > section > .title a, [data-section='vertical-nav'] > .section > [data-section-title] a, [data-section='vertical-nav'] > .section > .title a, [data-section='vertical-nav'] > [data-section-region] > [data-section-title] a, [data-section='vertical-nav'] > [data-section-region] > .title a, .section-container.vertical-nav > section > [data-section-title] a, .section-container.vertical-nav > section > .title a, .section-container.vertical-nav > .section > [data-section-title] a, .section-container.vertical-nav > .section > .title a, .section-container.vertical-nav > [data-section-region] > [data-section-title] a, .section-container.vertical-nav > [data-section-region] > .title a { + width: 100%; + display: inline-block; + white-space: nowrap; } + /* line 111, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + [data-section='vertical-nav'] > section > [data-section-content], [data-section='vertical-nav'] > section > .content, [data-section='vertical-nav'] > .section > [data-section-content], [data-section='vertical-nav'] > .section > .content, [data-section='vertical-nav'] > [data-section-region] > [data-section-content], [data-section='vertical-nav'] > [data-section-region] > .content, .section-container.vertical-nav > section > [data-section-content], .section-container.vertical-nav > section > .content, .section-container.vertical-nav > .section > [data-section-content], .section-container.vertical-nav > .section > .content, .section-container.vertical-nav > [data-section-region] > [data-section-content], .section-container.vertical-nav > [data-section-region] > .content { + display: none; } + /* line 116, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + [data-section='vertical-nav'] > section.active > [data-section-content], [data-section='vertical-nav'] > section.active > .content, [data-section='vertical-nav'] > .section.active > [data-section-content], [data-section='vertical-nav'] > .section.active > .content, [data-section='vertical-nav'] > [data-section-region].active > [data-section-content], [data-section='vertical-nav'] > [data-section-region].active > .content, .section-container.vertical-nav > section.active > [data-section-content], .section-container.vertical-nav > section.active > .content, .section-container.vertical-nav > .section.active > [data-section-content], .section-container.vertical-nav > .section.active > .content, .section-container.vertical-nav > [data-section-region].active > [data-section-content], .section-container.vertical-nav > [data-section-region].active > .content { + display: block; } + /* line 119, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + [data-section='vertical-nav'] > section:not(.active), [data-section='vertical-nav'] > .section:not(.active), [data-section='vertical-nav'] > [data-section-region]:not(.active), .section-container.vertical-nav > section:not(.active), .section-container.vertical-nav > .section:not(.active), .section-container.vertical-nav > [data-section-region]:not(.active) { + padding: 0 !important; } + /* line 165, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + [data-section='vertical-nav'] > section > [data-section-title], [data-section='vertical-nav'] > section > .title, [data-section='vertical-nav'] > .section > [data-section-title], [data-section='vertical-nav'] > .section > .title, [data-section='vertical-nav'] > [data-section-region] > [data-section-title], [data-section='vertical-nav'] > [data-section-region] > .title, .section-container.vertical-nav > section > [data-section-title], .section-container.vertical-nav > section > .title, .section-container.vertical-nav > .section > [data-section-title], .section-container.vertical-nav > .section > .title, .section-container.vertical-nav > [data-section-region] > [data-section-title], .section-container.vertical-nav > [data-section-region] > .title { + position: static; + width: auto; } + /* line 168, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + [data-section='vertical-nav'] > section > [data-section-title] a, [data-section='vertical-nav'] > section > .title a, [data-section='vertical-nav'] > .section > [data-section-title] a, [data-section='vertical-nav'] > .section > .title a, [data-section='vertical-nav'] > [data-section-region] > [data-section-title] a, [data-section='vertical-nav'] > [data-section-region] > .title a, .section-container.vertical-nav > section > [data-section-title] a, .section-container.vertical-nav > section > .title a, .section-container.vertical-nav > .section > [data-section-title] a, .section-container.vertical-nav > .section > .title a, .section-container.vertical-nav > [data-section-region] > [data-section-title] a, .section-container.vertical-nav > [data-section-region] > .title a { + display: block; } + /* line 171, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + [data-section='vertical-nav'] > section > [data-section-content], [data-section='vertical-nav'] > section > .content, [data-section='vertical-nav'] > .section > [data-section-content], [data-section='vertical-nav'] > .section > .content, [data-section='vertical-nav'] > [data-section-region] > [data-section-content], [data-section='vertical-nav'] > [data-section-region] > .content, .section-container.vertical-nav > section > [data-section-content], .section-container.vertical-nav > section > .content, .section-container.vertical-nav > .section > [data-section-content], .section-container.vertical-nav > .section > .content, .section-container.vertical-nav > [data-section-region] > [data-section-content], .section-container.vertical-nav > [data-section-region] > .content { + position: absolute; + top: 0; + left: 0; + z-index: 999; + min-width: 12.5em; } + + /* line 354, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + .section-container.vertical-nav { + border: none; } + /* line 207, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + .section-container.vertical-nav > section > .title, .section-container.vertical-nav > .section > .title { + background-color: #efefef; + cursor: pointer; + border: solid 1px #cccccc; } + /* line 211, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + .section-container.vertical-nav > section > .title a, .section-container.vertical-nav > .section > .title a { + padding: 0.9375em; + color: #333333; + font-size: 0.875em; + background: none; } + /* line 217, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + .section-container.vertical-nav > section > .title:hover, .section-container.vertical-nav > .section > .title:hover { + background-color: #e2e2e2; } + /* line 220, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + .section-container.vertical-nav > section > .content, .section-container.vertical-nav > .section > .content { + padding: 0.9375em; + background-color: white; + border: solid 1px #cccccc; } + /* line 225, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + .section-container.vertical-nav > section > .content > *:last-child, .section-container.vertical-nav > .section > .content > *:last-child { + margin-bottom: 0; } + /* line 226, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + .section-container.vertical-nav > section > .content > *:first-child, .section-container.vertical-nav > .section > .content > *:first-child { + padding-top: 0; } + /* line 227, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + .section-container.vertical-nav > section > .content > *:last-child:not(.flex-video), .section-container.vertical-nav > .section > .content > *:last-child:not(.flex-video) { + padding-bottom: 0; } + /* line 231, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + .section-container.vertical-nav > section.active > .title, .section-container.vertical-nav > .section.active > .title { + background: #d5d5d5; } + /* line 233, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + .section-container.vertical-nav > section.active > .title a, .section-container.vertical-nav > .section.active > .title a { + color: #333333; } + /* line 237, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + .section-container.vertical-nav > section:not(.active), .section-container.vertical-nav > .section:not(.active) { + padding: 0 !important; } + + /* line 361, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + [data-section='horizontal-nav'], .section-container.horizontal-nav { + width: 100%; + position: relative; + display: block; + margin-bottom: 1.25em; } + /* line 49, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + [data-section='horizontal-nav']:not([data-section-resized]):not([data-section-small-style]), .section-container.horizontal-nav:not([data-section-resized]):not([data-section-small-style]) { + visibility: hidden; } + /* line 55, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + [data-section='horizontal-nav'][data-section-small-style], .section-container.horizontal-nav[data-section-small-style] { + width: 100% !important; } + /* line 58, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + [data-section='horizontal-nav'][data-section-small-style] > [data-section-region], [data-section='horizontal-nav'][data-section-small-style] > section, [data-section='horizontal-nav'][data-section-small-style] > .section, .section-container.horizontal-nav[data-section-small-style] > [data-section-region], .section-container.horizontal-nav[data-section-small-style] > section, .section-container.horizontal-nav[data-section-small-style] > .section { + padding: 0 !important; + margin: 0 !important; } + /* line 61, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + [data-section='horizontal-nav'][data-section-small-style] > [data-section-region] > [data-section-title], [data-section='horizontal-nav'][data-section-small-style] > [data-section-region] > .title, [data-section='horizontal-nav'][data-section-small-style] > section > [data-section-title], [data-section='horizontal-nav'][data-section-small-style] > section > .title, [data-section='horizontal-nav'][data-section-small-style] > .section > [data-section-title], [data-section='horizontal-nav'][data-section-small-style] > .section > .title, .section-container.horizontal-nav[data-section-small-style] > [data-section-region] > [data-section-title], .section-container.horizontal-nav[data-section-small-style] > [data-section-region] > .title, .section-container.horizontal-nav[data-section-small-style] > section > [data-section-title], .section-container.horizontal-nav[data-section-small-style] > section > .title, .section-container.horizontal-nav[data-section-small-style] > .section > [data-section-title], .section-container.horizontal-nav[data-section-small-style] > .section > .title { + width: 100% !important; } + /* line 363, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + [data-section='horizontal-nav'] > section, [data-section='horizontal-nav'] > .section, [data-section='horizontal-nav'] > [data-section-region], .section-container.horizontal-nav > section, .section-container.horizontal-nav > .section, .section-container.horizontal-nav > [data-section-region] { + position: relative; + float: left; } + /* line 102, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + [data-section='horizontal-nav'] > section > [data-section-title], [data-section='horizontal-nav'] > section > .title, [data-section='horizontal-nav'] > .section > [data-section-title], [data-section='horizontal-nav'] > .section > .title, [data-section='horizontal-nav'] > [data-section-region] > [data-section-title], [data-section='horizontal-nav'] > [data-section-region] > .title, .section-container.horizontal-nav > section > [data-section-title], .section-container.horizontal-nav > section > .title, .section-container.horizontal-nav > .section > [data-section-title], .section-container.horizontal-nav > .section > .title, .section-container.horizontal-nav > [data-section-region] > [data-section-title], .section-container.horizontal-nav > [data-section-region] > .title { + margin-bottom: 0; } + /* line 104, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + [data-section='horizontal-nav'] > section > [data-section-title] a, [data-section='horizontal-nav'] > section > .title a, [data-section='horizontal-nav'] > .section > [data-section-title] a, [data-section='horizontal-nav'] > .section > .title a, [data-section='horizontal-nav'] > [data-section-region] > [data-section-title] a, [data-section='horizontal-nav'] > [data-section-region] > .title a, .section-container.horizontal-nav > section > [data-section-title] a, .section-container.horizontal-nav > section > .title a, .section-container.horizontal-nav > .section > [data-section-title] a, .section-container.horizontal-nav > .section > .title a, .section-container.horizontal-nav > [data-section-region] > [data-section-title] a, .section-container.horizontal-nav > [data-section-region] > .title a { + width: 100%; + display: inline-block; + white-space: nowrap; } + /* line 111, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + [data-section='horizontal-nav'] > section > [data-section-content], [data-section='horizontal-nav'] > section > .content, [data-section='horizontal-nav'] > .section > [data-section-content], [data-section='horizontal-nav'] > .section > .content, [data-section='horizontal-nav'] > [data-section-region] > [data-section-content], [data-section='horizontal-nav'] > [data-section-region] > .content, .section-container.horizontal-nav > section > [data-section-content], .section-container.horizontal-nav > section > .content, .section-container.horizontal-nav > .section > [data-section-content], .section-container.horizontal-nav > .section > .content, .section-container.horizontal-nav > [data-section-region] > [data-section-content], .section-container.horizontal-nav > [data-section-region] > .content { + display: none; } + /* line 116, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + [data-section='horizontal-nav'] > section.active > [data-section-content], [data-section='horizontal-nav'] > section.active > .content, [data-section='horizontal-nav'] > .section.active > [data-section-content], [data-section='horizontal-nav'] > .section.active > .content, [data-section='horizontal-nav'] > [data-section-region].active > [data-section-content], [data-section='horizontal-nav'] > [data-section-region].active > .content, .section-container.horizontal-nav > section.active > [data-section-content], .section-container.horizontal-nav > section.active > .content, .section-container.horizontal-nav > .section.active > [data-section-content], .section-container.horizontal-nav > .section.active > .content, .section-container.horizontal-nav > [data-section-region].active > [data-section-content], .section-container.horizontal-nav > [data-section-region].active > .content { + display: block; } + /* line 119, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + [data-section='horizontal-nav'] > section:not(.active), [data-section='horizontal-nav'] > .section:not(.active), [data-section='horizontal-nav'] > [data-section-region]:not(.active), .section-container.horizontal-nav > section:not(.active), .section-container.horizontal-nav > .section:not(.active), .section-container.horizontal-nav > [data-section-region]:not(.active) { + padding: 0 !important; } + /* line 186, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + [data-section='horizontal-nav'] > section > [data-section-title], [data-section='horizontal-nav'] > section > .title, [data-section='horizontal-nav'] > .section > [data-section-title], [data-section='horizontal-nav'] > .section > .title, [data-section='horizontal-nav'] > [data-section-region] > [data-section-title], [data-section='horizontal-nav'] > [data-section-region] > .title, .section-container.horizontal-nav > section > [data-section-title], .section-container.horizontal-nav > section > .title, .section-container.horizontal-nav > .section > [data-section-title], .section-container.horizontal-nav > .section > .title, .section-container.horizontal-nav > [data-section-region] > [data-section-title], .section-container.horizontal-nav > [data-section-region] > .title { + position: static; + width: auto; } + /* line 189, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + [data-section='horizontal-nav'] > section > [data-section-title] a, [data-section='horizontal-nav'] > section > .title a, [data-section='horizontal-nav'] > .section > [data-section-title] a, [data-section='horizontal-nav'] > .section > .title a, [data-section='horizontal-nav'] > [data-section-region] > [data-section-title] a, [data-section='horizontal-nav'] > [data-section-region] > .title a, .section-container.horizontal-nav > section > [data-section-title] a, .section-container.horizontal-nav > section > .title a, .section-container.horizontal-nav > .section > [data-section-title] a, .section-container.horizontal-nav > .section > .title a, .section-container.horizontal-nav > [data-section-region] > [data-section-title] a, .section-container.horizontal-nav > [data-section-region] > .title a { + display: block; } + /* line 192, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + [data-section='horizontal-nav'] > section > [data-section-content], [data-section='horizontal-nav'] > section > .content, [data-section='horizontal-nav'] > .section > [data-section-content], [data-section='horizontal-nav'] > .section > .content, [data-section='horizontal-nav'] > [data-section-region] > [data-section-content], [data-section='horizontal-nav'] > [data-section-region] > .content, .section-container.horizontal-nav > section > [data-section-content], .section-container.horizontal-nav > section > .content, .section-container.horizontal-nav > .section > [data-section-content], .section-container.horizontal-nav > .section > .content, .section-container.horizontal-nav > [data-section-region] > [data-section-content], .section-container.horizontal-nav > [data-section-region] > .content { + width: auto; + position: absolute; + top: 0; + left: 0; + z-index: 999; + min-width: 12.5em; } + + /* line 368, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + .section-container.horizontal-nav { + background: #efefef; + border: 1px solid #cccccc; } + /* line 207, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + .section-container.horizontal-nav > section > .title, .section-container.horizontal-nav > .section > .title { + background-color: #efefef; + cursor: pointer; + border: solid 1px #cccccc; } + /* line 211, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + .section-container.horizontal-nav > section > .title a, .section-container.horizontal-nav > .section > .title a { + padding: 0.9375em; + color: #333333; + font-size: 0.875em; + background: none; } + /* line 217, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + .section-container.horizontal-nav > section > .title:hover, .section-container.horizontal-nav > .section > .title:hover { + background-color: #e2e2e2; } + /* line 220, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + .section-container.horizontal-nav > section > .content, .section-container.horizontal-nav > .section > .content { + padding: 0.9375em; + background-color: white; + border: solid 1px #cccccc; } + /* line 225, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + .section-container.horizontal-nav > section > .content > *:last-child, .section-container.horizontal-nav > .section > .content > *:last-child { + margin-bottom: 0; } + /* line 226, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + .section-container.horizontal-nav > section > .content > *:first-child, .section-container.horizontal-nav > .section > .content > *:first-child { + padding-top: 0; } + /* line 227, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + .section-container.horizontal-nav > section > .content > *:last-child:not(.flex-video), .section-container.horizontal-nav > .section > .content > *:last-child:not(.flex-video) { + padding-bottom: 0; } + /* line 231, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + .section-container.horizontal-nav > section.active > .title, .section-container.horizontal-nav > .section.active > .title { + background: #d5d5d5; } + /* line 233, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + .section-container.horizontal-nav > section.active > .title a, .section-container.horizontal-nav > .section.active > .title a { + color: #333333; } + /* line 237, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ + .section-container.horizontal-nav > section:not(.active), .section-container.horizontal-nav > .section:not(.active) { + padding: 0 !important; } } +/* line 378, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ +.no-js [data-section], .no-js .section-container { + width: 100%; + position: relative; + display: block; + margin-bottom: 1.25em; } +/* line 55, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ +.no-js [data-section][data-section-small-style], .no-js .section-container[data-section-small-style] { + width: 100% !important; } +/* line 58, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ +.no-js [data-section][data-section-small-style] > [data-section-region], .no-js [data-section][data-section-small-style] > section, .no-js [data-section][data-section-small-style] > .section, .no-js .section-container[data-section-small-style] > [data-section-region], .no-js .section-container[data-section-small-style] > section, .no-js .section-container[data-section-small-style] > .section { + padding: 0 !important; + margin: 0 !important; } +/* line 61, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ +.no-js [data-section][data-section-small-style] > [data-section-region] > [data-section-title], .no-js [data-section][data-section-small-style] > [data-section-region] > .title, .no-js [data-section][data-section-small-style] > section > [data-section-title], .no-js [data-section][data-section-small-style] > section > .title, .no-js [data-section][data-section-small-style] > .section > [data-section-title], .no-js [data-section][data-section-small-style] > .section > .title, .no-js .section-container[data-section-small-style] > [data-section-region] > [data-section-title], .no-js .section-container[data-section-small-style] > [data-section-region] > .title, .no-js .section-container[data-section-small-style] > section > [data-section-title], .no-js .section-container[data-section-small-style] > section > .title, .no-js .section-container[data-section-small-style] > .section > [data-section-title], .no-js .section-container[data-section-small-style] > .section > .title { + width: 100% !important; } +/* line 380, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ +.no-js [data-section] > section, .no-js [data-section] > .section, .no-js [data-section] > [data-section-region], .no-js .section-container > section, .no-js .section-container > .section, .no-js .section-container > [data-section-region] { + margin: 0; } +/* line 102, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ +.no-js [data-section] > section > [data-section-title], .no-js [data-section] > section > .title, .no-js [data-section] > .section > [data-section-title], .no-js [data-section] > .section > .title, .no-js [data-section] > [data-section-region] > [data-section-title], .no-js [data-section] > [data-section-region] > .title, .no-js .section-container > section > [data-section-title], .no-js .section-container > section > .title, .no-js .section-container > .section > [data-section-title], .no-js .section-container > .section > .title, .no-js .section-container > [data-section-region] > [data-section-title], .no-js .section-container > [data-section-region] > .title { + margin-bottom: 0; } +/* line 104, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ +.no-js [data-section] > section > [data-section-title] a, .no-js [data-section] > section > .title a, .no-js [data-section] > .section > [data-section-title] a, .no-js [data-section] > .section > .title a, .no-js [data-section] > [data-section-region] > [data-section-title] a, .no-js [data-section] > [data-section-region] > .title a, .no-js .section-container > section > [data-section-title] a, .no-js .section-container > section > .title a, .no-js .section-container > .section > [data-section-title] a, .no-js .section-container > .section > .title a, .no-js .section-container > [data-section-region] > [data-section-title] a, .no-js .section-container > [data-section-region] > .title a { + width: 100%; + display: inline-block; + white-space: nowrap; } +/* line 111, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ +.no-js [data-section] > section > [data-section-content], .no-js [data-section] > section > .content, .no-js [data-section] > .section > [data-section-content], .no-js [data-section] > .section > .content, .no-js [data-section] > [data-section-region] > [data-section-content], .no-js [data-section] > [data-section-region] > .content, .no-js .section-container > section > [data-section-content], .no-js .section-container > section > .content, .no-js .section-container > .section > [data-section-content], .no-js .section-container > .section > .content, .no-js .section-container > [data-section-region] > [data-section-content], .no-js .section-container > [data-section-region] > .content { + display: none; } +/* line 116, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ +.no-js [data-section] > section.active > [data-section-content], .no-js [data-section] > section.active > .content, .no-js [data-section] > .section.active > [data-section-content], .no-js [data-section] > .section.active > .content, .no-js [data-section] > [data-section-region].active > [data-section-content], .no-js [data-section] > [data-section-region].active > .content, .no-js .section-container > section.active > [data-section-content], .no-js .section-container > section.active > .content, .no-js .section-container > .section.active > [data-section-content], .no-js .section-container > .section.active > .content, .no-js .section-container > [data-section-region].active > [data-section-content], .no-js .section-container > [data-section-region].active > .content { + display: block; } +/* line 119, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ +.no-js [data-section] > section:not(.active), .no-js [data-section] > .section:not(.active), .no-js [data-section] > [data-section-region]:not(.active), .no-js .section-container > section:not(.active), .no-js .section-container > .section:not(.active), .no-js .section-container > [data-section-region]:not(.active) { + padding: 0 !important; } +/* line 126, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ +.no-js [data-section] > section > [data-section-title], .no-js [data-section] > section > .title, .no-js [data-section] > .section > [data-section-title], .no-js [data-section] > .section > .title, .no-js [data-section] > [data-section-region] > [data-section-title], .no-js [data-section] > [data-section-region] > .title, .no-js .section-container > section > [data-section-title], .no-js .section-container > section > .title, .no-js .section-container > .section > [data-section-title], .no-js .section-container > .section > .title, .no-js .section-container > [data-section-region] > [data-section-title], .no-js .section-container > [data-section-region] > .title { + width: 100%; } +/* line 384, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ +.no-js .section-container { + border-top: 1px solid #cccccc; } +/* line 207, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ +.no-js .section-container > section > .title, .no-js .section-container > .section > .title { + background-color: #efefef; + cursor: pointer; + border: solid 1px #cccccc; } +/* line 211, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ +.no-js .section-container > section > .title a, .no-js .section-container > .section > .title a { + padding: 0.9375em; + color: #333333; + font-size: 0.875em; + background: none; } +/* line 217, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ +.no-js .section-container > section > .title:hover, .no-js .section-container > .section > .title:hover { + background-color: #e2e2e2; } +/* line 220, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ +.no-js .section-container > section > .content, .no-js .section-container > .section > .content { + padding: 0.9375em; + background-color: white; + border: solid 1px #cccccc; } +/* line 225, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ +.no-js .section-container > section > .content > *:last-child, .no-js .section-container > .section > .content > *:last-child { + margin-bottom: 0; } +/* line 226, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ +.no-js .section-container > section > .content > *:first-child, .no-js .section-container > .section > .content > *:first-child { + padding-top: 0; } +/* line 227, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ +.no-js .section-container > section > .content > *:last-child:not(.flex-video), .no-js .section-container > .section > .content > *:last-child:not(.flex-video) { + padding-bottom: 0; } +/* line 231, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ +.no-js .section-container > section.active > .title, .no-js .section-container > .section.active > .title { + background: #d5d5d5; } +/* line 233, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ +.no-js .section-container > section.active > .title a, .no-js .section-container > .section.active > .title a { + color: #333333; } +/* line 237, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ +.no-js .section-container > section:not(.active), .no-js .section-container > .section:not(.active) { + padding: 0 !important; } +/* line 243, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_section.scss */ +.no-js .section-container > section > .title, .no-js .section-container > .section > .title { + border-top: none; } + +/* Wrapped around .top-bar to contain to grid width */ +/* line 72, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_top-bar.scss */ +.contain-to-grid { + width: 100%; + background: #111111; } +/* line 76, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_top-bar.scss */ +.contain-to-grid .top-bar { + margin-bottom: 0; } + +/* line 80, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_top-bar.scss */ +.fixed { + width: 100%; + left: 0; + position: fixed; + top: 0; + z-index: 99; } +/* line 87, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_top-bar.scss */ +.fixed.expanded:not(.top-bar) { + overflow-y: auto; + height: auto; + width: 100%; + max-height: 100%; } +/* line 93, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_top-bar.scss */ +.fixed.expanded:not(.top-bar) .title-area { + position: fixed; + width: 100%; + z-index: 99; } +/* line 99, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_top-bar.scss */ +.fixed.expanded:not(.top-bar) .top-bar-section { + z-index: 98; + margin-top: 45px; } + +/* line 106, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_top-bar.scss */ +.top-bar { + overflow: hidden; + height: 45px; + line-height: 45px; + position: relative; + background: #111111; + margin-bottom: 0; } +/* line 115, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_top-bar.scss */ +.top-bar ul { + margin-bottom: 0; + list-style: none; } +/* line 120, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_top-bar.scss */ +.top-bar .row { + max-width: none; } +/* line 123, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_top-bar.scss */ +.top-bar form, .top-bar input { + margin-bottom: 0; } +/* line 125, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_top-bar.scss */ +.top-bar input { + height: 2.45em; } +/* line 127, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_top-bar.scss */ +.top-bar .button { + padding-top: .5em; + padding-bottom: .5em; + margin-bottom: 0; } +/* line 130, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_top-bar.scss */ +.top-bar .title-area { + position: relative; + margin: 0; } +/* line 135, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_top-bar.scss */ +.top-bar .name { + height: 45px; + margin: 0; + font-size: 16px; } +/* line 140, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_top-bar.scss */ +.top-bar .name h1 { + line-height: 45px; + font-size: 1.0625em; + margin: 0; } +/* line 144, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_top-bar.scss */ +.top-bar .name h1 a { + font-weight: bold; + color: white; + width: 50%; + display: block; + padding: 0 15px; } +/* line 155, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_top-bar.scss */ +.top-bar .toggle-topbar { + position: absolute; + right: 0; + top: 0; } +/* line 160, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_top-bar.scss */ +.top-bar .toggle-topbar a { + color: white; + text-transform: uppercase; + font-size: 0.8125em; + font-weight: bold; + position: relative; + display: block; + padding: 0 15px; + height: 45px; + line-height: 45px; } +/* line 173, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_top-bar.scss */ +.top-bar .toggle-topbar.menu-icon { + right: 15px; + top: 50%; + margin-top: -16px; + padding-left: 40px; } +/* line 179, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_top-bar.scss */ +.top-bar .toggle-topbar.menu-icon a { + text-indent: -48px; + width: 34px; + height: 34px; + line-height: 33px; + padding: 0; + color: white; } +/* line 187, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_top-bar.scss */ +.top-bar .toggle-topbar.menu-icon a span { + position: absolute; + right: 0; + display: block; + width: 16px; + height: 0; + -webkit-box-shadow: 0 10px 0 1px white, 0 16px 0 1px white, 0 22px 0 1px white; + box-shadow: 0 10px 0 1px white, 0 16px 0 1px white, 0 22px 0 1px white; } +/* line 208, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_top-bar.scss */ +.top-bar.expanded { + height: auto; + background: transparent; } +/* line 212, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_top-bar.scss */ +.top-bar.expanded .title-area { + background: #111111; } +/* line 215, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_top-bar.scss */ +.top-bar.expanded .toggle-topbar a { + color: #888888; } +/* line 216, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_top-bar.scss */ +.top-bar.expanded .toggle-topbar a span { + -webkit-box-shadow: 0 10px 0 1px #888888, 0 16px 0 1px #888888, 0 22px 0 1px #888888; + box-shadow: 0 10px 0 1px #888888, 0 16px 0 1px #888888, 0 22px 0 1px #888888; } + +/* line 234, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_top-bar.scss */ +.top-bar-section { + left: 0; + position: relative; + width: auto; + -webkit-transition: left 300ms ease-out; + -moz-transition: left 300ms ease-out; + transition: left 300ms ease-out; } +/* line 240, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_top-bar.scss */ +.top-bar-section ul { + width: 100%; + height: auto; + display: block; + background: #222222; + font-size: 16px; + margin: 0; } +/* line 250, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_top-bar.scss */ +.top-bar-section .divider, .top-bar-section [role="separator"] { + border-bottom: solid 1px #2b2b2b; + border-top: solid 1px black; + clear: both; + height: 1px; + width: 100%; } +/* line 259, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_top-bar.scss */ +.top-bar-section ul li > a { + display: block; + width: 100%; + color: white; + padding: 12px 0 12px 0; + padding-left: 15px; + font-size: 0.8125em; + font-weight: bold; + background: #222222; } +/* line 269, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_top-bar.scss */ +.top-bar-section ul li > a.button { + background: #2ba6cb; + font-size: 0.8125em; + padding-right: 15px; + padding-left: 15px; } +/* line 274, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_top-bar.scss */ +.top-bar-section ul li > a.button:hover { + background: #2284a1; } +/* line 278, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_top-bar.scss */ +.top-bar-section ul li > a.button.secondary { + background: #e9e9e9; } +/* line 280, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_top-bar.scss */ +.top-bar-section ul li > a.button.secondary:hover { + background: #d0d0d0; } +/* line 284, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_top-bar.scss */ +.top-bar-section ul li > a.button.success { + background: #5da423; } +/* line 286, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_top-bar.scss */ +.top-bar-section ul li > a.button.success:hover { + background: #457a1a; } +/* line 290, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_top-bar.scss */ +.top-bar-section ul li > a.button.alert { + background: #c60f13; } +/* line 292, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_top-bar.scss */ +.top-bar-section ul li > a.button.alert:hover { + background: #970b0e; } +/* line 300, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_top-bar.scss */ +.top-bar-section ul li:hover > a { + background: black; + color: white; } +/* line 306, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_top-bar.scss */ +.top-bar-section ul li.active > a { + background: #090909; + color: white; } +/* line 313, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_top-bar.scss */ +.top-bar-section .has-form { + padding: 15px; } +/* line 316, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_top-bar.scss */ +.top-bar-section .has-dropdown { + position: relative; } +/* line 320, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_top-bar.scss */ +.top-bar-section .has-dropdown > a:after { + content: ""; + display: block; + width: 0; + height: 0; + border: inset 5px; + border-color: transparent transparent transparent rgba(255, 255, 255, 0.5); + border-left-style: solid; + margin-right: 15px; + margin-top: -4.5px; + position: absolute; + top: 50%; + right: 0; } +/* line 332, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_top-bar.scss */ +.top-bar-section .has-dropdown.moved { + position: static; } +/* line 333, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_top-bar.scss */ +.top-bar-section .has-dropdown.moved > .dropdown { + display: block; } +/* line 340, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_top-bar.scss */ +.top-bar-section .dropdown { + position: absolute; + left: 100%; + top: 0; + display: none; + z-index: 99; } +/* line 347, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_top-bar.scss */ +.top-bar-section .dropdown li { + width: 100%; + height: auto; } +/* line 351, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_top-bar.scss */ +.top-bar-section .dropdown li a { + font-weight: normal; + padding: 8px 15px; } +/* line 354, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_top-bar.scss */ +.top-bar-section .dropdown li a.parent-link { + font-weight: bold; } +/* line 359, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_top-bar.scss */ +.top-bar-section .dropdown li.title h5 { + margin-bottom: 0; } +/* line 360, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_top-bar.scss */ +.top-bar-section .dropdown li.title h5 a { + color: white; + line-height: 22.5px; + display: block; } +/* line 368, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_top-bar.scss */ +.top-bar-section .dropdown label { + padding: 8px 15px 2px; + margin-bottom: 0; + text-transform: uppercase; + color: #555555; + font-weight: bold; + font-size: 0.625em; } + +/* line 380, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_top-bar.scss */ +.top-bar-js-breakpoint { + width: 940px !important; + visibility: hidden; } + +/* line 384, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_top-bar.scss */ +.js-generated { + display: block; } + +@media only screen and (min-width: 940px) { + /* line 389, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_top-bar.scss */ + .top-bar { + background: #111111; + *zoom: 1; + overflow: visible; } + /* line 121, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_global.scss */ + .top-bar:before, .top-bar:after { + content: " "; + display: table; } + /* line 122, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_global.scss */ + .top-bar:after { + clear: both; } + /* line 394, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_top-bar.scss */ + .top-bar .toggle-topbar { + display: none; } + /* line 396, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_top-bar.scss */ + .top-bar .title-area { + float: left; } + /* line 397, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_top-bar.scss */ + .top-bar .name h1 a { + width: auto; } + /* line 400, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_top-bar.scss */ + .top-bar input, .top-bar .button { + line-height: 2em; + font-size: 0.875em; + height: 2em; + padding: 0 10px; + position: relative; + top: 8px; } + /* line 409, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_top-bar.scss */ + .top-bar.expanded { + background: #111111; } + + /* line 412, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_top-bar.scss */ + .contain-to-grid .top-bar { + max-width: 62.5em; + margin: 0 auto; + margin-bottom: 0; } + + /* line 418, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_top-bar.scss */ + .top-bar-section { + -webkit-transition: none 0 0; + -moz-transition: none 0 0; + transition: none 0 0; + left: 0 !important; } + /* line 422, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_top-bar.scss */ + .top-bar-section ul { + width: auto; + height: auto !important; + display: inline; } + /* line 427, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_top-bar.scss */ + .top-bar-section ul li { + float: left; } + /* line 429, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_top-bar.scss */ + .top-bar-section ul li .js-generated { + display: none; } + /* line 435, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_top-bar.scss */ + .top-bar-section li.hover > a:not(.button) { + background: black; + color: white; } + /* line 440, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_top-bar.scss */ + .top-bar-section li a:not(.button) { + padding: 0 15px; + line-height: 45px; + background: #111111; } + /* line 444, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_top-bar.scss */ + .top-bar-section li a:not(.button):hover { + background: black; } + /* line 452, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_top-bar.scss */ + .top-bar-section .has-dropdown > a { + padding-right: 35px !important; } + /* line 454, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_top-bar.scss */ + .top-bar-section .has-dropdown > a:after { + content: ""; + display: block; + width: 0; + height: 0; + border: inset 5px; + border-color: rgba(255, 255, 255, 0.5) transparent transparent transparent; + border-top-style: solid; + margin-top: -2.5px; + top: 22.5px; } + /* line 463, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_top-bar.scss */ + .top-bar-section .has-dropdown.moved { + position: relative; } + /* line 464, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_top-bar.scss */ + .top-bar-section .has-dropdown.moved > .dropdown { + display: none; } + /* line 468, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_top-bar.scss */ + .top-bar-section .has-dropdown.hover > .dropdown, .top-bar-section .has-dropdown.not-click:hover > .dropdown { + display: block; } + /* line 475, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_top-bar.scss */ + .top-bar-section .has-dropdown .dropdown li.has-dropdown > a:after { + border: none; + content: "\00bb"; + top: 1em; + margin-top: -7px; + right: 5px; } + /* line 487, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_top-bar.scss */ + .top-bar-section .dropdown { + left: 0; + top: auto; + background: transparent; + min-width: 100%; } + /* line 494, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_top-bar.scss */ + .top-bar-section .dropdown li a { + color: white; + line-height: 1; + white-space: nowrap; + padding: 7px 15px; + background: #1e1e1e; } + /* line 502, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_top-bar.scss */ + .top-bar-section .dropdown li label { + white-space: nowrap; + background: #1e1e1e; } + /* line 508, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_top-bar.scss */ + .top-bar-section .dropdown li .dropdown { + left: 100%; + top: 0; } + /* line 516, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_top-bar.scss */ + .top-bar-section > ul > .divider, .top-bar-section > ul > [role="separator"] { + border-bottom: none; + border-top: none; + border-right: solid 1px #2b2b2b; + border-left: solid 1px black; + clear: none; + height: 45px; + width: 0; } + /* line 526, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_top-bar.scss */ + .top-bar-section .has-form { + background: #111111; + padding: 0 15px; + height: 45px; } + /* line 534, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_top-bar.scss */ + .top-bar-section ul.right li .dropdown { + left: auto; + right: 0; } + /* line 538, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_top-bar.scss */ + .top-bar-section ul.right li .dropdown li .dropdown { + right: 100%; } + + /* line 548, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_top-bar.scss */ + .no-js .top-bar-section ul li:hover > a { + background: black; + color: white; } + /* line 554, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_top-bar.scss */ + .no-js .top-bar-section ul li:active > a { + background: #090909; + color: white; } + /* line 562, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_top-bar.scss */ + .no-js .top-bar-section .has-dropdown:hover > .dropdown { + display: block; } } +@-webkit-keyframes rotate { + /* line 43, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_orbit.scss */ + from { + -webkit-transform: rotate(0deg); } + + /* line 44, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_orbit.scss */ + to { + -webkit-transform: rotate(360deg); } } + +@-moz-keyframes rotate { + /* line 47, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_orbit.scss */ + from { + -moz-transform: rotate(0deg); } + + /* line 48, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_orbit.scss */ + to { + -moz-transform: rotate(360deg); } } + +@-o-keyframes rotate { + /* line 51, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_orbit.scss */ + from { + -o-transform: rotate(0deg); } + + /* line 52, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_orbit.scss */ + to { + -o-transform: rotate(360deg); } } + +@keyframes rotate { + /* line 56, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_orbit.scss */ + from { + transform: rotate(0deg); } + + /* line 57, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_orbit.scss */ + to { + transform: rotate(360deg); } } + +/* Orbit Graceful Loading */ +/* line 61, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_orbit.scss */ +.slideshow-wrapper { + position: relative; } +/* line 64, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_orbit.scss */ +.slideshow-wrapper ul { + list-style-type: none; + margin: 0; } +/* line 71, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_orbit.scss */ +.slideshow-wrapper ul li, .slideshow-wrapper ul li .orbit-caption { + display: none; } +/* line 74, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_orbit.scss */ +.slideshow-wrapper ul li:first-child { + display: block; } +/* line 77, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_orbit.scss */ +.slideshow-wrapper .orbit-container { + background-color: transparent; } +/* line 80, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_orbit.scss */ +.slideshow-wrapper .orbit-container li { + display: block; } +/* line 82, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_orbit.scss */ +.slideshow-wrapper .orbit-container li .orbit-caption { + display: block; } + +/* line 88, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_orbit.scss */ +.preloader { + display: block; + width: 40px; + height: 40px; + position: absolute; + top: 50%; + left: 50%; + margin-top: -20px; + margin-left: -20px; + border: solid 3px; + border-color: #555 #fff; + -webkit-border-radius: 1000px; + border-radius: 1000px; + -webkit-animation-name: rotate; + -webkit-animation-duration: 1.5s; + -webkit-animation-iteration-count: infinite; + -webkit-animation-timing-function: linear; + -moz-animation-name: rotate; + -moz-animation-duration: 1.5s; + -moz-animation-iteration-count: infinite; + -moz-animation-timing-function: linear; + -o-animation-name: rotate; + -o-animation-duration: 1.5s; + -o-animation-iteration-count: infinite; + -o-animation-timing-function: linear; + animation-name: rotate; + animation-duration: 1.5s; + animation-iteration-count: infinite; + animation-timing-function: linear; } + +/* line 120, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_orbit.scss */ +.orbit-container { + overflow: hidden; + width: 100%; + position: relative; + background: whitesmoke; } +/* line 126, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_orbit.scss */ +.orbit-container .orbit-slides-container { + list-style: none; + margin: 0; + padding: 0; + position: relative; } +/* line 132, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_orbit.scss */ +.orbit-container .orbit-slides-container img { + display: block; + max-width: 100%; } +/* line 134, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_orbit.scss */ +.orbit-container .orbit-slides-container > * { + position: absolute; + top: 0; + width: 100%; + margin-left: 100%; } +/* line 145, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_orbit.scss */ +.orbit-container .orbit-slides-container > *:first-child { + margin-left: 0%; } +/* line 154, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_orbit.scss */ +.orbit-container .orbit-slides-container > * .orbit-caption { + position: absolute; + bottom: 0; + background-color: rgba(0, 0, 0, 0.6); + color: white; + width: 100%; + padding: 10px 14px; + font-size: 0.875em; } +/* line 171, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_orbit.scss */ +.orbit-container .orbit-slide-number { + position: absolute; + top: 10px; + left: 10px; + font-size: 12px; + color: white; + background: rgba(0, 0, 0, 0); + z-index: 10; } +/* line 176, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_orbit.scss */ +.orbit-container .orbit-slide-number span { + font-weight: 700; + padding: 0.3125em; } +/* line 182, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_orbit.scss */ +.orbit-container .orbit-timer { + position: absolute; + top: 10px; + right: 10px; + height: 6px; + width: 100px; + z-index: 10; } +/* line 189, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_orbit.scss */ +.orbit-container .orbit-timer .orbit-progress { + height: 100%; + background-color: rgba(0, 0, 0, 0.6); + display: block; + width: 0%; } +/* line 199, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_orbit.scss */ +.orbit-container .orbit-timer > span { + display: none; + position: absolute; + top: 10px; + right: 0; + width: 11px; + height: 14px; + border: solid 4px #000; + border-top: none; + border-bottom: none; } +/* line 213, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_orbit.scss */ +.orbit-container .orbit-timer.paused > span { + right: -6px; + top: 9px; + width: 11px; + height: 14px; + border: inset 8px; + border-right-style: solid; + border-color: transparent transparent transparent #000; } +/* line 225, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_orbit.scss */ +.orbit-container:hover .orbit-timer > span { + display: block; } +/* line 229, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_orbit.scss */ +.orbit-container .orbit-prev, .orbit-container .orbit-next { + position: absolute; + top: 50%; + margin-top: -25px; + background-color: rgba(0, 0, 0, 0.6); + width: 50px; + height: 60px; + line-height: 50px; + color: white; + text-indent: -9999px !important; + z-index: 10; } +/* line 241, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_orbit.scss */ +.orbit-container .orbit-prev:hover, .orbit-container .orbit-next:hover { + background-color: rgba(0, 0, 0, 0.6); } +/* line 245, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_orbit.scss */ +.orbit-container .orbit-prev > span, .orbit-container .orbit-next > span { + position: absolute; + top: 50%; + margin-top: -16px; + display: block; + width: 0; + height: 0; + border: inset 16px; } +/* line 255, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_orbit.scss */ +.orbit-container .orbit-prev { + left: 0; } +/* line 256, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_orbit.scss */ +.orbit-container .orbit-prev > span { + border-right-style: solid; + border-color: transparent; + border-right-color: white; } +/* line 261, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_orbit.scss */ +.orbit-container .orbit-prev:hover > span { + border-right-color: #cccccc; } +/* line 265, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_orbit.scss */ +.orbit-container .orbit-next { + right: 0; } +/* line 266, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_orbit.scss */ +.orbit-container .orbit-next > span { + border-color: transparent; + border-left-style: solid; + border-left-color: white; + left: 50%; + margin-left: -8px; } +/* line 273, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_orbit.scss */ +.orbit-container .orbit-next:hover > span { + border-left-color: #cccccc; } + +/* line 279, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_orbit.scss */ +.orbit-bullets { + margin: 0 auto 30px auto; + overflow: hidden; + position: relative; + top: 10px; } +/* line 285, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_orbit.scss */ +.orbit-bullets li { + display: block; + width: 0.75em; + height: 0.75em; + background: #999999; + float: left; + margin-right: 6px; + border: solid 1px #555555; + -webkit-border-radius: 1000px; + border-radius: 1000px; } +/* line 295, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_orbit.scss */ +.orbit-bullets li.active { + background: #555555; } +/* line 299, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_orbit.scss */ +.orbit-bullets li:last-child { + margin-right: 0; } + +/* line 306, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_orbit.scss */ +.touch .orbit-container .orbit-prev, .touch .orbit-container .orbit-next { + display: none; } +/* line 309, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_orbit.scss */ +.touch .orbit-bullets { + display: none; } + +@media only screen and (min-width: 768px) { + /* line 318, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_orbit.scss */ + .touch .orbit-container .orbit-prev, .touch .orbit-container .orbit-next { + display: inherit; } + /* line 321, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_orbit.scss */ + .touch .orbit-bullets { + display: block; } } +@media only screen and (max-width: 768px) { + /* line 328, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_orbit.scss */ + .orbit-stack-on-small .orbit-slides-container { + height: auto !important; } + /* line 329, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_orbit.scss */ + .orbit-stack-on-small .orbit-slides-container > * { + position: relative; + margin-left: 0% !important; } + /* line 336, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_orbit.scss */ + .orbit-stack-on-small .orbit-timer, .orbit-stack-on-small .orbit-next, .orbit-stack-on-small .orbit-prev, .orbit-stack-on-small .orbit-bullets { + display: none; } } +/* line 109, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_reveal.scss */ +.reveal-modal-bg { + position: fixed; + height: 100%; + width: 100%; + background: black; + background: rgba(0, 0, 0, 0.45); + z-index: 98; + display: none; + top: 0; + left: 0; } + +/* line 111, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_reveal.scss */ +.reveal-modal { + visibility: hidden; + display: none; + position: absolute; + left: 50%; + z-index: 99; + height: auto; + margin-left: -40%; + width: 80%; + background-color: white; + padding: 1.25em; + border: solid 1px #666666; + -webkit-box-shadow: 0 0 10px rgba(0, 0, 0, 0.4); + box-shadow: 0 0 10px rgba(0, 0, 0, 0.4); + top: 50px; } +/* line 62, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_reveal.scss */ +.reveal-modal .column, .reveal-modal .columns { + min-width: 0; } +/* line 65, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_reveal.scss */ +.reveal-modal > :first-child { + margin-top: 0; } +/* line 66, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_reveal.scss */ +.reveal-modal > :last-child { + margin-bottom: 0; } +/* line 115, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_reveal.scss */ +.reveal-modal .close-reveal-modal { + font-size: 1.375em; + line-height: 1; + position: absolute; + top: 0.5em; + right: 0.6875em; + color: #aaaaaa; + font-weight: bold; + cursor: pointer; } + +@media only screen and (min-width: 768px) { + /* line 121, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_reveal.scss */ + .reveal-modal { + padding: 1.875em; + top: 6.25em; } + /* line 124, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_reveal.scss */ + .reveal-modal.tiny { + margin-left: -15%; + width: 30%; } + /* line 125, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_reveal.scss */ + .reveal-modal.small { + margin-left: -20%; + width: 40%; } + /* line 126, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_reveal.scss */ + .reveal-modal.medium { + margin-left: -30%; + width: 60%; } + /* line 127, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_reveal.scss */ + .reveal-modal.large { + margin-left: -35%; + width: 70%; } + /* line 128, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_reveal.scss */ + .reveal-modal.xlarge { + margin-left: -47.5%; + width: 95%; } } +@media print { + /* line 134, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_reveal.scss */ + .reveal-modal { + background: #fff !important; } } +/* Foundation Joyride */ +/* line 41, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_joyride.scss */ +.joyride-list { + display: none; } + +/* Default styles for the container */ +/* line 44, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_joyride.scss */ +.joyride-tip-guide { + display: none; + position: absolute; + background: black; + color: white; + z-index: 101; + top: 0; + left: 2.5%; + font-family: inherit; + font-weight: normal; + width: 95%; } + +/* line 57, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_joyride.scss */ +.lt-ie9 .joyride-tip-guide { + max-width: 800px; + left: 50%; + margin-left: -400px; } + +/* line 63, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_joyride.scss */ +.joyride-content-wrapper { + width: 100%; + padding: 1.125em 1.25em 1.5em; } +/* line 68, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_joyride.scss */ +.joyride-content-wrapper .button { + margin-bottom: 0 !important; } + +/* Add a little css triangle pip, older browser just miss out on the fanciness of it */ +/* line 73, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_joyride.scss */ +.joyride-tip-guide .joyride-nub { + display: block; + position: absolute; + left: 22px; + width: 0; + height: 0; + border: inset 14px; } +/* line 81, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_joyride.scss */ +.joyride-tip-guide .joyride-nub.top { + border-top-style: solid; + border-color: black; + border-top-color: transparent !important; + border-left-color: transparent !important; + border-right-color: transparent !important; + top: -28px; } +/* line 89, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_joyride.scss */ +.joyride-tip-guide .joyride-nub.bottom { + border-bottom-style: solid; + border-color: black !important; + border-bottom-color: transparent !important; + border-left-color: transparent !important; + border-right-color: transparent !important; + bottom: -28px; } +/* line 98, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_joyride.scss */ +.joyride-tip-guide .joyride-nub.right { + right: -28px; } +/* line 99, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_joyride.scss */ +.joyride-tip-guide .joyride-nub.left { + left: -28px; } + +/* Typography */ +/* line 109, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_joyride.scss */ +.joyride-tip-guide h1, .joyride-tip-guide h2, .joyride-tip-guide h3, .joyride-tip-guide h4, .joyride-tip-guide h5, .joyride-tip-guide h6 { + line-height: 1.25; + margin: 0; + font-weight: bold; + color: white; } + +/* line 115, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_joyride.scss */ +.joyride-tip-guide p { + margin: 0 0 1.125em 0; + font-size: 0.875em; + line-height: 1.3; } + +/* line 121, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_joyride.scss */ +.joyride-timer-indicator-wrap { + width: 50px; + height: 3px; + border: solid 1px #555555; + position: absolute; + right: 1.0625em; + bottom: 1em; } + +/* line 129, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_joyride.scss */ +.joyride-timer-indicator { + display: block; + width: 0; + height: inherit; + background: #666666; } + +/* line 136, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_joyride.scss */ +.joyride-close-tip { + position: absolute; + right: 12px; + top: 10px; + color: #777777 !important; + text-decoration: none; + font-size: 30px; + font-weight: normal; + line-height: .5 !important; } +/* line 147, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_joyride.scss */ +.joyride-close-tip:hover, .joyride-close-tip:focus { + color: #eee !important; } + +/* line 150, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_joyride.scss */ +.joyride-modal-bg { + position: fixed; + height: 100%; + width: 100%; + background: transparent; + background: rgba(0, 0, 0, 0.5); + z-index: 100; + display: none; + top: 0; + left: 0; + cursor: pointer; } + +/* line 163, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_joyride.scss */ +.joyride-expose-wrapper { + background-color: #ffffff; + position: absolute; + border-radius: 3px; + z-index: 102; + -moz-box-shadow: 0 0 30px #ffffff; + -webkit-box-shadow: 0 0 15px #ffffff; + box-shadow: 0 0 15px #ffffff; } + +/* line 175, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_joyride.scss */ +.joyride-expose-cover { + background: transparent; + border-radius: 3px; + position: absolute; + z-index: 9999; + top: 0; + left: 0; } + +/* Styles for screens that are atleast 768px; */ +@media only screen and (min-width: 768px) { + /* line 187, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_joyride.scss */ + .joyride-tip-guide { + width: 300px; + left: inherit; } + /* line 189, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_joyride.scss */ + .joyride-tip-guide .joyride-nub.bottom { + border-color: black !important; + border-bottom-color: transparent !important; + border-left-color: transparent !important; + border-right-color: transparent !important; + bottom: -28px; } + /* line 196, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_joyride.scss */ + .joyride-tip-guide .joyride-nub.right { + border-color: black !important; + border-top-color: transparent !important; + border-right-color: transparent !important; + border-bottom-color: transparent !important; + top: 22px; + left: auto; + right: -28px; } + /* line 204, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_joyride.scss */ + .joyride-tip-guide .joyride-nub.left { + border-color: black !important; + border-top-color: transparent !important; + border-left-color: transparent !important; + border-bottom-color: transparent !important; + top: 22px; + left: -28px; + right: auto; } } +/* Clearing Styles */ +/* line 36, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_clearing.scss */ +[data-clearing] { + *zoom: 1; + margin-bottom: 0; + margin-left: 0; + list-style: none; } +/* line 121, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_global.scss */ +[data-clearing]:before, [data-clearing]:after { + content: " "; + display: table; } +/* line 122, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_global.scss */ +[data-clearing]:after { + clear: both; } +/* line 42, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_clearing.scss */ +[data-clearing] li { + float: left; + margin-right: 10px; } + +/* line 48, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_clearing.scss */ +.clearing-blackout { + background: #111111; + position: fixed; + width: 100%; + height: 100%; + top: 0; + left: 0; + z-index: 998; } +/* line 57, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_clearing.scss */ +.clearing-blackout .clearing-close { + display: block; } + +/* line 60, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_clearing.scss */ +.clearing-container { + position: relative; + z-index: 998; + height: 100%; + overflow: hidden; + margin: 0; } + +/* line 68, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_clearing.scss */ +.visible-img { + height: 95%; + position: relative; } +/* line 72, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_clearing.scss */ +.visible-img img { + position: absolute; + left: 50%; + top: 50%; + margin-left: -50%; + max-height: 100%; + max-width: 100%; } + +/* line 82, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_clearing.scss */ +.clearing-caption { + color: white; + line-height: 1.3; + margin-bottom: 0; + text-align: center; + bottom: 0; + background: #111111; + width: 100%; + padding: 10px 30px; + position: absolute; + left: 0; } + +/* line 95, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_clearing.scss */ +.clearing-close { + z-index: 999; + padding-left: 20px; + padding-top: 10px; + font-size: 40px; + line-height: 1; + color: white; + display: none; } +/* line 105, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_clearing.scss */ +.clearing-close:hover, .clearing-close:focus { + color: #ccc; } + +/* line 108, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_clearing.scss */ +.clearing-assembled .clearing-container { + height: 100%; } +/* line 109, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_clearing.scss */ +.clearing-assembled .clearing-container .carousel > ul { + display: none; } + +/* line 113, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_clearing.scss */ +.clearing-feature li { + display: none; } +/* line 115, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_clearing.scss */ +.clearing-feature li.clearing-featured-img { + display: block; } + +@media only screen and (min-width: 768px) { + /* line 123, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_clearing.scss */ + .clearing-main-prev, .clearing-main-next { + position: absolute; + height: 100%; + width: 40px; + top: 0; } + /* line 128, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_clearing.scss */ + .clearing-main-prev > span, .clearing-main-next > span { + position: absolute; + top: 50%; + display: block; + width: 0; + height: 0; + border: solid 16px; } + + /* line 137, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_clearing.scss */ + .clearing-main-prev { + left: 0; } + /* line 139, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_clearing.scss */ + .clearing-main-prev > span { + left: 5px; + border-color: transparent; + border-right-color: white; } + + /* line 145, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_clearing.scss */ + .clearing-main-next { + right: 0; } + /* line 147, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_clearing.scss */ + .clearing-main-next > span { + border-color: transparent; + border-left-color: white; } + + /* line 154, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_clearing.scss */ + .clearing-main-prev.disabled, .clearing-main-next.disabled { + opacity: 0.5; } + + /* line 158, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_clearing.scss */ + .clearing-assembled .clearing-container .carousel { + background: #111111; + height: 150px; + margin-top: 5px; } + /* line 163, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_clearing.scss */ + .clearing-assembled .clearing-container .carousel > ul { + display: block; + z-index: 999; + width: 200%; + height: 100%; + margin-left: 0; + position: relative; + left: 0; } + /* line 172, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_clearing.scss */ + .clearing-assembled .clearing-container .carousel > ul li { + display: block; + width: 175px; + height: inherit; + padding: 0; + float: left; + overflow: hidden; + margin-right: 1px; + position: relative; + cursor: pointer; + opacity: 0.4; } + /* line 185, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_clearing.scss */ + .clearing-assembled .clearing-container .carousel > ul li.fix-height img { + min-height: 100%; + height: 100%; + max-width: none; } + /* line 192, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_clearing.scss */ + .clearing-assembled .clearing-container .carousel > ul li a.th { + border: none; + -webkit-box-shadow: none; + box-shadow: none; + display: block; } + /* line 201, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_clearing.scss */ + .clearing-assembled .clearing-container .carousel > ul li img { + cursor: pointer !important; + min-width: 100% !important; } + /* line 206, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_clearing.scss */ + .clearing-assembled .clearing-container .carousel > ul li.visible { + opacity: 1; } + /* line 211, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_clearing.scss */ + .clearing-assembled .clearing-container .visible-img { + background: #111111; + overflow: hidden; + height: 75%; } + + /* line 218, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_clearing.scss */ + .clearing-close { + position: absolute; + top: 10px; + right: 20px; + padding-left: 0; + padding-top: 0; } } +/* Foundation Alerts */ +/* line 94, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_alert-boxes.scss */ +.alert-box { + border-style: solid; + border-width: 1px; + display: block; + font-weight: bold; + margin-bottom: 1.25em; + position: relative; + padding: 0.6875em 1.3125em 0.75em 0.6875em; + font-size: 0.875em; + background-color: #2ba6cb; + border-color: #2284a1; + color: white; } +/* line 97, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_alert-boxes.scss */ +.alert-box .close { + font-size: 1.375em; + padding: 5px 4px 4px; + line-height: 0; + position: absolute; + top: 0.4375em; + right: 0.3125em; + color: #333333; + opacity: 0.3; } +/* line 81, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_alert-boxes.scss */ +.alert-box .close:hover, .alert-box .close:focus { + opacity: 0.5; } +/* line 99, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_alert-boxes.scss */ +.alert-box.radius { + -webkit-border-radius: 3px; + border-radius: 3px; } +/* line 100, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_alert-boxes.scss */ +.alert-box.round { + -webkit-border-radius: 1000px; + border-radius: 1000px; } +/* line 102, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_alert-boxes.scss */ +.alert-box.success { + background-color: #5da423; + border-color: #457a1a; + color: white; } +/* line 103, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_alert-boxes.scss */ +.alert-box.alert { + background-color: #c60f13; + border-color: #970b0e; + color: white; } +/* line 104, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_alert-boxes.scss */ +.alert-box.secondary { + background-color: #e9e9e9; + border-color: #d0d0d0; + color: #505050; } + +/* Breadcrumbs */ +/* line 115, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_breadcrumbs.scss */ +.breadcrumbs { + display: block; + padding: 0.5625em 0.875em 0.5625em; + overflow: hidden; + margin-left: 0; + list-style: none; + border-style: solid; + border-width: 1px; + background-color: #f6f6f6; + border-color: gainsboro; + -webkit-border-radius: 3px; + border-radius: 3px; } +/* line 119, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_breadcrumbs.scss */ +.breadcrumbs > * { + margin: 0; + float: left; + font-size: 0.6875em; + text-transform: uppercase; } +/* line 60, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_breadcrumbs.scss */ +.breadcrumbs > *:hover a, .breadcrumbs > *:focus a { + text-decoration: underline; } +/* line 63, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_breadcrumbs.scss */ +.breadcrumbs > * a, .breadcrumbs > * span { + text-transform: uppercase; + color: #2ba6cb; } +/* line 69, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_breadcrumbs.scss */ +.breadcrumbs > *.current { + cursor: default; + color: #333333; } +/* line 72, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_breadcrumbs.scss */ +.breadcrumbs > *.current a { + cursor: default; + color: #333333; } +/* line 78, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_breadcrumbs.scss */ +.breadcrumbs > *.current:hover, .breadcrumbs > *.current:hover a, .breadcrumbs > *.current:focus, .breadcrumbs > *.current:focus a { + text-decoration: none; } +/* line 82, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_breadcrumbs.scss */ +.breadcrumbs > *.unavailable { + color: #999999; } +/* line 84, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_breadcrumbs.scss */ +.breadcrumbs > *.unavailable a { + color: #999999; } +/* line 89, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_breadcrumbs.scss */ +.breadcrumbs > *.unavailable:hover, .breadcrumbs > *.unavailable:hover a, .breadcrumbs > *.unavailable:focus, .breadcrumbs > *.unavailable a:focus { + text-decoration: none; + color: #999999; + cursor: default; } +/* line 96, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_breadcrumbs.scss */ +.breadcrumbs > *:before { + content: "/"; + color: #aaaaaa; + margin: 0 0.75em; + position: relative; + top: 1px; } +/* line 104, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_breadcrumbs.scss */ +.breadcrumbs > *:first-child:before { + content: " "; + margin: 0; } + +/* Custom Checkbox and Radio Inputs */ +/* line 67, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_custom-forms.scss */ +form.custom .hidden-field { + margin-left: -99999px; + position: absolute; + visibility: hidden; } +/* line 73, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_custom-forms.scss */ +form.custom .custom { + display: inline-block; + width: 16px; + height: 16px; + position: relative; + top: -1px; + /* fix centering issue */ + vertical-align: middle; + border: solid 1px #cccccc; + background: white; } +/* line 83, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_custom-forms.scss */ +form.custom .custom.checkbox { + -webkit-border-radius: 0; + border-radius: 0; + padding: 0; } +/* line 87, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_custom-forms.scss */ +form.custom .custom.radio { + -webkit-border-radius: 1000px; + border-radius: 1000px; + padding: 3px; } +/* line 92, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_custom-forms.scss */ +form.custom .custom.checkbox:before { + content: ""; + display: block; + font-size: 16px; + color: white; } +/* line 101, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_custom-forms.scss */ +form.custom .custom.radio.checked:before { + content: ""; + display: block; + width: 8px; + height: 8px; + -webkit-border-radius: 1000px; + border-radius: 1000px; + background: #222222; + position: relative; } +/* line 113, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_custom-forms.scss */ +form.custom .custom.checkbox.checked:before { + content: "\00d7"; + color: #222222; + position: absolute; + top: -50%; + left: 50%; + margin-top: 4px; + margin-left: -5px; } + +/* Custom Select Options and Dropdowns */ +/* line 127, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_custom-forms.scss */ +form.custom { + /* Custom input, disabled */ } +/* line 128, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_custom-forms.scss */ +form.custom .custom.dropdown { + display: block; + position: relative; + top: 0; + height: 2.3125em; + margin-bottom: 1.25em; + margin-top: 0; + padding: 0; + width: 100%; + background: white; + background: -moz-linear-gradient(top, white 0%, #f3f3f3 100%); + background: -webkit-linear-gradient(top, white 0%, #f3f3f3 100%); + -webkit-box-shadow: none; + background: linear-gradient(to bottom, #ffffff 0%, #f3f3f3 100%); + box-shadow: none; + font-size: 0.875em; + vertical-align: top; } +/* line 148, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_custom-forms.scss */ +form.custom .custom.dropdown ul { + overflow-y: auto; + max-height: 200px; } +/* line 153, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_custom-forms.scss */ +form.custom .custom.dropdown .current { + cursor: default; + white-space: nowrap; + line-height: 2.25em; + color: rgba(0, 0, 0, 0.75); + text-decoration: none; + overflow: hidden; + display: block; + margin-left: 0.5em; + margin-right: 2.3125em; } +/* line 165, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_custom-forms.scss */ +form.custom .custom.dropdown .selector { + cursor: default; + position: absolute; + width: 2.5em; + height: 2.3125em; + display: block; + right: 0; + top: 0; } +/* line 173, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_custom-forms.scss */ +form.custom .custom.dropdown .selector:after { + content: ""; + display: block; + content: ""; + display: block; + width: 0; + height: 0; + border: inset 5px; + border-color: #aaaaaa transparent transparent transparent; + border-top-style: solid; + position: absolute; + left: 0.9375em; + top: 50%; + margin-top: -3px; } +/* line 186, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_custom-forms.scss */ +form.custom .custom.dropdown:hover a.selector:after, form.custom .custom.dropdown.open a.selector:after { + content: ""; + display: block; + width: 0; + height: 0; + border: inset 5px; + border-color: #222222 transparent transparent transparent; + border-top-style: solid; } +/* line 190, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_custom-forms.scss */ +form.custom .custom.dropdown .disabled { + color: #888888; } +/* line 192, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_custom-forms.scss */ +form.custom .custom.dropdown .disabled:hover { + background: transparent; + color: #888888; } +/* line 195, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_custom-forms.scss */ +form.custom .custom.dropdown .disabled:hover:after { + display: none; } +/* line 199, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_custom-forms.scss */ +form.custom .custom.dropdown.open ul { + display: block; + z-index: 10; + min-width: 100%; + -moz-box-sizing: content-box; + -webkit-box-sizing: content-box; + box-sizing: content-box; } +/* line 206, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_custom-forms.scss */ +form.custom .custom.dropdown.small { + max-width: 134px; } +/* line 207, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_custom-forms.scss */ +form.custom .custom.dropdown.medium { + max-width: 254px; } +/* line 208, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_custom-forms.scss */ +form.custom .custom.dropdown.large { + max-width: 434px; } +/* line 209, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_custom-forms.scss */ +form.custom .custom.dropdown.expand { + width: 100% !important; } +/* line 211, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_custom-forms.scss */ +form.custom .custom.dropdown.open.small ul { + min-width: 134px; + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; } +/* line 212, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_custom-forms.scss */ +form.custom .custom.dropdown.open.medium ul { + min-width: 254px; + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; } +/* line 213, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_custom-forms.scss */ +form.custom .custom.dropdown.open.large ul { + min-width: 434px; + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; } +/* line 216, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_custom-forms.scss */ +form.custom .error .custom.dropdown { + border-color: #c60f13; + background-color: rgba(198, 15, 19, 0.1); + background: rgba(198, 15, 19, 0.1); + margin-bottom: 0; } +/* line 236, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_forms.scss */ +form.custom .error .custom.dropdown:focus { + background: #fafafa; + border-color: #999999; } +/* line 222, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_custom-forms.scss */ +form.custom .error .custom.dropdown + small.error { + margin-top: 0; } +/* line 226, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_custom-forms.scss */ +form.custom .custom.dropdown ul { + position: absolute; + width: auto; + display: none; + margin: 0; + left: -1px; + top: auto; + -webkit-box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.1); + box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.1); + margin: 0; + padding: 0; + background: white; + border: solid 1px #cccccc; + font-size: 16px; } +/* line 243, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_custom-forms.scss */ +form.custom .custom.dropdown ul li { + color: #555555; + font-size: 0.875em; + cursor: default; + padding-top: 0.25em; + padding-bottom: 0.25em; + padding-left: 0.375em; + padding-right: 2.375em; + min-height: 1.5em; + line-height: 1.5em; + margin: 0; + white-space: nowrap; + list-style: none; } +/* line 257, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_custom-forms.scss */ +form.custom .custom.dropdown ul li.selected { + background: #eeeeee; + color: black; } +/* line 261, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_custom-forms.scss */ +form.custom .custom.dropdown ul li:hover { + background-color: #e4e4e4; + color: black; } +/* line 265, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_custom-forms.scss */ +form.custom .custom.dropdown ul li.selected:hover { + background: #eeeeee; + cursor: default; + color: black; } +/* line 272, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_custom-forms.scss */ +form.custom .custom.dropdown ul.show { + display: block; } +/* line 276, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_custom-forms.scss */ +form.custom .custom.disabled { + background: #dddddd; } + +/* Keystroke Characters */ +/* line 52, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_keystrokes.scss */ +.keystroke, kbd { + background-color: #ededed; + border-color: #dbdbdb; + color: #222222; + border-style: solid; + border-width: 1px; + margin: 0; + font-family: "Consolas", "Menlo", "Courier", monospace; + font-size: 0.875em; + padding: 0.125em 0.25em 0; + -webkit-border-radius: 3px; + border-radius: 3px; } + +/* Labels */ +/* line 71, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_labels.scss */ +.label { + font-weight: bold; + text-align: center; + text-decoration: none; + line-height: 1; + white-space: nowrap; + display: inline-block; + position: relative; + padding: 0.1875em 0.625em 0.25em; + font-size: 0.875em; + background-color: #2ba6cb; + color: white; } +/* line 77, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_labels.scss */ +.label.radius { + -webkit-border-radius: 3px; + border-radius: 3px; } +/* line 78, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_labels.scss */ +.label.round { + -webkit-border-radius: 1000px; + border-radius: 1000px; } +/* line 80, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_labels.scss */ +.label.alert { + background-color: #c60f13; + color: white; } +/* line 81, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_labels.scss */ +.label.success { + background-color: #5da423; + color: white; } +/* line 82, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_labels.scss */ +.label.secondary { + background-color: #e9e9e9; + color: #333333; } + +/* Inline Lists */ +/* line 49, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_inline-lists.scss */ +.inline-list { + margin: 0 auto 1.0625em auto; + margin-left: -1.375em; + margin-right: 0; + padding: 0; + list-style: none; + overflow: hidden; } +/* line 36, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_inline-lists.scss */ +.inline-list > li { + list-style: none; + float: left; + margin-left: 1.375em; + display: block; } +/* line 41, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_inline-lists.scss */ +.inline-list > li > * { + display: block; } + +/* Default Pagination */ +/* line 128, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_pagination.scss */ +ul.pagination { + display: block; + height: 1.5em; + margin-left: -0.3125em; } +/* line 87, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_pagination.scss */ +ul.pagination li { + height: 1.5em; + color: #222222; + font-size: 0.875em; + margin-left: 0.3125em; } +/* line 93, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_pagination.scss */ +ul.pagination li a { + display: block; + padding: 0.0625em 0.4375em 0.0625em; + color: #999999; } +/* line 100, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_pagination.scss */ +ul.pagination li:hover a, ul.pagination li a:focus { + background: #e6e6e6; } +/* line 45, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_pagination.scss */ +ul.pagination li.unavailable a { + cursor: default; + color: #999999; } +/* line 50, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_pagination.scss */ +ul.pagination li.unavailable:hover a, ul.pagination li.unavailable a:focus { + background: transparent; } +/* line 57, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_pagination.scss */ +ul.pagination li.current a { + background: #2ba6cb; + color: white; + font-weight: bold; + cursor: default; } +/* line 64, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_pagination.scss */ +ul.pagination li.current a:hover, ul.pagination li.current a:focus { + background: #2ba6cb; } +/* line 110, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_pagination.scss */ +ul.pagination li { + float: left; + display: block; } + +/* Pagination centred wrapper */ +/* line 133, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_pagination.scss */ +.pagination-centered { + text-align: center; } +/* line 110, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_pagination.scss */ +.pagination-centered ul.pagination li { + float: none; + display: inline-block; } + +/* Panels */ +/* line 66, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_panels.scss */ +.panel { + border-style: solid; + border-width: 1px; + border-color: #d9d9d9; + margin-bottom: 1.25em; + padding: 1.25em; + background: #f2f2f2; } +/* line 44, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_panels.scss */ +.panel > :first-child { + margin-top: 0; } +/* line 45, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_panels.scss */ +.panel > :last-child { + margin-bottom: 0; } +/* line 50, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_panels.scss */ +.panel h1, .panel h2, .panel h3, .panel h4, .panel h5, .panel h6, .panel p { + color: #333333; } +/* line 54, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_panels.scss */ +.panel h1, .panel h2, .panel h3, .panel h4, .panel h5, .panel h6 { + line-height: 1; + margin-bottom: 0.625em; } +/* line 56, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_panels.scss */ +.panel h1.subheader, .panel h2.subheader, .panel h3.subheader, .panel h4.subheader, .panel h5.subheader, .panel h6.subheader { + line-height: 1.4; } +/* line 68, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_panels.scss */ +.panel.callout { + border-style: solid; + border-width: 1px; + border-color: #2284a1; + margin-bottom: 1.25em; + padding: 1.25em; + background: #2ba6cb; + -webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset; + box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset; } +/* line 44, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_panels.scss */ +.panel.callout > :first-child { + margin-top: 0; } +/* line 45, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_panels.scss */ +.panel.callout > :last-child { + margin-bottom: 0; } +/* line 51, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_panels.scss */ +.panel.callout h1, .panel.callout h2, .panel.callout h3, .panel.callout h4, .panel.callout h5, .panel.callout h6, .panel.callout p { + color: white; } +/* line 54, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_panels.scss */ +.panel.callout h1, .panel.callout h2, .panel.callout h3, .panel.callout h4, .panel.callout h5, .panel.callout h6 { + line-height: 1; + margin-bottom: 0.625em; } +/* line 56, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_panels.scss */ +.panel.callout h1.subheader, .panel.callout h2.subheader, .panel.callout h3.subheader, .panel.callout h4.subheader, .panel.callout h5.subheader, .panel.callout h6.subheader { + line-height: 1.4; } +/* line 71, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_panels.scss */ +.panel.callout a { + color: white; } +/* line 76, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_panels.scss */ +.panel.radius { + -webkit-border-radius: 3px; + border-radius: 3px; } + +/* Pricing Tables */ +/* line 121, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_pricing-tables.scss */ +.pricing-table { + border: solid 1px #dddddd; + margin-left: 0; + margin-bottom: 1.25em; } +/* line 61, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_pricing-tables.scss */ +.pricing-table * { + list-style: none; + line-height: 1; } +/* line 124, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_pricing-tables.scss */ +.pricing-table .title { + background-color: #dddddd; + padding: 0.9375em 1.25em; + text-align: center; + color: #333333; + font-weight: bold; + font-size: 1em; } +/* line 125, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_pricing-tables.scss */ +.pricing-table .price { + background-color: #eeeeee; + padding: 0.9375em 1.25em; + text-align: center; + color: #333333; + font-weight: normal; + font-size: 1.25em; } +/* line 126, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_pricing-tables.scss */ +.pricing-table .description { + background-color: white; + padding: 0.9375em; + text-align: center; + color: #777777; + font-size: 0.75em; + font-weight: normal; + line-height: 1.4; + border-bottom: dotted 1px #dddddd; } +/* line 127, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_pricing-tables.scss */ +.pricing-table .bullet-item { + background-color: white; + padding: 0.9375em; + text-align: center; + color: #333333; + font-size: 0.875em; + font-weight: normal; + border-bottom: dotted 1px #dddddd; } +/* line 128, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_pricing-tables.scss */ +.pricing-table .cta-button { + background-color: whitesmoke; + text-align: center; + padding: 1.25em 1.25em 0; } + +/* Progress Bar */ +/* line 50, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_progress-bars.scss */ +.progress { + background-color: transparent; + height: 1.5625em; + border: 1px solid #cccccc; + padding: 0.125em; + margin-bottom: 0.625em; } +/* line 54, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_progress-bars.scss */ +.progress .meter { + background: #2ba6cb; + height: 100%; + display: block; } +/* line 57, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_progress-bars.scss */ +.progress.secondary .meter { + background: #e9e9e9; + height: 100%; + display: block; } +/* line 58, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_progress-bars.scss */ +.progress.success .meter { + background: #5da423; + height: 100%; + display: block; } +/* line 59, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_progress-bars.scss */ +.progress.alert .meter { + background: #c60f13; + height: 100%; + display: block; } +/* line 61, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_progress-bars.scss */ +.progress.radius { + -webkit-border-radius: 3px; + border-radius: 3px; } +/* line 62, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_progress-bars.scss */ +.progress.radius .meter { + -webkit-border-radius: 2px; + border-radius: 2px; } +/* line 65, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_progress-bars.scss */ +.progress.round { + -webkit-border-radius: 1000px; + border-radius: 1000px; } +/* line 66, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_progress-bars.scss */ +.progress.round .meter { + -webkit-border-radius: 999px; + border-radius: 999px; } + +/* Side Nav */ +/* line 67, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_side-nav.scss */ +.side-nav { + display: block; + margin: 0; + padding: 0.875em 0; + list-style-type: none; + list-style-position: inside; } +/* line 39, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_side-nav.scss */ +.side-nav li { + margin: 0 0 0.4375em 0; + font-size: 0.875em; } +/* line 43, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_side-nav.scss */ +.side-nav li a { + display: block; + color: #2ba6cb; } +/* line 48, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_side-nav.scss */ +.side-nav li.active > a:first-child { + color: #4d4d4d; + font-weight: bold; } +/* line 53, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_side-nav.scss */ +.side-nav li.divider { + border-top: 1px solid; + height: 0; + padding: 0; + list-style: none; + border-top-color: #e6e6e6; } + +/* Side Nav */ +/* line 82, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_sub-nav.scss */ +.sub-nav { + display: block; + width: auto; + overflow: hidden; + margin: -0.25em 0 1.125em; + padding-top: 0.25em; + margin-right: 0; + margin-left: -0.5625em; } +/* line 42, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_sub-nav.scss */ +.sub-nav dt, .sub-nav dd, .sub-nav li { + float: left; + display: inline; + margin-left: 0.5625em; + margin-bottom: 0.625em; + font-weight: normal; + font-size: 0.875em; } +/* line 50, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_sub-nav.scss */ +.sub-nav dt a, .sub-nav dd a, .sub-nav li a { + color: #999999; + text-decoration: none; } +/* line 54, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_sub-nav.scss */ +.sub-nav dt.active a, .sub-nav dd.active a, .sub-nav li.active a { + -webkit-border-radius: 1000px; + border-radius: 1000px; + font-weight: bold; + background: #2ba6cb; + padding: 0.1875em 0.5625em; + cursor: default; + color: white; } + +/* Foundation Switches */ +@media only screen { + /* line 239, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_switch.scss */ + div.switch { + position: relative; + padding: 0; + display: block; + overflow: hidden; + border-style: solid; + border-width: 1px; + margin-bottom: 1.25em; + height: 2.25em; + background: white; + border-color: #cccccc; } + /* line 58, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_switch.scss */ + div.switch label { + position: relative; + left: 0; + z-index: 2; + float: left; + width: 50%; + height: 100%; + margin: 0; + font-weight: bold; + text-align: left; + -webkit-transition: all 0.1s ease-out; + -moz-transition: all 0.1s ease-out; + transition: all 0.1s ease-out; } + /* line 75, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_switch.scss */ + div.switch input { + position: absolute; + z-index: 3; + opacity: 0; + width: 100%; + height: 100%; + -moz-appearance: none; } + /* line 85, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_switch.scss */ + div.switch input:hover, div.switch input:focus { + cursor: pointer; } + /* line 91, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_switch.scss */ + div.switch span:last-child { + position: absolute; + top: -1px; + left: -1px; + z-index: 1; + display: block; + padding: 0; + border-width: 1px; + border-style: solid; + -webkit-transition: all 0.1s ease-out; + -moz-transition: all 0.1s ease-out; + transition: all 0.1s ease-out; } + /* line 106, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_switch.scss */ + div.switch input:not(:checked) + label { + opacity: 0; } + /* line 109, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_switch.scss */ + div.switch input:checked { + display: none !important; } + /* line 110, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_switch.scss */ + div.switch input { + left: 0; + display: block !important; } + /* line 114, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_switch.scss */ + div.switch input:first-of-type + label, div.switch input:first-of-type + span + label { + left: -50%; } + /* line 116, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_switch.scss */ + div.switch input:first-of-type:checked + label, div.switch input:first-of-type:checked + span + label { + left: 0%; } + /* line 120, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_switch.scss */ + div.switch input:last-of-type + label, div.switch input:last-of-type + span + label { + right: -50%; + left: auto; + text-align: right; } + /* line 122, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_switch.scss */ + div.switch input:last-of-type:checked + label, div.switch input:last-of-type:checked + span + label { + right: 0%; + left: auto; } + /* line 125, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_switch.scss */ + div.switch span.custom { + display: none !important; } + /* line 137, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_switch.scss */ + form.custom div.switch .hidden-field { + margin-left: auto; + position: absolute; + visibility: visible; } + /* line 149, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_switch.scss */ + div.switch label { + padding: 0; + line-height: 2.3em; + font-size: 0.875em; } + /* line 157, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_switch.scss */ + div.switch input:first-of-type:checked ~ span:last-child { + left: 100%; + margin-left: -2.1875em; } + /* line 163, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_switch.scss */ + div.switch span:last-child { + width: 2.25em; + height: 2.25em; } + /* line 177, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_switch.scss */ + div.switch span:last-child { + border-color: #b3b3b3; + background: white; + background: -moz-linear-gradient(top, white 0%, #f2f2f2 100%); + background: -webkit-linear-gradient(top, white 0%, #f2f2f2 100%); + background: linear-gradient(to bottom, #ffffff 0%, #f2f2f2 100%); + -webkit-box-shadow: 2px 0 10px 0 rgba(0, 0, 0, 0.07), 1000px 0 0 1000px #e1f5d1, -2px 0 10px 0 rgba(0, 0, 0, 0.07), -1000px 0 0 1000px whitesmoke; + box-shadow: 2px 0 10px 0 rgba(0, 0, 0, 0.07), 1000px 0 0 980px #e1f5d1, -2px 0 10px 0 rgba(0, 0, 0, 0.07), -1000px 0 0 1000px whitesmoke; } + /* line 201, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_switch.scss */ + div.switch:hover span:last-child, div.switch:focus span:last-child { + background: white; + background: -moz-linear-gradient(top, white 0%, #e6e6e6 100%); + background: -webkit-linear-gradient(top, white 0%, #e6e6e6 100%); + background: linear-gradient(to bottom, #ffffff 0%, #e6e6e6 100%); } + /* line 211, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_switch.scss */ + div.switch:active { + background: transparent; } + /* line 243, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_switch.scss */ + div.switch.large { + height: 2.75em; } + /* line 149, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_switch.scss */ + div.switch.large label { + padding: 0; + line-height: 2.3em; + font-size: 1.0625em; } + /* line 157, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_switch.scss */ + div.switch.large input:first-of-type:checked ~ span:last-child { + left: 100%; + margin-left: -2.6875em; } + /* line 163, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_switch.scss */ + div.switch.large span:last-child { + width: 2.75em; + height: 2.75em; } + /* line 246, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_switch.scss */ + div.switch.small { + height: 1.75em; } + /* line 149, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_switch.scss */ + div.switch.small label { + padding: 0; + line-height: 2.1em; + font-size: 0.75em; } + /* line 157, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_switch.scss */ + div.switch.small input:first-of-type:checked ~ span:last-child { + left: 100%; + margin-left: -1.6875em; } + /* line 163, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_switch.scss */ + div.switch.small span:last-child { + width: 1.75em; + height: 1.75em; } + /* line 249, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_switch.scss */ + div.switch.tiny { + height: 1.375em; } + /* line 149, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_switch.scss */ + div.switch.tiny label { + padding: 0; + line-height: 1.9em; + font-size: 0.6875em; } + /* line 157, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_switch.scss */ + div.switch.tiny input:first-of-type:checked ~ span:last-child { + left: 100%; + margin-left: -1.3125em; } + /* line 163, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_switch.scss */ + div.switch.tiny span:last-child { + width: 1.375em; + height: 1.375em; } + /* line 252, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_switch.scss */ + div.switch.radius { + -webkit-border-radius: 4px; + border-radius: 4px; } + /* line 253, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_switch.scss */ + div.switch.radius span:last-child { + -webkit-border-radius: 3px; + border-radius: 3px; } + /* line 257, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_switch.scss */ + div.switch.round { + -webkit-border-radius: 1000px; + border-radius: 1000px; } + /* line 258, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_switch.scss */ + div.switch.round span:last-child { + -webkit-border-radius: 999px; + border-radius: 999px; } + /* line 259, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_switch.scss */ + div.switch.round label { + padding: 0 0.5625em; } + + @-webkit-keyframes webkitSiblingBugfix { + /* line 264, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_switch.scss */ + from { + position: relative; } + + /* line 264, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_switch.scss */ + to { + position: relative; } } } +@media only screen and (-webkit-min-device-pixel-ratio: 0) and (max-device-width: 480px) { + /* line 239, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_switch.scss */ + div.switch { + -webkit-animation: webkitSiblingBugfix infinite 1s; } } +@media only screen and (-webkit-min-device-pixel-ratio: 1.5) { + /* line 239, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_switch.scss */ + div.switch { + -webkit-animation: none 0; } } +/* line 11, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_magellan.scss */ +[data-magellan-expedition] { + background: white; + z-index: 50; + min-width: 100%; + padding: 10px; } +/* line 17, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_magellan.scss */ +[data-magellan-expedition] .sub-nav { + margin-bottom: 0; } +/* line 19, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_magellan.scss */ +[data-magellan-expedition] .sub-nav dd { + margin-bottom: 0; } + +/* Tables */ +/* line 80, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_tables.scss */ +table { + background: white; + margin-bottom: 1.25em; + border: solid 1px #dddddd; } +/* line 42, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_tables.scss */ +table thead, table tfoot { + background: whitesmoke; + font-weight: bold; } +/* line 48, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_tables.scss */ +table thead tr th, table thead tr td, table tfoot tr th, table tfoot tr td { + padding: 0.5em 0.625em 0.625em; + font-size: 0.875em; + color: #222222; + text-align: left; } +/* line 59, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_tables.scss */ +table tr th, table tr td { + padding: 0.5625em 0.625em; + font-size: 0.875em; + color: #222222; } +/* line 67, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_tables.scss */ +table tr.even, table tr.alt, table tr:nth-of-type(even) { + background: #f9f9f9; } +/* line 74, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_tables.scss */ +table thead tr th, table tfoot tr th, table tbody tr td, table tr td, table tfoot tr td { + display: table-cell; + line-height: 1.125em; } + +/* Image Thumbnails */ +/* line 45, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_thumbs.scss */ +.th { + line-height: 0; + display: inline-block; + border: solid 4px white; + -webkit-box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2); + box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2); + -webkit-transition: all 200ms ease-out; + -moz-transition: all 200ms ease-out; + transition: all 200ms ease-out; } +/* line 32, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_thumbs.scss */ +.th:hover, .th:focus { + -webkit-box-shadow: 0 0 6px 1px rgba(43, 166, 203, 0.5); + box-shadow: 0 0 6px 1px rgba(43, 166, 203, 0.5); } +/* line 49, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_thumbs.scss */ +.th.radius { + -webkit-border-radius: 3px; + border-radius: 3px; } + +/* line 51, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_thumbs.scss */ +a.th { + display: inline-block; + max-width: 100%; } + +/* Tooltips */ +/* line 29, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_tooltips.scss */ +.has-tip { + border-bottom: dotted 1px #cccccc; + cursor: help; + font-weight: bold; + color: #333333; } +/* line 36, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_tooltips.scss */ +.has-tip:hover, .has-tip:focus { + border-bottom: dotted 1px #196177; + color: #2ba6cb; } +/* line 42, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_tooltips.scss */ +.has-tip.tip-left, .has-tip.tip-right { + float: none !important; } + +/* line 45, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_tooltips.scss */ +.tooltip { + display: none; + position: absolute; + z-index: 999; + font-weight: bold; + font-size: 0.9375em; + line-height: 1.3; + padding: 0.5em; + max-width: 85%; + left: 50%; + width: 100%; + color: white; + background: black; + -webkit-border-radius: 3px; + border-radius: 3px; } +/* line 60, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_tooltips.scss */ +.tooltip > .nub { + display: block; + left: 5px; + position: absolute; + width: 0; + height: 0; + border: solid 5px; + border-color: transparent transparent black transparent; + top: -10px; } +/* line 71, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_tooltips.scss */ +.tooltip.opened { + color: #2ba6cb !important; + border-bottom: dotted 1px #196177 !important; } + +/* line 77, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_tooltips.scss */ +.tap-to-close { + display: block; + font-size: 0.625em; + color: #888888; + font-weight: normal; } + +@media only screen and (min-width: 768px) { + /* line 86, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_tooltips.scss */ + .tooltip > .nub { + border-color: transparent transparent black transparent; + top: -10px; } + /* line 90, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_tooltips.scss */ + .tooltip.tip-top > .nub { + border-color: black transparent transparent transparent; + top: auto; + bottom: -10px; } + /* line 97, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_tooltips.scss */ + .tooltip.tip-left, .tooltip.tip-right { + float: none !important; } + /* line 99, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_tooltips.scss */ + .tooltip.tip-left > .nub { + border-color: transparent transparent transparent black; + right: -10px; + left: auto; + top: 50%; + margin-top: -5px; } + /* line 106, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_tooltips.scss */ + .tooltip.tip-right > .nub { + border-color: transparent black transparent transparent; + right: auto; + left: -10px; + top: 50%; + margin-top: -5px; } } +@media only screen and (max-width: 767px) { + /* line 128, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_dropdown.scss */ + .f-dropdown { + max-width: 100%; + left: 0; } } +/* Foundation Dropdowns */ +/* line 135, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_dropdown.scss */ +.f-dropdown { + position: absolute; + top: -9999px; + list-style: none; + margin-left: 0; + width: 100%; + max-height: none; + height: auto; + background: white; + border: solid 1px #cccccc; + font-size: 16px; + z-index: 99; + margin-top: 2px; + max-width: 200px; } +/* line 50, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_dropdown.scss */ +.f-dropdown > *:first-child { + margin-top: 0; } +/* line 51, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_dropdown.scss */ +.f-dropdown > *:last-child { + margin-bottom: 0; } +/* line 76, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_dropdown.scss */ +.f-dropdown:before { + content: ""; + display: block; + width: 0; + height: 0; + border: inset 6px; + border-color: transparent transparent white transparent; + border-bottom-style: solid; + position: absolute; + top: -12px; + left: 10px; + z-index: 99; } +/* line 83, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_dropdown.scss */ +.f-dropdown:after { + content: ""; + display: block; + width: 0; + height: 0; + border: inset 7px; + border-color: transparent transparent #cccccc transparent; + border-bottom-style: solid; + position: absolute; + top: -14px; + left: 9px; + z-index: 98; } +/* line 91, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_dropdown.scss */ +.f-dropdown.right:before { + left: auto; + right: 10px; } +/* line 95, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_dropdown.scss */ +.f-dropdown.right:after { + left: auto; + right: 9px; } +/* line 139, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_dropdown.scss */ +.f-dropdown li { + font-size: 0.875em; + cursor: pointer; + line-height: 1.125em; + margin: 0; } +/* line 115, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_dropdown.scss */ +.f-dropdown li:hover, .f-dropdown li:focus { + background: #eeeeee; } +/* line 117, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_dropdown.scss */ +.f-dropdown li a { + display: block; + padding: 0.5em; + color: #555555; } +/* line 142, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_dropdown.scss */ +.f-dropdown.content { + position: absolute; + top: -9999px; + list-style: none; + margin-left: 0; + padding: 1.25em; + width: 100%; + height: auto; + max-height: none; + background: white; + border: solid 1px #cccccc; + font-size: 16px; + z-index: 99; + max-width: 200px; } +/* line 50, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_dropdown.scss */ +.f-dropdown.content > *:first-child { + margin-top: 0; } +/* line 51, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_dropdown.scss */ +.f-dropdown.content > *:last-child { + margin-bottom: 0; } +/* line 145, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_dropdown.scss */ +.f-dropdown.tiny { + max-width: 200px; } +/* line 146, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_dropdown.scss */ +.f-dropdown.small { + max-width: 300px; } +/* line 147, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_dropdown.scss */ +.f-dropdown.medium { + max-width: 500px; } +/* line 148, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_dropdown.scss */ +.f-dropdown.large { + max-width: 800px; } + +/* line 59, /home/aslak/dev/source/javaee/javaee-samples.github.io/stylesheets/app.scss */ +.top-bar { + border-bottom: 3px solid #7AA8BF; + background-color: #071720; + height: 48px; } + +/* line 65, /home/aslak/dev/source/javaee/javaee-samples.github.io/stylesheets/app.scss */ +.top-bar-section, .top-bar-section ul, .top-bar-section li a { + background-color: #071720 !important; } + +/* line 69, /home/aslak/dev/source/javaee/javaee-samples.github.io/stylesheets/app.scss */ +.container > header { + background-color: #155C72; + border-bottom: 2px solid #C3CFDB; + margin-bottom: 10px; } + +/* line 75, /home/aslak/dev/source/javaee/javaee-samples.github.io/stylesheets/app.scss */ +.container > header .sub { + background-color: #7AA8BF; + width: 100%; } + +/* line 80, /home/aslak/dev/source/javaee/javaee-samples.github.io/stylesheets/app.scss */ +.sub { + padding-top: 5px; } + +/* line 83, /home/aslak/dev/source/javaee/javaee-samples.github.io/stylesheets/app.scss */ +.sub ul { + margin-top: 5px; } + +/* line 87, /home/aslak/dev/source/javaee/javaee-samples.github.io/stylesheets/app.scss */ +.sub a { + color: #071720; + font-weight: bold; } + +/* line 93, /home/aslak/dev/source/javaee/javaee-samples.github.io/stylesheets/app.scss */ +.sub .specifications ul { + margin-right: .5em; } + +/* line 98, /home/aslak/dev/source/javaee/javaee-samples.github.io/stylesheets/app.scss */ +.sub .contributors ul { + margin-right: .5em; + float: right; } + +/* line 103, /home/aslak/dev/source/javaee/javaee-samples.github.io/stylesheets/app.scss */ +.sub .contributors li { + margin-left: .5em; } + +/* line 107, /home/aslak/dev/source/javaee/javaee-samples.github.io/stylesheets/app.scss */ +.container > header h1, .container > header h2 { + color: #C3CFDB; } + +/* line 111, /home/aslak/dev/source/javaee/javaee-samples.github.io/stylesheets/app.scss */ +footer { + border-top: 3px solid #7AA8BF; + background-color: #071720; + color: #C3CFDB; + margin-top: 2em; } + +/* line 118, /home/aslak/dev/source/javaee/javaee-samples.github.io/stylesheets/app.scss */ +pre.highlight { + margin-top: 1em; + margin-bottom: 1em; } + +/* line 123, /home/aslak/dev/source/javaee/javaee-samples.github.io/stylesheets/app.scss */ +pre.highlight code { + padding: 15px; } + +/* line 127, /home/aslak/dev/source/javaee/javaee-samples.github.io/stylesheets/app.scss */ +.action .button { + margin-top: .80em; } + +/* line 131, /home/aslak/dev/source/javaee/javaee-samples.github.io/stylesheets/app.scss */ +.changes ul { + margin-left: 1.3em; } + +/* line 135, /home/aslak/dev/source/javaee/javaee-samples.github.io/stylesheets/app.scss */ +.changes li { + list-style-type: square; } + +/* line 139, /home/aslak/dev/source/javaee/javaee-samples.github.io/stylesheets/app.scss */ +.improve { + height: 40px; + font-weight: bold; + margin-top: 1em; + margin-bottom: 1em; + padding: 5px; + border: 1px solid #eee; + background-color: #FF2400; } + +/* line 148, /home/aslak/dev/source/javaee/javaee-samples.github.io/stylesheets/app.scss */ +.improve a { + color: #071720; + font-weight: bold; + padding: 5px; + background-color: #7AA8BF; } + +/* line 155, /home/aslak/dev/source/javaee/javaee-samples.github.io/stylesheets/app.scss */ +.sample { + margin-bottom: 1em; } + +/* line 159, /home/aslak/dev/source/javaee/javaee-samples.github.io/stylesheets/app.scss */ +ul.unstyled { + list-style: none; } + +/* line 163, /home/aslak/dev/source/javaee/javaee-samples.github.io/stylesheets/app.scss */ +ul.contributors { + list-style: none; + padding: 0; + margin: .5em 0 2em 0; } +/* line 167, /home/aslak/dev/source/javaee/javaee-samples.github.io/stylesheets/app.scss */ +ul.contributors > li { + margin-bottom: 2em; + display: block; + *zoom: 1; + line-height: 1.4; } +/* line 121, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_global.scss */ +ul.contributors > li:before, ul.contributors > li:after { + content: " "; + display: table; } +/* line 122, /home/aslak/.rvm/gems/jruby-1.7.17@javaee-samples/gems/zurb-foundation-4.3.2/scss/foundation/components/_global.scss */ +ul.contributors > li:after { + clear: both; } +/* line 172, /home/aslak/dev/source/javaee/javaee-samples.github.io/stylesheets/app.scss */ +ul.contributors > li:nth-of-type(3n+1) { + clear: left; } +/* line 177, /home/aslak/dev/source/javaee/javaee-samples.github.io/stylesheets/app.scss */ +ul.contributors > li .photo { + float: left; + position: relative; + margin-right: 10px; + overflow: hidden; + cursor: pointer; } +/* line 187, /home/aslak/dev/source/javaee/javaee-samples.github.io/stylesheets/app.scss */ +ul.contributors > li .photo img { + display: block; } +/* line 191, /home/aslak/dev/source/javaee/javaee-samples.github.io/stylesheets/app.scss */ +ul.contributors > li .photo ul { + margin: 0 4px; + font-size: 0.9em; + padding: 0; + position: absolute; + height: 0px; + width: 140px; + left: 0; + bottom: 3px; + background-color: #000; + list-style: none; + text-align: center; + overflow-y: hidden; } +/* line 207, /home/aslak/dev/source/javaee/javaee-samples.github.io/stylesheets/app.scss */ +ul.contributors > li .photo ul li { + font-size: 0.95em; + display: inline; + padding: 0 2px; } +/* line 219, /home/aslak/dev/source/javaee/javaee-samples.github.io/stylesheets/app.scss */ +ul.contributors > li .photo:hover ul { + height: 24px; } +/* line 223, /home/aslak/dev/source/javaee/javaee-samples.github.io/stylesheets/app.scss */ +ul.contributors > li h3 { + margin-bottom: .15em; } +/* line 226, /home/aslak/dev/source/javaee/javaee-samples.github.io/stylesheets/app.scss */ +ul.contributors > li strong, ul.contributors > li em { + display: block; } +/* line 230, /home/aslak/dev/source/javaee/javaee-samples.github.io/stylesheets/app.scss */ +ul.contributors + p { + clear: left; } +/* line 233, /home/aslak/dev/source/javaee/javaee-samples.github.io/stylesheets/app.scss */ +ul.contributors + p strong { + display: block; } + +/* line 242, /home/aslak/dev/source/javaee/javaee-samples.github.io/stylesheets/app.scss */ +.ulist, .colist { + margin-left: 2em; } + +/* line 246, /home/aslak/dev/source/javaee/javaee-samples.github.io/stylesheets/app.scss */ +.ulist p, .colist p { + margin-bottom: 0em; } diff --git a/stylesheets/app.scss b/stylesheets/app.scss deleted file mode 100644 index bb7b942..0000000 --- a/stylesheets/app.scss +++ /dev/null @@ -1,248 +0,0 @@ -// Global Foundation Settings -@import "settings"; - -// Comment out this import if you don't want to use normalize -@import "normalize"; - -// Comment out this import if you are customizing you imports below -@import "foundation"; - -// Import specific parts of Foundation by commenting the import "foundation" -// and uncommenting what you want below. You must uncomment the following if customizing - -// @import "foundation/components/global"; // *always required -// @import "foundation/components/grid"; - -// -// Use this grid if you want to start using the new Foundation 5 grid early. -// It will change breakpoints to min-width: 640px and 1024px. -// -// @import "foundation/components/grid-5"; -// - -// @import "foundation/components/visibility"; -// @import "foundation/components/block-grid"; -// @import "foundation/components/type"; -// @import "foundation/components/buttons"; -// @import "foundation/components/forms"; // *requires components/buttons -// @import "foundation/components/custom-forms"; // *requires components/buttons, components/forms -// @import "foundation/components/button-groups"; // *requires components/buttons -// @import "foundation/components/dropdown-buttons"; // *requires components/buttons -// @import "foundation/components/split-buttons"; // *requires components/buttons -// @import "foundation/components/flex-video"; -// @import "foundation/components/section"; -// @import "foundation/components/top-bar"; // *requires components/grid -// @import "foundation/components/orbit"; -// @import "foundation/components/reveal"; -// @import "foundation/components/joyride"; -// @import "foundation/components/clearing"; -// @import "foundation/components/alert-boxes"; -// @import "foundation/components/breadcrumbs"; -// @import "foundation/components/keystrokes"; -// @import "foundation/components/labels"; -// @import "foundation/components/inline-lists"; -// @import "foundation/components/pagination"; -// @import "foundation/components/panels"; -// @import "foundation/components/pricing-tables"; -// @import "foundation/components/progress-bars"; -// @import "foundation/components/side-nav"; -// @import "foundation/components/sub-nav"; -// @import "foundation/components/switch"; -// @import "foundation/components/magellan"; -// @import "foundation/components/tables"; -// @import "foundation/components/thumbs"; -// @import "foundation/components/tooltips"; -// @import "foundation/components/dropdown"; - -// based on http://www.colourlovers.com/palette/3197411/Moon_Tattoo - -.top-bar { - border-bottom: 3px solid #7AA8BF; - background-color: #071720; - height: $topbar-height + 3px; -} - -.top-bar-section, .top-bar-section ul, .top-bar-section li a { - background-color: #071720 !important; -} - -.container > header { - background-color: #155C72; - border-bottom: 2px solid #C3CFDB; - margin-bottom: 10px; -} - -.container > header .sub { - background-color: #7AA8BF; - width: 100%; -} - -.sub { - padding-top:5px; -} -.sub ul { - margin-top: 5px; -} - -.sub a { - color: #071720; - font-weight: bold; -} - -.sub .specifications { - ul { - margin-right: .5em; - } -} - -.sub .contributors ul { - margin-right: .5em; - float: right; -} - -.sub .contributors li { - margin-left: .5em; -} - -.container > header h1, .container > header h2 { - color: #C3CFDB; -} - -footer { - border-top: 3px solid #7AA8BF; - background-color: #071720; - color: #C3CFDB; - margin-top: 2em; -} - -pre.highlight { - margin-top: 1em; - margin-bottom: 1em; -} - -pre.highlight code { - padding: 15px; -} - -.action .button { - margin-top: .80em; -} - -.changes ul { - margin-left: 1.3em; -} - -.changes li { - list-style-type: square; -} - -.improve { - height: 40px; - font-weight: bold; - margin-top: 1em; - margin-bottom: 1em; - padding: 5px; - border: 1px solid #eee; - background-color: #FF2400; -} -.improve a { - color: #071720; - font-weight: bold; - padding: 5px; - background-color: #7AA8BF; -} - -.sample { - margin-bottom: 1em; -} - -ul.unstyled { - list-style: none; -} - -ul.contributors { - list-style: none; - padding: 0; - margin: .5em 0 2em 0; - & > li { - //@include span(4); - margin-bottom: 2em; - display: block; - @include clearfix; - &:nth-of-type(3n+1) { - //@include first; - clear: left; - } - line-height: 1.4; - .photo { - float: left; - position: relative; - margin-right: 10px; - overflow: hidden; - //@extend .thumbnail; - cursor: pointer; - //&:hover { - // border-color: $link_color; - //} - img { - display: block; - //@include square(140px); - } - ul { - margin: 0 4px; - font-size: 0.9em; - padding: 0; - position: absolute; - height: 0px; - width: 140px; // 100% doesn't work here - left: 0; - bottom: 3px; - //@include single-transition(height, .4s, ease-in-out); - background-color: #000; - list-style: none; - text-align: center; - //border-top: 1px solid $light_border; - //@include single-box-shadow($palette_white_50trans, 0, 1px, 0, 0, inset); - overflow-y: hidden; - li { - font-size: 0.95em; - display: inline; - padding: 0 2px; - a { - //color: $palette_white; - } - span { - //color: $palette_40gray; - } - } - } - &:hover ul { - height: 24px; - } - } - h3 { - margin-bottom: .15em; - } - strong, em { - display: block; - } - } - & + p { - clear: left; - //@extend .well; - strong { - display: block; - } - } -} - - -// AsciiDoc Rendering styles - -.ulist, .colist { - margin-left: 2em; -} - -.ulist p, .colist p { - margin-bottom: 0em; -} \ No newline at end of file