├── showcase
├── access-control
│ └── src
│ │ └── main
│ │ ├── java
│ │ └── .gitkeep
│ │ ├── resources
│ │ ├── .gitkeep
│ │ └── META-INF
│ │ │ ├── forge.xml
│ │ │ ├── MANIFEST.MF
│ │ │ └── services
│ │ │ └── org.ocpsoft.rewrite.config.ConfigurationProvider
│ │ └── webapp
│ │ ├── index.html
│ │ ├── favicon.ico
│ │ ├── resources
│ │ ├── bkg.gif
│ │ ├── favicon.ico
│ │ ├── forge-logo.png
│ │ └── jboss-community.png
│ │ ├── images
│ │ └── jbosscorp_logo.png
│ │ └── WEB-INF
│ │ ├── beans.xml
│ │ └── faces-config.xml
├── rest-ws
│ └── src
│ │ └── main
│ │ ├── resources
│ │ └── META-INF
│ │ │ ├── forge.xml
│ │ │ ├── MANIFEST.MF
│ │ │ └── services
│ │ │ └── org.ocpsoft.rewrite.config.ConfigurationProvider
│ │ ├── webapp
│ │ ├── favicon.ico
│ │ └── WEB-INF
│ │ │ ├── beans.xml
│ │ │ ├── faces-config.xml
│ │ │ └── web.xml
│ │ └── java
│ │ └── org
│ │ └── ocpsoft
│ │ └── rewrite
│ │ └── showcase
│ │ └── rest
│ │ └── IntegerConstraint.java
├── composite-query
│ └── src
│ │ └── main
│ │ ├── resources
│ │ └── META-INF
│ │ │ ├── forge.xml
│ │ │ └── services
│ │ │ └── org.ocpsoft.rewrite.config.ConfigurationProvider
│ │ └── webapp
│ │ ├── bkg.gif
│ │ ├── favicon.ico
│ │ ├── forge-logo.png
│ │ ├── resources
│ │ ├── bkg.gif
│ │ ├── favicon.ico
│ │ ├── forge-logo.png
│ │ └── jboss-community.png
│ │ ├── jboss-community.png
│ │ └── WEB-INF
│ │ └── faces-config.xml
├── transform
│ └── src
│ │ └── main
│ │ ├── webapp
│ │ ├── common
│ │ │ └── common.css
│ │ ├── textile
│ │ │ └── index.textile
│ │ ├── sass
│ │ │ └── style.scss
│ │ ├── WEB-INF
│ │ │ └── web.xml
│ │ ├── less
│ │ │ └── style.less
│ │ └── markdown
│ │ │ └── index.md
│ │ └── resources
│ │ └── META-INF
│ │ └── services
│ │ └── org.ocpsoft.rewrite.config.ConfigurationProvider
└── bookstore
│ └── src
│ └── main
│ ├── webapp
│ ├── images
│ │ ├── book.jpg
│ │ ├── led_green.png
│ │ └── led_orange.png
│ ├── WEB-INF
│ │ ├── beans.xml
│ │ └── faces-config.xml
│ └── home.xhtml
│ └── resources
│ └── images
│ ├── 9780670025480.jpg
│ └── 9781612184838.jpg
├── integration-faces-tests
└── src
│ └── test
│ ├── resources
│ ├── outbound-resource.css
│ ├── faces-config.xml
│ ├── navigate-before-restoreview.xhtml
│ ├── outbound-js-void.xhtml
│ ├── convert-simple.xhtml
│ ├── outbound-resource.xhtml
│ ├── error-web.xml
│ ├── actionurl-page1.xhtml
│ ├── action-phases.xhtml
│ ├── actionurl-page2.xhtml
│ ├── error-page.xhtml
│ ├── binding-phases.xhtml
│ ├── outbound-special-cases.xhtml
│ ├── action-postback.xhtml
│ ├── binding-postback.xhtml
│ ├── jsessionid.xhtml
│ └── navigate-encoding.xhtml
│ └── java
│ └── org
│ └── ocpsoft
│ └── rewrite
│ └── faces
│ └── NavigateBeforeRestoreViewBean.java
├── transform-markup
├── src
│ └── main
│ │ └── resources
│ │ └── ruby
│ │ ├── sass
│ │ ├── VERSION
│ │ ├── VERSION_NAME
│ │ ├── VERSION_DATE
│ │ └── lib
│ │ │ └── sass
│ │ │ ├── util
│ │ │ └── test.rb
│ │ │ ├── tree
│ │ │ ├── content_node.rb
│ │ │ ├── while_node.rb
│ │ │ ├── warn_node.rb
│ │ │ ├── debug_node.rb
│ │ │ ├── return_node.rb
│ │ │ ├── charset_node.rb
│ │ │ ├── each_node.rb
│ │ │ ├── variable_node.rb
│ │ │ ├── root_node.rb
│ │ │ └── for_node.rb
│ │ │ ├── logger.rb
│ │ │ ├── root.rb
│ │ │ ├── railtie.rb
│ │ │ ├── cache_stores.rb
│ │ │ ├── script
│ │ │ ├── bool.rb
│ │ │ ├── css_lexer.rb
│ │ │ ├── null.rb
│ │ │ └── css_parser.rb
│ │ │ ├── scss
│ │ │ ├── script_lexer.rb
│ │ │ └── script_parser.rb
│ │ │ ├── scss.rb
│ │ │ ├── cache_stores
│ │ │ └── null.rb
│ │ │ ├── plugin
│ │ │ └── generic.rb
│ │ │ ├── logger
│ │ │ └── base.rb
│ │ │ └── importers.rb
│ │ ├── maruku
│ │ └── lib
│ │ │ └── maruku
│ │ │ ├── textile2.rb
│ │ │ ├── ext
│ │ │ └── math
│ │ │ │ ├── mathml_engines
│ │ │ │ ├── none.rb
│ │ │ │ └── ritex.rb
│ │ │ │ └── elements.rb
│ │ │ ├── maruku.rb
│ │ │ ├── output
│ │ │ ├── to_s.rb
│ │ │ └── entity_table.rb
│ │ │ └── version.rb
│ │ ├── asciidoctor
│ │ └── lib
│ │ │ └── asciidoctor
│ │ │ ├── version.rb
│ │ │ └── debug.rb
│ │ └── redcloth
│ │ └── lib
│ │ ├── redcloth_scan.jar
│ │ ├── case_sensitive_require
│ │ └── RedCloth.rb
│ │ ├── tasks
│ │ └── pureruby.rake
│ │ └── redcloth
│ │ ├── erb_extension.rb
│ │ └── version.rb
└── download-gems.sh
├── api-tests
└── src
│ ├── test
│ ├── resources
│ │ ├── bundle_en.properties
│ │ └── bundle_fr.properties
│ ├── webapp
│ │ ├── search.xhtml
│ │ └── WEB-INF
│ │ │ └── web.xml
│ └── java
│ │ └── org
│ │ └── ocpsoft
│ │ └── rewrite
│ │ ├── config
│ │ ├── NullValueConfigurationProvider.java
│ │ ├── RewriteFilterInvalidRewriteType.java
│ │ ├── ConfigurationCacheProviderMock.java
│ │ ├── ConfigurationCacheProviderConfig1.java
│ │ └── RewriteFilterInvalidRewriteProvider.java
│ │ ├── Root.java
│ │ └── test
│ │ └── MockRewriteContext.java
│ └── META-INF
│ └── MANIFEST.MF
├── api
└── src
│ ├── META-INF
│ └── MANIFEST.MF
│ ├── main
│ └── java
│ │ └── org
│ │ └── ocpsoft
│ │ └── rewrite
│ │ ├── config
│ │ ├── NoOp.java
│ │ ├── ConfigurationRuleBuilderWithMetadata.java
│ │ └── RuleMetadata.java
│ │ ├── param
│ │ ├── ParameterizedRule.java
│ │ ├── ParameterConfigurator.java
│ │ └── Parameters.java
│ │ └── util
│ │ └── Visitor.java
│ └── test
│ └── java
│ └── org
│ └── ocpsoft
│ └── rewrite
│ └── Root.java
├── config-servlet
└── src
│ ├── test
│ ├── resources
│ │ ├── bundle_en.properties
│ │ └── bundle_fr.properties
│ └── java
│ │ └── org
│ │ └── ocpsoft
│ │ └── rewrite
│ │ └── servlet
│ │ └── config
│ │ ├── ConfigRoot.java
│ │ └── JaasRolesTestProvider.java
│ └── main
│ └── resources
│ └── META-INF
│ └── services
│ └── org.ocpsoft.rewrite.servlet.spi.RewriteLifecycleListener
├── impl-servlet-tests
├── src
│ └── test
│ │ ├── resources
│ │ └── org
│ │ │ └── ocpsoft
│ │ │ └── rewrite
│ │ │ └── servlet
│ │ │ ├── container
│ │ │ ├── home.html
│ │ │ ├── login-fail.html
│ │ │ └── login.html
│ │ │ └── wrapper
│ │ │ └── forward.jsp
│ │ └── java
│ │ └── org
│ │ └── ocpsoft
│ │ └── rewrite
│ │ └── servlet
│ │ ├── wrapper
│ │ ├── ResponseToLowercase.java
│ │ └── ResponseToLowercaseWord.java
│ │ └── ServletRoot.java
└── README.md
├── .mvn
└── wrapper
│ └── maven-wrapper.jar
├── NOTICE
├── api-el
└── src
│ └── main
│ └── resources
│ └── META-INF
│ └── services
│ └── org.ocpsoft.rewrite.el.spi.BeanNameResolver
├── integration-cdi
└── src
│ ├── main
│ ├── resources
│ │ └── META-INF
│ │ │ ├── services
│ │ │ ├── org.ocpsoft.common.spi.ServiceEnricher
│ │ │ ├── org.ocpsoft.common.spi.ServiceLocator
│ │ │ ├── org.ocpsoft.rewrite.el.spi.BeanNameResolver
│ │ │ ├── org.ocpsoft.rewrite.spi.RewriteProvider
│ │ │ ├── org.ocpsoft.rewrite.el.spi.ExpressionLanguageProvider
│ │ │ ├── org.ocpsoft.rewrite.servlet.spi.RequestCycleWrapper
│ │ │ ├── org.ocpsoft.rewrite.servlet.spi.RewriteLifecycleListener
│ │ │ └── org.ocpsoft.rewrite.cdi.spi.BeanManagerProvider
│ │ │ └── beans.xml
│ └── java
│ │ └── org
│ │ └── ocpsoft
│ │ └── rewrite
│ │ └── cdi
│ │ └── util
│ │ └── WildcardTypeImpl.java
│ └── test
│ └── java
│ └── org
│ └── ocpsoft
│ └── rewrite
│ └── cdi
│ ├── bridge
│ └── MockBean.java
│ └── CDIRoot.java
├── impl
├── src
│ └── main
│ │ ├── resources
│ │ └── META-INF
│ │ │ └── services
│ │ │ ├── org.ocpsoft.rewrite.spi.ConverterProvider
│ │ │ ├── org.ocpsoft.rewrite.spi.InstanceProvider
│ │ │ ├── org.ocpsoft.rewrite.spi.ValidatorProvider
│ │ │ └── org.ocpsoft.rewrite.spi.GlobalParameterProvider
│ │ └── java
│ │ └── org
│ │ └── ocpsoft
│ │ └── rewrite
│ │ └── instance
│ │ └── DefaultInstanceProvider.java
├── pom.xml
└── README.md
├── security-integration-shiro
└── src
│ ├── test
│ ├── resources
│ │ ├── shiro.ini
│ │ └── protected-page.xhtml
│ └── java
│ │ └── org
│ │ └── ocpsoft
│ │ └── rewrite
│ │ └── security
│ │ └── shiro
│ │ ├── AdminPageBean.java
│ │ └── ShiroTestRealm.java
│ └── main
│ ├── resources
│ └── META-INF
│ │ └── services
│ │ └── org.ocpsoft.rewrite.annotation.spi.AnnotationHandler
│ └── java
│ └── org
│ └── ocpsoft
│ └── rewrite
│ └── security
│ └── shiro
│ └── ShiroRoleRequired.java
├── integration-spring
└── src
│ ├── main
│ └── resources
│ │ └── META-INF
│ │ └── services
│ │ ├── org.ocpsoft.common.spi.ServiceEnricher
│ │ ├── org.ocpsoft.common.spi.ServiceLocator
│ │ ├── org.ocpsoft.rewrite.el.spi.BeanNameResolver
│ │ └── org.ocpsoft.rewrite.el.spi.ExpressionLanguageProvider
│ └── test
│ ├── java
│ └── org
│ │ └── ocpsoft
│ │ └── rewrite
│ │ └── spring
│ │ ├── .SpringFeaturesTest.java.swp
│ │ └── SpringRoot.java
│ └── resources
│ ├── spring-web.xml
│ └── applicationContext.xml
├── impl-servlet
├── src
│ └── main
│ │ ├── resources
│ │ └── META-INF
│ │ │ └── services
│ │ │ ├── org.ocpsoft.rewrite.spi.RewriteProvider
│ │ │ ├── org.ocpsoft.rewrite.servlet.spi.InboundRewriteProducer
│ │ │ ├── org.ocpsoft.rewrite.servlet.spi.RewriteResultHandler
│ │ │ ├── org.ocpsoft.rewrite.servlet.spi.OutboundRewriteProducer
│ │ │ ├── org.ocpsoft.rewrite.servlet.spi.RequestCycleWrapper
│ │ │ ├── org.ocpsoft.rewrite.servlet.spi.RewriteLifecycleListener
│ │ │ └── org.ocpsoft.rewrite.spi.ConfigurationCacheProvider
│ │ └── java
│ │ └── org
│ │ └── ocpsoft
│ │ └── rewrite
│ │ └── servlet
│ │ └── impl
│ │ └── HttpBufferRewriteImpl.java
└── README.md
├── config-prettyfaces
└── src
│ ├── test
│ ├── java
│ │ └── com
│ │ │ └── ocpsoft
│ │ │ └── pretty
│ │ │ └── faces
│ │ │ └── Root.java
│ └── resources
│ │ ├── faces-config-resolver-test.xml
│ │ └── rewrite-pretty-config.xml
│ └── main
│ ├── resources
│ └── META-INF
│ │ └── services
│ │ ├── org.ocpsoft.rewrite.servlet.spi.ContextListener
│ │ ├── org.ocpsoft.rewrite.faces.spi.FacesActionUrlProvider
│ │ ├── com.ocpsoft.pretty.faces.spi.ConfigurationPostProcessor
│ │ ├── org.ocpsoft.rewrite.config.ConfigurationProvider
│ │ ├── org.ocpsoft.rewrite.servlet.spi.RequestParameterProvider
│ │ ├── org.ocpsoft.rewrite.servlet.spi.RewriteLifecycleListener
│ │ ├── com.ocpsoft.pretty.faces.spi.DevelopmentModeDetector
│ │ └── com.ocpsoft.pretty.faces.spi.ConfigurationProvider
│ └── java
│ └── com
│ └── ocpsoft
│ └── pretty
│ └── faces
│ ├── util
│ └── NullComponent.java
│ └── config
│ └── rewrite
│ ├── Case.java
│ └── TrailingSlash.java
├── integration-faces
└── src
│ ├── main
│ ├── resources
│ │ └── META-INF
│ │ │ ├── services
│ │ │ ├── org.ocpsoft.rewrite.el.spi.BeanNameResolver
│ │ │ ├── org.ocpsoft.rewrite.spi.ConverterProvider
│ │ │ ├── org.ocpsoft.rewrite.spi.ValidatorProvider
│ │ │ ├── org.ocpsoft.rewrite.faces.spi.FacesActionUrlProvider
│ │ │ ├── org.ocpsoft.rewrite.spi.InvocationResultHandler
│ │ │ ├── org.ocpsoft.rewrite.el.spi.ExpressionLanguageProvider
│ │ │ ├── org.ocpsoft.rewrite.servlet.spi.RewriteLifecycleListener
│ │ │ └── org.ocpsoft.rewrite.annotation.spi.AnnotationHandler
│ │ │ └── faces-config.xml
│ └── java
│ │ └── org
│ │ └── ocpsoft
│ │ └── rewrite
│ │ └── faces
│ │ └── annotation
│ │ └── handler
│ │ ├── DeferredConverter.java
│ │ └── DeferredValidator.java
│ └── test
│ ├── java
│ └── org
│ │ └── ocpsoft
│ │ └── rewrite
│ │ └── faces
│ │ ├── FacesRoot.java
│ │ └── test
│ │ └── FacesBase.java
│ └── resources
│ ├── META-INF
│ └── services
│ │ └── org.ocpsoft.rewrite.config.ConfigurationProvider
│ ├── outcome-encoding-page.xhtml
│ ├── empty.xhtml
│ ├── faces-config.xml
│ ├── error-page-404.xhtml
│ ├── resolver.xhtml
│ ├── expression-language.xhtml
│ ├── schemaless-cdn-page.xhtml
│ ├── faces-web.xml
│ ├── error-page-web.xml
│ └── outcome-encoding-start.xhtml
├── config-tuckey
├── src
│ ├── main
│ │ └── resources
│ │ │ └── META-INF
│ │ │ └── services
│ │ │ └── org.ocpsoft.rewrite.config.ConfigurationProvider
│ └── test
│ │ ├── resources
│ │ └── urlrewrite.xml
│ │ └── java
│ │ └── org
│ │ └── ocpsoft
│ │ └── rewrite
│ │ └── config
│ │ └── tuckey
│ │ └── TuckeyRoot.java
└── README.md
├── annotations-impl
└── src
│ ├── main
│ └── resources
│ │ └── META-INF
│ │ └── services
│ │ └── org.ocpsoft.rewrite.config.ConfigurationProvider
│ └── test
│ └── java
│ └── org
│ └── ocpsoft
│ └── rewrite
│ └── annotation
│ ├── MockAnno.java
│ ├── visit
│ ├── AnnotatedClass.java
│ ├── FieldAnno.java
│ ├── TypeAnno.java
│ ├── MethodAnno.java
│ ├── ParamAnno.java
│ ├── MethodHandler.java
│ ├── ParamHandler.java
│ └── FieldHandler.java
│ ├── AnnotationRoot.java
│ └── scan
│ └── ClassFinderTestBean.java
├── integration-gwt
└── src
│ ├── main
│ ├── resources
│ │ └── META-INF
│ │ │ └── services
│ │ │ └── org.ocpsoft.rewrite.config.ConfigurationProvider
│ └── java
│ │ └── org
│ │ └── ocpsoft
│ │ └── rewrite
│ │ └── gwt
│ │ └── client
│ │ └── history
│ │ ├── ContextPathListener.java
│ │ ├── ListenerRegistration.java
│ │ ├── ContextPathProvider.java
│ │ └── CookieContextPathProvider.java
│ └── test
│ └── java
│ └── org
│ └── ocpsoft
│ └── rewrite
│ └── gwt
│ └── GWTRoot.java
├── impl-servlet-3.0
├── src
│ └── main
│ │ └── resources
│ │ └── META-INF
│ │ └── services
│ │ ├── org.ocpsoft.rewrite.servlet.spi.DispatcherTypeProvider
│ │ └── org.ocpsoft.rewrite.servlet.spi.ServletRegistrationProvider
└── README.md
├── impl-servlet-2.5
└── src
│ └── main
│ └── resources
│ └── META-INF
│ └── services
│ ├── org.ocpsoft.rewrite.servlet.spi.DispatcherTypeProvider
│ └── org.ocpsoft.rewrite.servlet.spi.ServletRegistrationProvider
├── config-annotations
└── src
│ ├── main
│ └── resources
│ │ └── META-INF
│ │ └── services
│ │ ├── org.ocpsoft.rewrite.servlet.spi.ResourcePathResolver
│ │ └── org.ocpsoft.rewrite.annotation.spi.AnnotationHandler
│ └── test
│ └── java
│ └── org
│ └── ocpsoft
│ └── rewrite
│ └── annotation
│ ├── join
│ ├── SimpleJoinBean.java
│ └── JoinParameterBean.java
│ ├── forward
│ └── SimpleForwardBean.java
│ ├── convert
│ ├── LowercaseConverter.java
│ └── CustomConverterBean.java
│ ├── validate
│ ├── EvenLengthValidator.java
│ └── CustomValidatorBean.java
│ ├── param
│ ├── ParameterTestBean.java
│ └── ParameterMatchesTestBean.java
│ ├── query
│ └── QueryParameterBean.java
│ ├── action
│ ├── RequestActionBean.java
│ └── InboundActionBean.java
│ └── RewriteAnnotationTest.java
├── annotations-api
├── src
│ └── main
│ │ └── java
│ │ └── org
│ │ └── ocpsoft
│ │ └── rewrite
│ │ └── annotation
│ │ ├── api
│ │ ├── ClassVisitor.java
│ │ ├── Parameter.java
│ │ └── HandlerChain.java
│ │ └── spi
│ │ └── AnnotationHandler.java
└── pom.xml
├── documentation
└── src
│ └── main
│ └── asciidoc
│ ├── integration
│ └── index.asciidoc
│ └── master.asciidoc
├── test-harness
└── src
│ └── main
│ ├── resources
│ ├── tomcat-weld-context.xml
│ ├── tomcat-owb-context.xml
│ ├── tomcat-weld-web-fragment.xml
│ ├── tomcat-owb-web-fragment.xml
│ └── jetty-log4j.xml
│ └── java
│ └── org
│ └── ocpsoft
│ └── rewrite
│ └── mock
│ ├── MockFailedBinding.java
│ └── MockRewriteContext.java
├── .gitignore
├── config-prettyfaces-tests
└── src
│ └── test
│ ├── resources
│ ├── faces-config.xml
│ ├── loop
│ │ ├── rewrite-loop-config.xml
│ │ ├── loop-pretty-config.xml
│ │ ├── loop.xhtml
│ │ ├── rewrite-loop.xhtml
│ │ └── viewidmatch.xhtml
│ ├── rule_naming
│ │ ├── test.xhtml
│ │ ├── index.xhtml
│ │ └── pretty-config.xml
│ ├── errorpage
│ │ ├── errorpage-view.xhtml
│ │ ├── errorpage-web.xml
│ │ ├── errorpage-404.xhtml
│ │ └── errorpage-pretty-config.xml
│ ├── trailingslash
│ │ └── trailingslash-pretty-config.xml
│ ├── context
│ │ ├── index.xhtml
│ │ └── pretty-config.xml
│ ├── mapping
│ │ ├── pretty-config.xml
│ │ └── page.xhtml
│ ├── web.xml
│ ├── interaction
│ │ ├── faces-navigate-pretty-config.xml
│ │ ├── interaction-page.xhtml
│ │ └── faces-navigate-page.xhtml
│ ├── outbound
│ │ ├── view-hardcoded-params-pretty-config.xml
│ │ ├── outbound-pretty-config.xml
│ │ └── outbound.xhtml
│ ├── dynaview
│ │ ├── ambiguousViewId.xhtml
│ │ ├── parameterized-correct.xhtml
│ │ └── ambiguous-pretty-config.xml
│ ├── pathparams
│ │ ├── index.xhtml
│ │ └── pretty-config.xml
│ └── redirect
│ │ ├── redirect-pretty-config.xml
│ │ └── redirect.xhtml
│ └── java
│ └── org
│ └── ocpsoft
│ └── rewrite
│ └── prettyfaces
│ ├── interaction
│ ├── FacesNavigateInteractionBean.java
│ └── InteractionDynaViewBean.java
│ ├── loop
│ └── ViewIdMatchBean.java
│ ├── outbound
│ └── ViewHardcodedParamsBean.java
│ ├── errorpage
│ └── ErrorPageValidator.java
│ ├── dynaview
│ └── ParameterizedDynaViewValidator.java
│ └── redirect
│ └── RedirectBean.java
├── impl-tests
├── src
│ └── test
│ │ └── java
│ │ └── org
│ │ └── ocpsoft
│ │ └── rewrite
│ │ └── util
│ │ └── DefaultInstanceProviderTest.java
├── pom.xml
└── README.md
├── integration-cdi-tests
└── src
│ └── test
│ └── resources
│ ├── convert-simple.xhtml
│ ├── action-phases.xhtml
│ ├── binding-phases.xhtml
│ ├── action-postback.xhtml
│ └── binding-postback.xhtml
├── transform
└── src
│ └── main
│ └── resources
│ └── org
│ └── ocpsoft
│ └── rewrite
│ └── transform
│ └── js
│ └── api.js
├── addressbuilder
├── src
│ └── main
│ │ └── java
│ │ └── org
│ │ └── ocpsoft
│ │ └── urlbuilder
│ │ └── util
│ │ └── CaptureType.java
└── pom.xml
├── config-servlet-tests
└── src
│ └── test
│ └── java
│ └── org
│ └── ocpsoft
│ └── rewrite
│ └── servlet
│ └── config
│ └── DomainConverter.java
├── test-base
├── pom.xml
└── src
│ └── main
│ └── java
│ └── org
│ └── ocpsoft
│ └── rewrite
│ └── category
│ ├── IgnoreForAS7.java
│ ├── IgnoreForWildfly.java
│ ├── IgnoreForGlassfish3.java
│ └── IgnoreForGlassfish4.java
├── .github
├── workflows
│ ├── maven-deploy.yml
│ └── maven.yml
└── settings.xml
├── examples
└── src
│ └── main
│ └── assembly
│ └── examples.xml
└── rewrite-servlet
└── src
└── main
└── assembly
├── javadocs.xml
└── sources.xml
/showcase/access-control/src/main/java/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/showcase/access-control/src/main/resources/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/showcase/rest-ws/src/main/resources/META-INF/forge.xml:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/integration-faces-tests/src/test/resources/outbound-resource.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/transform-markup/src/main/resources/ruby/sass/VERSION:
--------------------------------------------------------------------------------
1 | 3.2.13
2 |
--------------------------------------------------------------------------------
/showcase/access-control/src/main/resources/META-INF/forge.xml:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/showcase/composite-query/src/main/resources/META-INF/forge.xml:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/transform-markup/src/main/resources/ruby/sass/VERSION_NAME:
--------------------------------------------------------------------------------
1 | Media Mark
2 |
--------------------------------------------------------------------------------
/api-tests/src/test/resources/bundle_en.properties:
--------------------------------------------------------------------------------
1 | search=search
2 | library=library
--------------------------------------------------------------------------------
/api/src/META-INF/MANIFEST.MF:
--------------------------------------------------------------------------------
1 | Manifest-Version: 1.0
2 | Class-Path:
3 |
4 |
--------------------------------------------------------------------------------
/api-tests/src/META-INF/MANIFEST.MF:
--------------------------------------------------------------------------------
1 | Manifest-Version: 1.0
2 | Class-Path:
3 |
4 |
--------------------------------------------------------------------------------
/config-servlet/src/test/resources/bundle_en.properties:
--------------------------------------------------------------------------------
1 | search=search
2 | library=library
--------------------------------------------------------------------------------
/showcase/transform/src/main/webapp/common/common.css:
--------------------------------------------------------------------------------
1 | body {
2 | padding: 30px;
3 | }
--------------------------------------------------------------------------------
/transform-markup/src/main/resources/ruby/sass/VERSION_DATE:
--------------------------------------------------------------------------------
1 | 20 December 2013 04:00:49 UTC
2 |
--------------------------------------------------------------------------------
/impl-servlet-tests/src/test/resources/org/ocpsoft/rewrite/servlet/container/home.html:
--------------------------------------------------------------------------------
1 | USER HOME
--------------------------------------------------------------------------------
/impl-servlet-tests/src/test/resources/org/ocpsoft/rewrite/servlet/container/login-fail.html:
--------------------------------------------------------------------------------
1 | LOGIN FAIL
--------------------------------------------------------------------------------
/impl-servlet-tests/src/test/resources/org/ocpsoft/rewrite/servlet/container/login.html:
--------------------------------------------------------------------------------
1 | LOGIN PAGE
2 |
--------------------------------------------------------------------------------
/.mvn/wrapper/maven-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ocpsoft/rewrite/HEAD/.mvn/wrapper/maven-wrapper.jar
--------------------------------------------------------------------------------
/transform-markup/src/main/resources/ruby/maruku/lib/maruku/textile2.rb:
--------------------------------------------------------------------------------
1 | require 'maruku/input_textile2/t2_parser'
--------------------------------------------------------------------------------
/NOTICE:
--------------------------------------------------------------------------------
1 | Created by Lincoln Baxter, III
2 | lincolnbaxter@gmail.com
3 | http://ocpsoft.org/
4 |
5 | "Simpler is better."
--------------------------------------------------------------------------------
/showcase/access-control/src/main/webapp/index.html:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/showcase/rest-ws/src/main/resources/META-INF/MANIFEST.MF:
--------------------------------------------------------------------------------
1 | Manifest-Version: 1.0
2 | Dependencies: com.sun.xml.bind services export
--------------------------------------------------------------------------------
/api-el/src/main/resources/META-INF/services/org.ocpsoft.rewrite.el.spi.BeanNameResolver:
--------------------------------------------------------------------------------
1 | org.ocpsoft.rewrite.el.DefaultBeanNameResolver
--------------------------------------------------------------------------------
/integration-cdi/src/main/resources/META-INF/services/org.ocpsoft.common.spi.ServiceEnricher:
--------------------------------------------------------------------------------
1 | org.ocpsoft.rewrite.cdi.CdiServiceEnricher
--------------------------------------------------------------------------------
/integration-cdi/src/main/resources/META-INF/services/org.ocpsoft.common.spi.ServiceLocator:
--------------------------------------------------------------------------------
1 | org.ocpsoft.rewrite.cdi.CdiServiceLocator
--------------------------------------------------------------------------------
/impl/src/main/resources/META-INF/services/org.ocpsoft.rewrite.spi.ConverterProvider:
--------------------------------------------------------------------------------
1 | org.ocpsoft.rewrite.instance.DefaultConverterProvider
--------------------------------------------------------------------------------
/impl/src/main/resources/META-INF/services/org.ocpsoft.rewrite.spi.InstanceProvider:
--------------------------------------------------------------------------------
1 | org.ocpsoft.rewrite.instance.DefaultInstanceProvider
--------------------------------------------------------------------------------
/impl/src/main/resources/META-INF/services/org.ocpsoft.rewrite.spi.ValidatorProvider:
--------------------------------------------------------------------------------
1 | org.ocpsoft.rewrite.instance.DefaultValidatorProvider
--------------------------------------------------------------------------------
/security-integration-shiro/src/test/resources/shiro.ini:
--------------------------------------------------------------------------------
1 | [main]
2 | shiroTestRealm = org.ocpsoft.rewrite.security.shiro.ShiroTestRealm
3 |
--------------------------------------------------------------------------------
/showcase/access-control/src/main/resources/META-INF/MANIFEST.MF:
--------------------------------------------------------------------------------
1 | Manifest-Version: 1.0
2 | Dependencies: com.sun.xml.bind services export
--------------------------------------------------------------------------------
/transform-markup/src/main/resources/ruby/asciidoctor/lib/asciidoctor/version.rb:
--------------------------------------------------------------------------------
1 | module Asciidoctor
2 | VERSION = '0.1.4'
3 | end
4 |
--------------------------------------------------------------------------------
/impl/src/main/resources/META-INF/services/org.ocpsoft.rewrite.spi.GlobalParameterProvider:
--------------------------------------------------------------------------------
1 | org.ocpsoft.rewrite.instance.WildcardParameterProvider
--------------------------------------------------------------------------------
/integration-cdi/src/main/resources/META-INF/services/org.ocpsoft.rewrite.el.spi.BeanNameResolver:
--------------------------------------------------------------------------------
1 | org.ocpsoft.rewrite.cdi.CdiBeanNameResolver
--------------------------------------------------------------------------------
/integration-spring/src/main/resources/META-INF/services/org.ocpsoft.common.spi.ServiceEnricher:
--------------------------------------------------------------------------------
1 | org.ocpsoft.rewrite.spring.SpringServiceEnricher
--------------------------------------------------------------------------------
/showcase/rest-ws/src/main/webapp/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ocpsoft/rewrite/HEAD/showcase/rest-ws/src/main/webapp/favicon.ico
--------------------------------------------------------------------------------
/impl-servlet/src/main/resources/META-INF/services/org.ocpsoft.rewrite.spi.RewriteProvider:
--------------------------------------------------------------------------------
1 | org.ocpsoft.rewrite.servlet.impl.DefaultHttpRewriteProvider
--------------------------------------------------------------------------------
/integration-cdi/src/main/resources/META-INF/services/org.ocpsoft.rewrite.spi.RewriteProvider:
--------------------------------------------------------------------------------
1 | org.ocpsoft.rewrite.cdi.bridge.RewriteProviderBridge
--------------------------------------------------------------------------------
/integration-spring/src/main/resources/META-INF/services/org.ocpsoft.common.spi.ServiceLocator:
--------------------------------------------------------------------------------
1 | org.ocpsoft.rewrite.spring.SpringServiceLocator
2 |
--------------------------------------------------------------------------------
/integration-spring/src/main/resources/META-INF/services/org.ocpsoft.rewrite.el.spi.BeanNameResolver:
--------------------------------------------------------------------------------
1 | org.ocpsoft.rewrite.spring.SpringBeanNameResolver
--------------------------------------------------------------------------------
/showcase/composite-query/src/main/webapp/bkg.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ocpsoft/rewrite/HEAD/showcase/composite-query/src/main/webapp/bkg.gif
--------------------------------------------------------------------------------
/api-tests/src/test/resources/bundle_fr.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ocpsoft/rewrite/HEAD/api-tests/src/test/resources/bundle_fr.properties
--------------------------------------------------------------------------------
/config-prettyfaces/src/test/java/com/ocpsoft/pretty/faces/Root.java:
--------------------------------------------------------------------------------
1 | package com.ocpsoft.pretty.faces;
2 |
3 | public interface Root
4 | {
5 |
6 | }
7 |
--------------------------------------------------------------------------------
/integration-faces/src/main/resources/META-INF/services/org.ocpsoft.rewrite.el.spi.BeanNameResolver:
--------------------------------------------------------------------------------
1 | org.ocpsoft.rewrite.faces.FacesBeanNameResolver
2 |
--------------------------------------------------------------------------------
/integration-faces/src/main/resources/META-INF/services/org.ocpsoft.rewrite.spi.ConverterProvider:
--------------------------------------------------------------------------------
1 | org.ocpsoft.rewrite.faces.artifact.FacesConverterProvider
--------------------------------------------------------------------------------
/integration-faces/src/main/resources/META-INF/services/org.ocpsoft.rewrite.spi.ValidatorProvider:
--------------------------------------------------------------------------------
1 | org.ocpsoft.rewrite.faces.artifact.FacesValidatorProvider
--------------------------------------------------------------------------------
/showcase/access-control/src/main/webapp/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ocpsoft/rewrite/HEAD/showcase/access-control/src/main/webapp/favicon.ico
--------------------------------------------------------------------------------
/showcase/bookstore/src/main/webapp/images/book.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ocpsoft/rewrite/HEAD/showcase/bookstore/src/main/webapp/images/book.jpg
--------------------------------------------------------------------------------
/integration-faces/src/main/resources/META-INF/services/org.ocpsoft.rewrite.faces.spi.FacesActionUrlProvider:
--------------------------------------------------------------------------------
1 | org.ocpsoft.rewrite.faces.DefaultActionUrlProvider
--------------------------------------------------------------------------------
/showcase/composite-query/src/main/webapp/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ocpsoft/rewrite/HEAD/showcase/composite-query/src/main/webapp/favicon.ico
--------------------------------------------------------------------------------
/config-prettyfaces/src/main/resources/META-INF/services/org.ocpsoft.rewrite.servlet.spi.ContextListener:
--------------------------------------------------------------------------------
1 | org.ocpsoft.rewrite.prettyfaces.PrettyConfigContextListener
--------------------------------------------------------------------------------
/config-servlet/src/test/resources/bundle_fr.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ocpsoft/rewrite/HEAD/config-servlet/src/test/resources/bundle_fr.properties
--------------------------------------------------------------------------------
/config-tuckey/src/main/resources/META-INF/services/org.ocpsoft.rewrite.config.ConfigurationProvider:
--------------------------------------------------------------------------------
1 | org.ocpsoft.rewrite.config.tuckey.TuckeyConfigurationProvider
--------------------------------------------------------------------------------
/impl-servlet/src/main/resources/META-INF/services/org.ocpsoft.rewrite.servlet.spi.InboundRewriteProducer:
--------------------------------------------------------------------------------
1 | org.ocpsoft.rewrite.servlet.impl.HttpInboundRewriteProducer
--------------------------------------------------------------------------------
/impl-servlet/src/main/resources/META-INF/services/org.ocpsoft.rewrite.servlet.spi.RewriteResultHandler:
--------------------------------------------------------------------------------
1 | org.ocpsoft.rewrite.servlet.impl.HttpRewriteResultHandler
--------------------------------------------------------------------------------
/integration-cdi/src/main/resources/META-INF/services/org.ocpsoft.rewrite.el.spi.ExpressionLanguageProvider:
--------------------------------------------------------------------------------
1 | org.ocpsoft.rewrite.cdi.CdiExpressionLanguageProvider
--------------------------------------------------------------------------------
/integration-cdi/src/main/resources/META-INF/services/org.ocpsoft.rewrite.servlet.spi.RequestCycleWrapper:
--------------------------------------------------------------------------------
1 | org.ocpsoft.rewrite.cdi.bridge.RequestCycleWrapperBridge
--------------------------------------------------------------------------------
/integration-faces/src/main/resources/META-INF/services/org.ocpsoft.rewrite.spi.InvocationResultHandler:
--------------------------------------------------------------------------------
1 | org.ocpsoft.rewrite.faces.NavigatingInvocationResultHandler
--------------------------------------------------------------------------------
/showcase/bookstore/src/main/webapp/images/led_green.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ocpsoft/rewrite/HEAD/showcase/bookstore/src/main/webapp/images/led_green.png
--------------------------------------------------------------------------------
/showcase/bookstore/src/main/webapp/images/led_orange.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ocpsoft/rewrite/HEAD/showcase/bookstore/src/main/webapp/images/led_orange.png
--------------------------------------------------------------------------------
/showcase/composite-query/src/main/webapp/forge-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ocpsoft/rewrite/HEAD/showcase/composite-query/src/main/webapp/forge-logo.png
--------------------------------------------------------------------------------
/showcase/rest-ws/src/main/resources/META-INF/services/org.ocpsoft.rewrite.config.ConfigurationProvider:
--------------------------------------------------------------------------------
1 | org.ocpsoft.rewrite.showcase.rest.RestRewriteConfiguration
--------------------------------------------------------------------------------
/annotations-impl/src/main/resources/META-INF/services/org.ocpsoft.rewrite.config.ConfigurationProvider:
--------------------------------------------------------------------------------
1 | org.ocpsoft.rewrite.annotation.config.AnnotationConfigProvider
--------------------------------------------------------------------------------
/config-prettyfaces/src/main/resources/META-INF/services/org.ocpsoft.rewrite.faces.spi.FacesActionUrlProvider:
--------------------------------------------------------------------------------
1 | org.ocpsoft.rewrite.prettyfaces.PrettyFacesActionUrlProvider
--------------------------------------------------------------------------------
/impl-servlet/src/main/resources/META-INF/services/org.ocpsoft.rewrite.servlet.spi.OutboundRewriteProducer:
--------------------------------------------------------------------------------
1 | org.ocpsoft.rewrite.servlet.impl.HttpOutboundRewriteProducer
--------------------------------------------------------------------------------
/impl-servlet/src/main/resources/META-INF/services/org.ocpsoft.rewrite.servlet.spi.RequestCycleWrapper:
--------------------------------------------------------------------------------
1 | org.ocpsoft.rewrite.servlet.impl.HttpRewriteRequestCycleWrapper
--------------------------------------------------------------------------------
/integration-cdi/src/main/resources/META-INF/services/org.ocpsoft.rewrite.servlet.spi.RewriteLifecycleListener:
--------------------------------------------------------------------------------
1 | org.ocpsoft.rewrite.cdi.bridge.RewriteLifecycleEventBridge
--------------------------------------------------------------------------------
/integration-faces/src/main/resources/META-INF/services/org.ocpsoft.rewrite.el.spi.ExpressionLanguageProvider:
--------------------------------------------------------------------------------
1 | org.ocpsoft.rewrite.faces.FacesExpressionLanguageProvider
--------------------------------------------------------------------------------
/integration-faces/src/main/resources/META-INF/services/org.ocpsoft.rewrite.servlet.spi.RewriteLifecycleListener:
--------------------------------------------------------------------------------
1 | org.ocpsoft.rewrite.faces.FacesRewriteLifecycleListener
--------------------------------------------------------------------------------
/integration-faces/src/test/java/org/ocpsoft/rewrite/faces/FacesRoot.java:
--------------------------------------------------------------------------------
1 | package org.ocpsoft.rewrite.faces;
2 |
3 | public interface FacesRoot
4 | {
5 |
6 | }
7 |
--------------------------------------------------------------------------------
/integration-gwt/src/main/resources/META-INF/services/org.ocpsoft.rewrite.config.ConfigurationProvider:
--------------------------------------------------------------------------------
1 | org.ocpsoft.rewrite.gwt.server.history.HistoryRewriteConfiguration
--------------------------------------------------------------------------------
/integration-spring/src/main/resources/META-INF/services/org.ocpsoft.rewrite.el.spi.ExpressionLanguageProvider:
--------------------------------------------------------------------------------
1 | org.ocpsoft.rewrite.spring.SpringExpressionLanguageProvider
--------------------------------------------------------------------------------
/showcase/access-control/src/main/webapp/resources/bkg.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ocpsoft/rewrite/HEAD/showcase/access-control/src/main/webapp/resources/bkg.gif
--------------------------------------------------------------------------------
/showcase/composite-query/src/main/webapp/resources/bkg.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ocpsoft/rewrite/HEAD/showcase/composite-query/src/main/webapp/resources/bkg.gif
--------------------------------------------------------------------------------
/config-prettyfaces/src/main/resources/META-INF/services/com.ocpsoft.pretty.faces.spi.ConfigurationPostProcessor:
--------------------------------------------------------------------------------
1 | com.ocpsoft.pretty.faces.config.spi.ContextParamsPostProcessor
--------------------------------------------------------------------------------
/impl-servlet-3.0/src/main/resources/META-INF/services/org.ocpsoft.rewrite.servlet.spi.DispatcherTypeProvider:
--------------------------------------------------------------------------------
1 | org.ocpsoft.rewrite.servlet.impl.Servlet3DispatcherTypeProvider
--------------------------------------------------------------------------------
/impl-servlet/src/main/resources/META-INF/services/org.ocpsoft.rewrite.servlet.spi.RewriteLifecycleListener:
--------------------------------------------------------------------------------
1 | org.ocpsoft.rewrite.servlet.impl.DefaultRewriteLifecycleListener
--------------------------------------------------------------------------------
/impl-servlet/src/main/resources/META-INF/services/org.ocpsoft.rewrite.spi.ConfigurationCacheProvider:
--------------------------------------------------------------------------------
1 | org.ocpsoft.rewrite.servlet.impl.ServletContextConfigurationCacheProvider
--------------------------------------------------------------------------------
/integration-faces/src/test/resources/META-INF/services/org.ocpsoft.rewrite.config.ConfigurationProvider:
--------------------------------------------------------------------------------
1 | org.ocpsoft.rewrite.faces.resolver.FacesBeanNameResolverConfigProvider
--------------------------------------------------------------------------------
/showcase/access-control/src/main/resources/META-INF/services/org.ocpsoft.rewrite.config.ConfigurationProvider:
--------------------------------------------------------------------------------
1 | org.ocpsoft.rewrite.showcase.access.AccessRewriteConfiguration
--------------------------------------------------------------------------------
/showcase/access-control/src/main/webapp/resources/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ocpsoft/rewrite/HEAD/showcase/access-control/src/main/webapp/resources/favicon.ico
--------------------------------------------------------------------------------
/showcase/composite-query/src/main/webapp/jboss-community.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ocpsoft/rewrite/HEAD/showcase/composite-query/src/main/webapp/jboss-community.png
--------------------------------------------------------------------------------
/config-prettyfaces/src/main/resources/META-INF/services/org.ocpsoft.rewrite.config.ConfigurationProvider:
--------------------------------------------------------------------------------
1 | org.ocpsoft.rewrite.prettyfaces.PrettyFacesRewriteConfigurationProvider
--------------------------------------------------------------------------------
/impl-servlet-2.5/src/main/resources/META-INF/services/org.ocpsoft.rewrite.servlet.spi.DispatcherTypeProvider:
--------------------------------------------------------------------------------
1 | org.ocpsoft.rewrite.servlet.impl.Servlet25DispatcherTypeProvider
2 |
--------------------------------------------------------------------------------
/security-integration-shiro/src/main/resources/META-INF/services/org.ocpsoft.rewrite.annotation.spi.AnnotationHandler:
--------------------------------------------------------------------------------
1 | org.ocpsoft.rewrite.security.shiro.ShiroRoleRequiredHandler
--------------------------------------------------------------------------------
/showcase/bookstore/src/main/resources/images/9780670025480.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ocpsoft/rewrite/HEAD/showcase/bookstore/src/main/resources/images/9780670025480.jpg
--------------------------------------------------------------------------------
/showcase/bookstore/src/main/resources/images/9781612184838.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ocpsoft/rewrite/HEAD/showcase/bookstore/src/main/resources/images/9781612184838.jpg
--------------------------------------------------------------------------------
/showcase/composite-query/src/main/resources/META-INF/services/org.ocpsoft.rewrite.config.ConfigurationProvider:
--------------------------------------------------------------------------------
1 | org.ocpsoft.rewrite.showcase.composite.CompositeRewriteConfiguration
--------------------------------------------------------------------------------
/showcase/composite-query/src/main/webapp/resources/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ocpsoft/rewrite/HEAD/showcase/composite-query/src/main/webapp/resources/favicon.ico
--------------------------------------------------------------------------------
/config-annotations/src/main/resources/META-INF/services/org.ocpsoft.rewrite.servlet.spi.ResourcePathResolver:
--------------------------------------------------------------------------------
1 | org.ocpsoft.rewrite.annotation.resolver.AnnotationJoinResourcePathResolver
--------------------------------------------------------------------------------
/config-prettyfaces/src/main/resources/META-INF/services/org.ocpsoft.rewrite.servlet.spi.RequestParameterProvider:
--------------------------------------------------------------------------------
1 | org.ocpsoft.rewrite.prettyfaces.PrettyFacesRequestParameterProvider
--------------------------------------------------------------------------------
/config-prettyfaces/src/main/resources/META-INF/services/org.ocpsoft.rewrite.servlet.spi.RewriteLifecycleListener:
--------------------------------------------------------------------------------
1 | org.ocpsoft.rewrite.prettyfaces.PrettyFacesRewriteLifecycleListener
--------------------------------------------------------------------------------
/config-servlet/src/main/resources/META-INF/services/org.ocpsoft.rewrite.servlet.spi.RewriteLifecycleListener:
--------------------------------------------------------------------------------
1 | org.ocpsoft.rewrite.servlet.config.lifecycle.JoinRewriteLifecycleListener
--------------------------------------------------------------------------------
/showcase/access-control/src/main/webapp/images/jbosscorp_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ocpsoft/rewrite/HEAD/showcase/access-control/src/main/webapp/images/jbosscorp_logo.png
--------------------------------------------------------------------------------
/showcase/access-control/src/main/webapp/resources/forge-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ocpsoft/rewrite/HEAD/showcase/access-control/src/main/webapp/resources/forge-logo.png
--------------------------------------------------------------------------------
/showcase/composite-query/src/main/webapp/resources/forge-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ocpsoft/rewrite/HEAD/showcase/composite-query/src/main/webapp/resources/forge-logo.png
--------------------------------------------------------------------------------
/impl-servlet-2.5/src/main/resources/META-INF/services/org.ocpsoft.rewrite.servlet.spi.ServletRegistrationProvider:
--------------------------------------------------------------------------------
1 | org.ocpsoft.rewrite.servlet.impl.WebXmlServletRegistrationProvider
2 |
--------------------------------------------------------------------------------
/impl-servlet-3.0/src/main/resources/META-INF/services/org.ocpsoft.rewrite.servlet.spi.ServletRegistrationProvider:
--------------------------------------------------------------------------------
1 | org.ocpsoft.rewrite.servlet.impl.Servlet3ServletRegistrationProvider
2 |
--------------------------------------------------------------------------------
/showcase/access-control/src/main/webapp/resources/jboss-community.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ocpsoft/rewrite/HEAD/showcase/access-control/src/main/webapp/resources/jboss-community.png
--------------------------------------------------------------------------------
/showcase/composite-query/src/main/webapp/resources/jboss-community.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ocpsoft/rewrite/HEAD/showcase/composite-query/src/main/webapp/resources/jboss-community.png
--------------------------------------------------------------------------------
/transform-markup/src/main/resources/ruby/redcloth/lib/redcloth_scan.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ocpsoft/rewrite/HEAD/transform-markup/src/main/resources/ruby/redcloth/lib/redcloth_scan.jar
--------------------------------------------------------------------------------
/annotations-api/src/main/java/org/ocpsoft/rewrite/annotation/api/ClassVisitor.java:
--------------------------------------------------------------------------------
1 | package org.ocpsoft.rewrite.annotation.api;
2 |
3 |
4 | public interface ClassVisitor
5 | {
6 | public void visit(Class> clazz);
7 | }
8 |
--------------------------------------------------------------------------------
/integration-spring/src/test/java/org/ocpsoft/rewrite/spring/.SpringFeaturesTest.java.swp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ocpsoft/rewrite/HEAD/integration-spring/src/test/java/org/ocpsoft/rewrite/spring/.SpringFeaturesTest.java.swp
--------------------------------------------------------------------------------
/integration-cdi/src/main/resources/META-INF/services/org.ocpsoft.rewrite.cdi.spi.BeanManagerProvider:
--------------------------------------------------------------------------------
1 | org.ocpsoft.rewrite.cdi.manager.DefaultJndiBeanManagerProvider
2 | org.ocpsoft.rewrite.cdi.manager.ServletContainerJndiBeanManagerProvider
--------------------------------------------------------------------------------
/documentation/src/main/asciidoc/integration/index.asciidoc:
--------------------------------------------------------------------------------
1 | link:../index.asciidoc[← Docs Index]
2 |
3 | == Integrations and Extensions
4 |
5 | * link:cdi.asciidoc[CDI Integration]
6 | * link:spring.asciidoc[Spring Integration]
7 |
--------------------------------------------------------------------------------
/integration-faces/src/main/resources/META-INF/services/org.ocpsoft.rewrite.annotation.spi.AnnotationHandler:
--------------------------------------------------------------------------------
1 | org.ocpsoft.rewrite.faces.annotation.handler.DeferredHandler
2 | org.ocpsoft.rewrite.faces.annotation.handler.IgnorePostbackHandler
3 |
--------------------------------------------------------------------------------
/showcase/transform/src/main/resources/META-INF/services/org.ocpsoft.rewrite.config.ConfigurationProvider:
--------------------------------------------------------------------------------
1 | org.ocpsoft.rewrite.showcase.transform.TransformConfigurationProvider
2 | org.ocpsoft.rewrite.showcase.transform.GZipConfigurationProvider
--------------------------------------------------------------------------------
/config-prettyfaces/src/main/resources/META-INF/services/com.ocpsoft.pretty.faces.spi.DevelopmentModeDetector:
--------------------------------------------------------------------------------
1 | com.ocpsoft.pretty.faces.config.reload.DefaultDevelopmentModeDetector
2 | com.ocpsoft.pretty.faces2.config.reload.JSF2DevelopmentModeDetector
--------------------------------------------------------------------------------
/showcase/transform/src/main/webapp/textile/index.textile:
--------------------------------------------------------------------------------
1 | h1. Give RedCloth a try!
2 |
3 | A *simple* paragraph with
4 | a line break, some _emphasis_ and a "link":http://redcloth.org
5 |
6 | * an item
7 | * and another
8 |
9 | # one
10 | # two
11 |
--------------------------------------------------------------------------------
/transform-markup/src/main/resources/ruby/sass/lib/sass/util/test.rb:
--------------------------------------------------------------------------------
1 | module Sass
2 | module Util
3 | module Test
4 | def skip(msg = nil, bt = caller)
5 | super if defined?(super)
6 | return
7 | end
8 | end
9 | end
10 | end
11 |
--------------------------------------------------------------------------------
/config-annotations/src/test/java/org/ocpsoft/rewrite/annotation/join/SimpleJoinBean.java:
--------------------------------------------------------------------------------
1 | package org.ocpsoft.rewrite.annotation.join;
2 |
3 | import org.ocpsoft.rewrite.annotation.Join;
4 |
5 | @Join(path = "/join", to = "/simple-join.html")
6 | public class SimpleJoinBean
7 | {
8 |
9 | }
10 |
--------------------------------------------------------------------------------
/integration-cdi/src/test/java/org/ocpsoft/rewrite/cdi/bridge/MockBean.java:
--------------------------------------------------------------------------------
1 | package org.ocpsoft.rewrite.cdi.bridge;
2 |
3 | /**
4 | * @author Lincoln Baxter, III
5 | *
6 | */
7 | public class MockBean
8 | {
9 | // Intentionally empty
10 | }
11 |
--------------------------------------------------------------------------------
/test-harness/src/main/resources/tomcat-weld-context.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/integration-cdi/src/main/resources/META-INF/beans.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/showcase/bookstore/src/main/webapp/WEB-INF/beans.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
--------------------------------------------------------------------------------
/showcase/transform/src/main/webapp/sass/style.scss:
--------------------------------------------------------------------------------
1 | $blue: #3bbfce;
2 | $margin: 16px;
3 |
4 | .content-navigation {
5 | border-color: $blue;
6 | color:
7 | darken($blue, 9%);
8 | }
9 |
10 | .border {
11 | padding: $margin / 2;
12 | margin: $margin / 2;
13 | border-color: $blue;
14 | }
--------------------------------------------------------------------------------
/test-harness/src/main/resources/tomcat-owb-context.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/transform-markup/src/main/resources/ruby/sass/lib/sass/tree/content_node.rb:
--------------------------------------------------------------------------------
1 | module Sass
2 | module Tree
3 | # A node representing the placement within a mixin of the include statement's content.
4 | #
5 | # @see Sass::Tree
6 | class ContentNode < Node
7 | end
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/transform-markup/src/main/resources/ruby/sass/lib/sass/logger.rb:
--------------------------------------------------------------------------------
1 | module Sass::Logger
2 |
3 | end
4 |
5 | require "sass/logger/log_level"
6 | require "sass/logger/base"
7 |
8 | module Sass
9 |
10 | class << self
11 | attr_accessor :logger
12 | end
13 |
14 | self.logger = Sass::Logger::Base.new
15 | end
16 |
--------------------------------------------------------------------------------
/showcase/rest-ws/src/main/webapp/WEB-INF/beans.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/transform-markup/src/main/resources/ruby/sass/lib/sass/root.rb:
--------------------------------------------------------------------------------
1 | module Sass
2 | # The root directory of the Sass source tree.
3 | # This may be overridden by the package manager
4 | # if the lib directory is separated from the main source tree.
5 | # @api public
6 | ROOT_DIR = File.expand_path(File.join(__FILE__, "../../.."))
7 | end
8 |
--------------------------------------------------------------------------------
/showcase/access-control/src/main/webapp/WEB-INF/beans.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/transform-markup/src/main/resources/ruby/maruku/lib/maruku/ext/math/mathml_engines/none.rb:
--------------------------------------------------------------------------------
1 | module MaRuKu::Out::HTML
2 | def convert_to_mathml_none(kind, tex)
3 | code = xelem('code')
4 | tex_node = xtext(tex)
5 | code << tex_node
6 | end
7 |
8 | def convert_to_png_none(kind, tex)
9 | nil
10 | end
11 | end
12 |
13 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .classpath
2 | .project
3 | .settings
4 | .DS_Store
5 | target/
6 | */dependency-reduced-pom.xml
7 | *.iml
8 | *.ipr
9 | *.idea
10 | *.iws
11 | *.swp
12 | *.*~
13 | bin/
14 | /*/src/main/java/META-INF
15 | /*/src/META-INF
16 | .gitignore.swp
17 | .faces-config.xml.jsfdia
18 | docs/reference/src/main/docbook/en-US/version_info.xml
19 |
--------------------------------------------------------------------------------
/showcase/bookstore/src/main/webapp/WEB-INF/faces-config.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
--------------------------------------------------------------------------------
/integration-gwt/src/main/java/org/ocpsoft/rewrite/gwt/client/history/ContextPathListener.java:
--------------------------------------------------------------------------------
1 | package org.ocpsoft.rewrite.gwt.client.history;
2 |
3 | /**
4 | * Listener to be notified when the application context path is set.
5 | */
6 | public interface ContextPathListener
7 | {
8 | public void onContextPathSet(String contextPath);
9 | }
10 |
--------------------------------------------------------------------------------
/security-integration-shiro/src/test/resources/protected-page.xhtml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Protected admin page
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/config-prettyfaces-tests/src/test/resources/faces-config.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
--------------------------------------------------------------------------------
/config-prettyfaces-tests/src/test/resources/loop/rewrite-loop-config.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/annotations-impl/src/test/java/org/ocpsoft/rewrite/annotation/MockAnno.java:
--------------------------------------------------------------------------------
1 | package org.ocpsoft.rewrite.annotation;
2 |
3 | import java.lang.annotation.Documented;
4 | import java.lang.annotation.Retention;
5 | import java.lang.annotation.RetentionPolicy;
6 |
7 | @Documented
8 | @Retention(RetentionPolicy.RUNTIME)
9 | public @interface MockAnno
10 | {
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/documentation/src/main/asciidoc/master.asciidoc:
--------------------------------------------------------------------------------
1 | :toc:
2 | :toclevels: 4
3 |
4 | Rewrite Documentation
5 | =====================
6 |
7 | toc::[]
8 |
9 | include::index.asciidoc[]
10 |
11 | include::configuration/install.asciidoc[]
12 |
13 | include::configuration/index.asciidoc[]
14 |
15 | include::migration/prettyfaces3.asciidoc[]
16 |
17 | include::faq.asciidoc[]
18 |
--------------------------------------------------------------------------------
/config-annotations/src/test/java/org/ocpsoft/rewrite/annotation/forward/SimpleForwardBean.java:
--------------------------------------------------------------------------------
1 | package org.ocpsoft.rewrite.annotation.forward;
2 |
3 | import org.ocpsoft.rewrite.annotation.ForwardTo;
4 | import org.ocpsoft.rewrite.annotation.PathPattern;
5 |
6 | @PathPattern("/forward")
7 | @ForwardTo("/simple-forward.html")
8 | public class SimpleForwardBean
9 | {
10 | }
11 |
--------------------------------------------------------------------------------
/annotations-impl/src/test/java/org/ocpsoft/rewrite/annotation/visit/AnnotatedClass.java:
--------------------------------------------------------------------------------
1 | package org.ocpsoft.rewrite.annotation.visit;
2 |
3 | @TypeAnno("type")
4 | public class AnnotatedClass
5 | {
6 | @FieldAnno("field")
7 | public boolean field;
8 |
9 | @MethodAnno("method")
10 | public void method(@ParamAnno("parameter") int param)
11 | {
12 |
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/config-prettyfaces/src/main/resources/META-INF/services/com.ocpsoft.pretty.faces.spi.ConfigurationProvider:
--------------------------------------------------------------------------------
1 | com.ocpsoft.pretty.faces.config.spi.AnnotationConfigurationProvider
2 | com.ocpsoft.pretty.faces.config.spi.ClassLoaderConfigurationProvider
3 | com.ocpsoft.pretty.faces.config.spi.ContextSpecifiedConfigurationProvider
4 | com.ocpsoft.pretty.faces.config.spi.DefaultXMLConfigurationProvider
--------------------------------------------------------------------------------
/config-prettyfaces-tests/src/test/resources/rule_naming/test.xhtml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/integration-faces/src/test/resources/outcome-encoding-page.xhtml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Empty
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/api-tests/src/test/webapp/search.xhtml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/showcase/rest-ws/src/main/webapp/WEB-INF/faces-config.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/integration-faces-tests/src/test/resources/faces-config.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/showcase/access-control/src/main/webapp/WEB-INF/faces-config.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/showcase/composite-query/src/main/webapp/WEB-INF/faces-config.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/transform-markup/src/main/resources/ruby/maruku/lib/maruku/maruku.rb:
--------------------------------------------------------------------------------
1 | # The public interface for Maruku.
2 | #
3 | # @example Render a document fragment
4 | # Maruku.new("## Header ##").to_html
5 | # # => ""
6 | class Maruku < MaRuKu::MDDocument
7 | def initialize(s = nil, meta = {})
8 | super()
9 | self.attributes.merge! meta
10 | parse_doc(s) if s
11 | end
12 | end
13 |
--------------------------------------------------------------------------------
/integration-faces/src/test/resources/empty.xhtml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/transform-markup/src/main/resources/ruby/maruku/lib/maruku/output/to_s.rb:
--------------------------------------------------------------------------------
1 | module MaRuKu
2 |
3 | class MDElement
4 |
5 | # Strips all formatting from the string
6 | def to_s
7 | warn "Maruku#to_s is deprecated and will be removed or changed in a near-future version of Maruku."
8 | children_to_s
9 | end
10 |
11 | def children_to_s
12 | @children.join
13 | end
14 | end
15 | end
16 |
--------------------------------------------------------------------------------
/integration-faces-tests/src/test/resources/navigate-before-restoreview.xhtml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
9 | done.
10 |
11 |
12 |
--------------------------------------------------------------------------------
/transform-markup/src/main/resources/ruby/sass/lib/sass/railtie.rb:
--------------------------------------------------------------------------------
1 | # Rails 3.0.0.beta.2+, < 3.1
2 | if defined?(ActiveSupport) && Sass::Util.has?(:public_method, ActiveSupport, :on_load) &&
3 | !Sass::Util.ap_geq?('3.1.0.beta')
4 | require 'sass/plugin/configuration'
5 | ActiveSupport.on_load(:before_configuration) do
6 | require 'sass'
7 | require 'sass/plugin'
8 | require 'sass/plugin/rails'
9 | end
10 | end
11 |
--------------------------------------------------------------------------------
/integration-faces/src/test/resources/faces-config.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 | rewrite_integration_faces_tests
9 |
10 |
11 |
--------------------------------------------------------------------------------
/integration-gwt/src/main/java/org/ocpsoft/rewrite/gwt/client/history/ListenerRegistration.java:
--------------------------------------------------------------------------------
1 | package org.ocpsoft.rewrite.gwt.client.history;
2 |
3 | /**
4 | * Returned when a listener is added.
5 | *
6 | * @author Lincoln Baxter, III
7 | */
8 | public interface ListenerRegistration
9 | {
10 | /**
11 | * Remove/un-register the listener
12 | */
13 | public void removeListener();
14 | }
15 |
--------------------------------------------------------------------------------
/config-prettyfaces-tests/src/test/resources/errorpage/errorpage-view.xhtml:
--------------------------------------------------------------------------------
1 |
3 |
5 |
6 |
7 | Parameter is valid
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/integration-faces-tests/src/test/resources/outbound-js-void.xhtml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/integration-gwt/src/main/java/org/ocpsoft/rewrite/gwt/client/history/ContextPathProvider.java:
--------------------------------------------------------------------------------
1 | package org.ocpsoft.rewrite.gwt.client.history;
2 |
3 |
4 | /**
5 | * Provide a method of retrieving the root context path from which this application is hosted.
6 | *
7 | * @author Lincoln Baxter, III
8 | */
9 | public interface ContextPathProvider
10 | {
11 | void getContextPath(HistoryStateImpl historyState);
12 | }
13 |
--------------------------------------------------------------------------------
/transform-markup/src/main/resources/ruby/redcloth/lib/case_sensitive_require/RedCloth.rb:
--------------------------------------------------------------------------------
1 | # A workaround to make Rails 2.1 gem dependency easier on case-sensitive filesystems.
2 | # Since the gem name is RedCloth and the file is redcloth.rb, config.gem 'RedCloth' doesn't
3 | # work. You'd have to use config.gem 'RedCloth', :lib => 'redcloth', and that's not
4 | # immediately obvious. This file remedies that.
5 | #
6 | require File.join(File.dirname(__FILE__), '..', 'redcloth')
--------------------------------------------------------------------------------
/config-prettyfaces-tests/src/test/resources/trailingslash/trailingslash-pretty-config.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/config-prettyfaces-tests/src/test/resources/context/index.xhtml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 | url=#{prettyContext.requestURL}
8 | query=#{prettyContext.requestQueryString}
9 | prettyRequest=#{prettyContext.prettyRequest}
10 |
11 |
12 |
--------------------------------------------------------------------------------
/integration-faces/src/test/resources/error-page-404.xhtml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Some link
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/config-prettyfaces-tests/src/test/resources/errorpage/errorpage-web.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 | 404
7 | /404.jsf
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/showcase/transform/src/main/webapp/WEB-INF/web.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 | org.ocpsoft.rewrite.config.CONFIG_RELOADING
8 | true
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/config-prettyfaces-tests/src/test/resources/errorpage/errorpage-404.xhtml:
--------------------------------------------------------------------------------
1 |
3 |
5 |
6 |
7 | Custom 404 page
8 | \#{1+1} = #{1+1}
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/impl-tests/src/test/java/org/ocpsoft/rewrite/util/DefaultInstanceProviderTest.java:
--------------------------------------------------------------------------------
1 | package org.ocpsoft.rewrite.util;
2 |
3 | import org.junit.Test;
4 | import org.ocpsoft.common.util.Assert;
5 |
6 | public class DefaultInstanceProviderTest
7 | {
8 | @Test
9 | public void testDefaultInstanceProvider()
10 | {
11 | DefaultInstanceProviderTest test = Instances.lookup(DefaultInstanceProviderTest.class);
12 | Assert.notNull(test, "Instance was null.");
13 | }
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/showcase/transform/src/main/webapp/less/style.less:
--------------------------------------------------------------------------------
1 | @base: #f938ab;
2 |
3 | .box-shadow(@style, @c) when (iscolor(@c)) {
4 | box-shadow: @style @c;
5 | -webkit-box-shadow: @style @c;
6 | -moz-box-shadow: @style @c;
7 | }
8 | .box-shadow(@style, @alpha: 50%) when (isnumber(@alpha)) {
9 | .box-shadow(@style, rgba(0, 0, 0, @alpha));
10 | }
11 | .box {
12 | color: saturate(@base, 5%);
13 | border-color: lighten(@base, 30%);
14 | div { .box-shadow(0 0 5px, 30%) }
15 | }
16 |
--------------------------------------------------------------------------------
/security-integration-shiro/src/test/java/org/ocpsoft/rewrite/security/shiro/AdminPageBean.java:
--------------------------------------------------------------------------------
1 | package org.ocpsoft.rewrite.security.shiro;
2 |
3 | import javax.enterprise.context.RequestScoped;
4 |
5 | import org.ocpsoft.rewrite.annotation.ForwardTo;
6 | import org.ocpsoft.rewrite.annotation.PathPattern;
7 |
8 | @RequestScoped
9 | @PathPattern("/admin/something")
10 | @ShiroRoleRequired("admin")
11 | @ForwardTo("/faces/protected-page.xhtml")
12 | public class AdminPageBean
13 | {
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/integration-cdi-tests/src/test/resources/convert-simple.xhtml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 | byId = #{bindingConverterBean.byId}
7 |
8 | byType = #{bindingConverterBean.byType}
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/showcase/transform/src/main/webapp/markdown/index.md:
--------------------------------------------------------------------------------
1 | A First Level Header
2 | ====================
3 |
4 | A Second Level Header
5 | ---------------------
6 |
7 | Now is the time for all good men to come to
8 | the aid of their country. This is just a
9 | regular paragraph.
10 |
11 | The quick brown fox jumped over the lazy
12 | dog's back.
13 |
14 | ### Header 3
15 |
16 | > This is a blockquote.
17 | >
18 | > This is the second paragraph in the blockquote.
19 | >
20 | > ## This is an H2 in blockquote a
21 |
--------------------------------------------------------------------------------
/integration-faces-tests/src/test/resources/convert-simple.xhtml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 | byId = #{bindingConverterBean.byId}
7 |
8 | byType = #{bindingConverterBean.byType}
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/integration-faces/src/test/resources/resolver.xhtml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 | Name = [#{facesBeanNameResolverBean.name}]
8 |
9 | Uppercase = [#{facesBeanNameResolverBean.uppercase}]
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/config-prettyfaces-tests/src/test/resources/loop/loop-pretty-config.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/config-prettyfaces-tests/src/test/resources/mapping/pretty-config.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/config-prettyfaces-tests/src/test/resources/web.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 | COOKIE
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/integration-faces/src/test/resources/expression-language.xhtml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 | Name = [#{expressionLanguageBean.name}]
8 |
9 | Uppercase = [#{expressionLanguageBean.uppercase}]
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/integration-faces/src/test/resources/schemaless-cdn-page.xhtml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | Nothing important here
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/transform-markup/src/main/resources/ruby/sass/lib/sass/cache_stores.rb:
--------------------------------------------------------------------------------
1 | require 'stringio'
2 |
3 | module Sass
4 | # Sass cache stores are in charge of storing cached information,
5 | # especially parse trees for Sass documents.
6 | #
7 | # User-created importers must inherit from {CacheStores::Base}.
8 | module CacheStores
9 | end
10 | end
11 |
12 | require 'sass/cache_stores/base'
13 | require 'sass/cache_stores/filesystem'
14 | require 'sass/cache_stores/memory'
15 | require 'sass/cache_stores/chain'
16 |
--------------------------------------------------------------------------------
/config-prettyfaces-tests/src/test/resources/interaction/faces-navigate-pretty-config.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/integration-faces-tests/src/test/resources/outbound-resource.xhtml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/transform-markup/src/main/resources/ruby/sass/lib/sass/tree/while_node.rb:
--------------------------------------------------------------------------------
1 | require 'sass/tree/node'
2 |
3 | module Sass::Tree
4 | # A dynamic node representing a Sass `@while` loop.
5 | #
6 | # @see Sass::Tree
7 | class WhileNode < Node
8 | # The parse tree for the continuation expression.
9 | # @return [Script::Node]
10 | attr_accessor :expr
11 |
12 | # @param expr [Script::Node] See \{#expr}
13 | def initialize(expr)
14 | @expr = expr
15 | super()
16 | end
17 | end
18 | end
19 |
--------------------------------------------------------------------------------
/integration-faces-tests/src/test/resources/error-web.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
8 | 404
9 | /faces/error.xhtml
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/transform-markup/src/main/resources/ruby/sass/lib/sass/tree/warn_node.rb:
--------------------------------------------------------------------------------
1 | module Sass
2 | module Tree
3 | # A dynamic node representing a Sass `@warn` statement.
4 | #
5 | # @see Sass::Tree
6 | class WarnNode < Node
7 | # The expression to print.
8 | # @return [Script::Node]
9 | attr_accessor :expr
10 |
11 | # @param expr [Script::Node] The expression to print
12 | def initialize(expr)
13 | @expr = expr
14 | super()
15 | end
16 | end
17 | end
18 | end
19 |
--------------------------------------------------------------------------------
/config-prettyfaces-tests/src/test/java/org/ocpsoft/rewrite/prettyfaces/interaction/FacesNavigateInteractionBean.java:
--------------------------------------------------------------------------------
1 | package org.ocpsoft.rewrite.prettyfaces.interaction;
2 |
3 | import org.ocpsoft.rewrite.faces.navigate.Navigate;
4 |
5 | import javax.enterprise.context.RequestScoped;
6 | import javax.inject.Named;
7 |
8 | @Named("facesInteraction")
9 | @RequestScoped
10 | public class FacesNavigateInteractionBean
11 | {
12 |
13 | public Navigate navigate()
14 | {
15 | return Navigate.to("/page.jsf");
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/transform-markup/src/main/resources/ruby/sass/lib/sass/tree/debug_node.rb:
--------------------------------------------------------------------------------
1 | module Sass
2 | module Tree
3 | # A dynamic node representing a Sass `@debug` statement.
4 | #
5 | # @see Sass::Tree
6 | class DebugNode < Node
7 | # The expression to print.
8 | # @return [Script::Node]
9 | attr_accessor :expr
10 |
11 | # @param expr [Script::Node] The expression to print
12 | def initialize(expr)
13 | @expr = expr
14 | super()
15 | end
16 | end
17 | end
18 | end
19 |
--------------------------------------------------------------------------------
/transform-markup/src/main/resources/ruby/sass/lib/sass/tree/return_node.rb:
--------------------------------------------------------------------------------
1 | module Sass
2 | module Tree
3 | # A dynamic node representing returning from a function.
4 | #
5 | # @see Sass::Tree
6 | class ReturnNode < Node
7 | # The expression to return.
8 | # @type [Script::Node]
9 | attr_accessor :expr
10 |
11 | # @param expr [Script::Node] The expression to return
12 | def initialize(expr)
13 | @expr = expr
14 | super()
15 | end
16 | end
17 | end
18 | end
19 |
--------------------------------------------------------------------------------
/config-prettyfaces-tests/src/test/resources/context/pretty-config.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/integration-faces/src/test/java/org/ocpsoft/rewrite/faces/test/FacesBase.java:
--------------------------------------------------------------------------------
1 | package org.ocpsoft.rewrite.faces.test;
2 |
3 | import org.jboss.shrinkwrap.api.spec.WebArchive;
4 | import org.ocpsoft.rewrite.test.RewriteTest;
5 |
6 | public class FacesBase
7 | {
8 | public static WebArchive getDeployment()
9 | {
10 | return RewriteTest
11 | .getDeploymentNoWebXml()
12 | .setWebXML("faces-web.xml")
13 | .addAsWebInfResource("faces-config.xml", "faces-config.xml");
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/transform-markup/src/main/resources/ruby/sass/lib/sass/script/bool.rb:
--------------------------------------------------------------------------------
1 | require 'sass/script/literal'
2 |
3 | module Sass::Script
4 | # A SassScript object representing a boolean (true or false) value.
5 | class Bool < Literal
6 | # The Ruby value of the boolean.
7 | #
8 | # @return [Boolean]
9 | attr_reader :value
10 | alias_method :to_bool, :value
11 |
12 | # @return [String] "true" or "false"
13 | def to_s(opts = {})
14 | @value.to_s
15 | end
16 | alias_method :to_sass, :to_s
17 | end
18 | end
19 |
--------------------------------------------------------------------------------
/config-prettyfaces-tests/src/test/resources/outbound/view-hardcoded-params-pretty-config.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/transform-markup/src/main/resources/ruby/sass/lib/sass/scss/script_lexer.rb:
--------------------------------------------------------------------------------
1 | module Sass
2 | module SCSS
3 | # A mixin for subclasses of {Sass::Script::Lexer}
4 | # that makes them usable by {SCSS::Parser} to parse SassScript.
5 | # In particular, the lexer doesn't support `!` for a variable prefix.
6 | module ScriptLexer
7 | private
8 |
9 | def variable
10 | return [:raw, "!important"] if scan(Sass::SCSS::RX::IMPORTANT)
11 | _variable(Sass::SCSS::RX::VARIABLE)
12 | end
13 | end
14 | end
15 | end
16 |
--------------------------------------------------------------------------------
/annotations-api/src/main/java/org/ocpsoft/rewrite/annotation/spi/AnnotationHandler.java:
--------------------------------------------------------------------------------
1 | package org.ocpsoft.rewrite.annotation.spi;
2 |
3 | import java.lang.annotation.Annotation;
4 |
5 | import org.ocpsoft.common.pattern.Weighted;
6 | import org.ocpsoft.rewrite.annotation.api.ClassContext;
7 | import org.ocpsoft.rewrite.annotation.api.HandlerChain;
8 |
9 | public interface AnnotationHandler extends Weighted
10 | {
11 | Class handles();
12 |
13 | void process(ClassContext context, A annotation, HandlerChain chain);
14 | }
15 |
--------------------------------------------------------------------------------
/config-annotations/src/test/java/org/ocpsoft/rewrite/annotation/convert/LowercaseConverter.java:
--------------------------------------------------------------------------------
1 | package org.ocpsoft.rewrite.annotation.convert;
2 |
3 | import org.ocpsoft.rewrite.context.EvaluationContext;
4 | import org.ocpsoft.rewrite.event.Rewrite;
5 | import org.ocpsoft.rewrite.param.Converter;
6 |
7 | public class LowercaseConverter implements Converter
8 | {
9 |
10 | @Override
11 | public String convert(Rewrite event, EvaluationContext context, Object value)
12 | {
13 | return value.toString().toLowerCase();
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/config-annotations/src/test/java/org/ocpsoft/rewrite/annotation/validate/EvenLengthValidator.java:
--------------------------------------------------------------------------------
1 | package org.ocpsoft.rewrite.annotation.validate;
2 |
3 | import org.ocpsoft.rewrite.context.EvaluationContext;
4 | import org.ocpsoft.rewrite.event.Rewrite;
5 | import org.ocpsoft.rewrite.param.Validator;
6 |
7 | public class EvenLengthValidator implements Validator
8 | {
9 |
10 | @Override
11 | public boolean isValid(Rewrite event, EvaluationContext context, String value)
12 | {
13 | return value.trim().length() % 2 == 0;
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/config-prettyfaces/src/main/java/com/ocpsoft/pretty/faces/util/NullComponent.java:
--------------------------------------------------------------------------------
1 | package com.ocpsoft.pretty.faces.util;
2 |
3 | import javax.faces.component.UIComponentBase;
4 |
5 | /**
6 | * This component exists only to provide Path and Query Validators with a component for which they should not throw
7 | * {@link NullPointerException}s
8 | *
9 | * @author lb3
10 | */
11 | public class NullComponent extends UIComponentBase
12 | {
13 | @Override
14 | public String getFamily()
15 | {
16 | return "com.ocpsoft.pretty.NullComponent";
17 | }
18 | }
--------------------------------------------------------------------------------
/transform/src/main/resources/org/ocpsoft/rewrite/transform/js/api.js:
--------------------------------------------------------------------------------
1 | /*
2 | * render function called from LessEngine
3 | */
4 | function lessToCss(input) {
5 |
6 | /* setup the parser*/
7 | var parser = new less.Parser({
8 | optimization : 2
9 | });
10 |
11 | /* invoke the parser */
12 | var result;
13 | parser.parse(input, function(err, tree) {
14 |
15 | /* fail for any errors */
16 | if (err) {
17 | throw err;
18 | }
19 |
20 | /* CSS transformation */
21 | result = tree.toCSS();
22 |
23 | });
24 | return result;
25 |
26 | };
27 |
--------------------------------------------------------------------------------
/annotations-impl/src/test/java/org/ocpsoft/rewrite/annotation/visit/FieldAnno.java:
--------------------------------------------------------------------------------
1 | package org.ocpsoft.rewrite.annotation.visit;
2 |
3 | import java.lang.annotation.Documented;
4 | import java.lang.annotation.ElementType;
5 | import java.lang.annotation.Inherited;
6 | import java.lang.annotation.Retention;
7 | import java.lang.annotation.RetentionPolicy;
8 | import java.lang.annotation.Target;
9 |
10 | @Inherited
11 | @Documented
12 | @Target(ElementType.FIELD)
13 | @Retention(RetentionPolicy.RUNTIME)
14 | public @interface FieldAnno
15 | {
16 | String value();
17 | }
18 |
--------------------------------------------------------------------------------
/annotations-impl/src/test/java/org/ocpsoft/rewrite/annotation/visit/TypeAnno.java:
--------------------------------------------------------------------------------
1 | package org.ocpsoft.rewrite.annotation.visit;
2 |
3 | import java.lang.annotation.Documented;
4 | import java.lang.annotation.ElementType;
5 | import java.lang.annotation.Inherited;
6 | import java.lang.annotation.Retention;
7 | import java.lang.annotation.RetentionPolicy;
8 | import java.lang.annotation.Target;
9 |
10 | @Inherited
11 | @Documented
12 | @Target(ElementType.TYPE)
13 | @Retention(RetentionPolicy.RUNTIME)
14 | public @interface TypeAnno
15 | {
16 | String value();
17 | }
18 |
--------------------------------------------------------------------------------
/annotations-impl/src/test/java/org/ocpsoft/rewrite/annotation/visit/MethodAnno.java:
--------------------------------------------------------------------------------
1 | package org.ocpsoft.rewrite.annotation.visit;
2 |
3 | import java.lang.annotation.Documented;
4 | import java.lang.annotation.ElementType;
5 | import java.lang.annotation.Inherited;
6 | import java.lang.annotation.Retention;
7 | import java.lang.annotation.RetentionPolicy;
8 | import java.lang.annotation.Target;
9 |
10 | @Inherited
11 | @Documented
12 | @Target(ElementType.METHOD)
13 | @Retention(RetentionPolicy.RUNTIME)
14 | public @interface MethodAnno
15 | {
16 | String value();
17 | }
18 |
--------------------------------------------------------------------------------
/annotations-impl/src/test/java/org/ocpsoft/rewrite/annotation/visit/ParamAnno.java:
--------------------------------------------------------------------------------
1 | package org.ocpsoft.rewrite.annotation.visit;
2 |
3 | import java.lang.annotation.Documented;
4 | import java.lang.annotation.ElementType;
5 | import java.lang.annotation.Inherited;
6 | import java.lang.annotation.Retention;
7 | import java.lang.annotation.RetentionPolicy;
8 | import java.lang.annotation.Target;
9 |
10 | @Inherited
11 | @Documented
12 | @Target(ElementType.PARAMETER)
13 | @Retention(RetentionPolicy.RUNTIME)
14 | public @interface ParamAnno
15 | {
16 | String value();
17 | }
18 |
--------------------------------------------------------------------------------
/config-prettyfaces-tests/src/test/resources/rule_naming/index.xhtml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
9 |
10 | url=#{prettyContext.requestURL}
11 | query=#{prettyContext.requestQueryString}
12 | prettyRequest=#{prettyContext.prettyRequest}
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/addressbuilder/src/main/java/org/ocpsoft/urlbuilder/util/CaptureType.java:
--------------------------------------------------------------------------------
1 | package org.ocpsoft.urlbuilder.util;
2 |
3 | public enum CaptureType
4 | {
5 | BRACE('{', '}'), BRACKET('[', ']'), PAREN('(', ')'), REGEX('/', '/');
6 |
7 | private char begin;
8 | private char end;
9 |
10 | private CaptureType(final char begin, final char end)
11 | {
12 | this.begin = begin;
13 | this.end = end;
14 | }
15 |
16 | public char getBegin()
17 | {
18 | return begin;
19 | }
20 |
21 | public char getEnd()
22 | {
23 | return end;
24 | }
25 | }
--------------------------------------------------------------------------------
/config-servlet-tests/src/test/java/org/ocpsoft/rewrite/servlet/config/DomainConverter.java:
--------------------------------------------------------------------------------
1 | package org.ocpsoft.rewrite.servlet.config;
2 |
3 | import org.ocpsoft.rewrite.context.EvaluationContext;
4 | import org.ocpsoft.rewrite.event.Rewrite;
5 | import org.ocpsoft.rewrite.param.Converter;
6 |
7 | public class DomainConverter implements Converter
8 | {
9 | @Override
10 | public DomainConvertedType convert(Rewrite event, EvaluationContext context, Object value)
11 | {
12 | return new DomainConvertedType(value.toString());
13 | }
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/config-prettyfaces-tests/src/test/resources/loop/loop.xhtml:
--------------------------------------------------------------------------------
1 |
3 |
8 |
9 |
10 | Infinite Loop Test
11 |
12 |
13 | Loop avoided.
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/config-prettyfaces-tests/src/test/resources/dynaview/ambiguousViewId.xhtml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/transform-markup/src/main/resources/ruby/sass/lib/sass/scss.rb:
--------------------------------------------------------------------------------
1 | require 'sass/scss/rx'
2 | require 'sass/scss/script_lexer'
3 | require 'sass/scss/script_parser'
4 | require 'sass/scss/parser'
5 | require 'sass/scss/static_parser'
6 | require 'sass/scss/css_parser'
7 |
8 | module Sass
9 | # SCSS is the CSS syntax for Sass.
10 | # It parses into the same syntax tree as Sass,
11 | # and generates the same sort of output CSS.
12 | #
13 | # This module contains code for the parsing of SCSS.
14 | # The evaluation is handled by the broader {Sass} module.
15 | module SCSS; end
16 | end
17 |
--------------------------------------------------------------------------------
/transform-markup/src/main/resources/ruby/sass/lib/sass/tree/charset_node.rb:
--------------------------------------------------------------------------------
1 | module Sass::Tree
2 | # A static node representing an unproccessed Sass `@charset` directive.
3 | #
4 | # @see Sass::Tree
5 | class CharsetNode < Node
6 | # The name of the charset.
7 | #
8 | # @return [String]
9 | attr_accessor :name
10 |
11 | # @param name [String] see \{#name}
12 | def initialize(name)
13 | @name = name
14 | super()
15 | end
16 |
17 | # @see Node#invisible?
18 | def invisible?
19 | !Sass::Util.ruby1_8?
20 | end
21 | end
22 | end
23 |
--------------------------------------------------------------------------------
/config-prettyfaces-tests/src/test/resources/interaction/interaction-page.xhtml:
--------------------------------------------------------------------------------
1 |
3 |
7 |
8 |
9 | Forwards Test
10 |
11 |
12 |
13 | Forwards Test
14 | The page rendered fine!
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/config-prettyfaces-tests/src/test/resources/pathparams/index.xhtml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
9 | url=#{prettyContext.requestURL}
10 | query=#{prettyContext.requestQueryString}
11 | prettyRequest=#{prettyContext.prettyRequest}
12 | paramDigits=#{request.getParameter('digits')}
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/test-base/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 4.0.0
4 |
5 |
6 | rewrite-parent
7 | org.ocpsoft.rewrite
8 | 3.5.3-SNAPSHOT
9 | ../
10 |
11 |
12 | rewrite-test-base
13 |
14 |
15 |
--------------------------------------------------------------------------------
/config-prettyfaces-tests/src/test/resources/loop/rewrite-loop.xhtml:
--------------------------------------------------------------------------------
1 |
3 |
8 |
9 |
10 | Rewrite Loop Test
11 |
12 |
13 |
14 |
15 | Rewrite loop test page rendered!
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/config-prettyfaces-tests/src/test/resources/mapping/page.xhtml:
--------------------------------------------------------------------------------
1 |
3 |
8 |
9 |
10 | Result Page
11 |
12 |
13 |
14 |
15 |
16 | Mapped view was rendered!
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/integration-faces-tests/src/test/resources/actionurl-page1.xhtml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/integration-cdi-tests/src/test/resources/action-phases.xhtml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 | #{entry}
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/integration-cdi-tests/src/test/resources/binding-phases.xhtml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 | #{entry}
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/integration-faces-tests/src/test/resources/action-phases.xhtml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 | #{entry}
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/integration-faces-tests/src/test/resources/actionurl-page2.xhtml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/integration-faces-tests/src/test/resources/error-page.xhtml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
10 | Error Page
11 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/api/src/main/java/org/ocpsoft/rewrite/config/NoOp.java:
--------------------------------------------------------------------------------
1 | package org.ocpsoft.rewrite.config;
2 |
3 | import org.ocpsoft.rewrite.context.EvaluationContext;
4 | import org.ocpsoft.rewrite.event.Rewrite;
5 |
6 | /**
7 | * An {@link OperationBuilder} that does nothing.
8 | *
9 | * @author Lincoln Baxter, III
10 | */
11 | public final class NoOp extends DefaultOperationBuilder
12 | {
13 | @Override
14 | public void perform(Rewrite event, EvaluationContext context)
15 | {}
16 |
17 | @Override
18 | public String toString()
19 | {
20 | return "new NoOp()";
21 | }
22 | }
--------------------------------------------------------------------------------
/integration-faces-tests/src/test/resources/binding-phases.xhtml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 | #{entry}
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/config-prettyfaces-tests/src/test/resources/loop/viewidmatch.xhtml:
--------------------------------------------------------------------------------
1 |
3 |
8 |
9 |
10 | ViewIdMatchTest
11 |
12 |
13 |
14 |
15 |
16 | Injected value: [#{viewIdMatchBean.value}]
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/config-annotations/src/test/java/org/ocpsoft/rewrite/annotation/join/JoinParameterBean.java:
--------------------------------------------------------------------------------
1 | package org.ocpsoft.rewrite.annotation.join;
2 |
3 | import javax.enterprise.context.RequestScoped;
4 | import javax.inject.Named;
5 |
6 | import org.ocpsoft.rewrite.annotation.Join;
7 |
8 | @Named
9 | @RequestScoped
10 | @Join(path = "/join/{value}/", to = "/join-parameter.jsp")
11 | public class JoinParameterBean
12 | {
13 |
14 | private String value;
15 |
16 | public String getValue()
17 | {
18 | return value;
19 | }
20 |
21 | public void setValue(String value)
22 | {
23 | this.value = value;
24 | }
25 |
26 | }
27 |
--------------------------------------------------------------------------------
/config-prettyfaces-tests/src/test/resources/errorpage/errorpage-pretty-config.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/integration-faces-tests/src/test/resources/outbound-special-cases.xhtml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 | click
7 |
8 | click
9 |
10 | click
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/config-prettyfaces-tests/src/test/resources/dynaview/parameterized-correct.xhtml:
--------------------------------------------------------------------------------
1 |
3 |
8 |
9 |
10 | DynaView Test
11 |
12 |
13 |
14 |
15 |
16 | The parameter was correctly injected!
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/transform-markup/src/main/resources/ruby/asciidoctor/lib/asciidoctor/debug.rb:
--------------------------------------------------------------------------------
1 | module Asciidoctor
2 | module Debug
3 | @show_debug = nil
4 |
5 | def self.debug
6 | warn yield if self.show_debug_output?
7 | end
8 |
9 | def self.set_debug(value)
10 | @show_debug = value
11 | end
12 |
13 | def self.show_debug_output?
14 | @show_debug || (ENV['DEBUG'] == 'true' && ENV['SUPPRESS_DEBUG'] != 'true')
15 | end
16 |
17 | def self.puts_indented(level, *args)
18 | indentation = " " * level * 2
19 |
20 | args.each do |arg|
21 | self.debug { "#{indentation}#{arg}" }
22 | end
23 | end
24 | end
25 | end
26 |
--------------------------------------------------------------------------------
/config-prettyfaces-tests/src/test/java/org/ocpsoft/rewrite/prettyfaces/interaction/InteractionDynaViewBean.java:
--------------------------------------------------------------------------------
1 | package org.ocpsoft.rewrite.prettyfaces.interaction;
2 |
3 | import javax.enterprise.context.RequestScoped;
4 | import javax.inject.Named;
5 |
6 | @Named
7 | @RequestScoped
8 | public class InteractionDynaViewBean
9 | {
10 |
11 | private String value;
12 |
13 | public String viewId()
14 | {
15 | return "/" + value + ".jsf";
16 | }
17 |
18 | public String getValue()
19 | {
20 | return value;
21 | }
22 |
23 | public void setValue(String value)
24 | {
25 | this.value = value;
26 | }
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/transform-markup/src/main/resources/ruby/redcloth/lib/tasks/pureruby.rake:
--------------------------------------------------------------------------------
1 | # Apparently this file gets loaded by Rails. Only want to define the pureruby
2 | # task in the context of RedCloth compilation (echoe loaded).
3 |
4 | if Gem::Specification.const_defined?(:PLATFORM_CROSS_TARGETS)
5 | Gem::Specification::PLATFORM_CROSS_TARGETS << "pureruby"
6 |
7 | task 'pureruby' do
8 | reset_target 'pureruby'
9 | end
10 |
11 | if target = ARGV.detect do |arg|
12 | # Hack to get the platform set before the Rakefile evaluates
13 | Gem::Specification::PLATFORM_CROSS_TARGETS.include? arg
14 | end
15 | reset_target target
16 | end
17 | end
--------------------------------------------------------------------------------
/config-prettyfaces-tests/src/test/resources/outbound/outbound-pretty-config.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/integration-cdi-tests/src/test/resources/action-postback.xhtml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 | Default = [#{ignorePostbackBean.actionDefault}]
9 |
10 | Ignore Postback = [#{ignorePostbackBean.actionIgnorePostback}]
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/integration-faces-tests/src/test/resources/action-postback.xhtml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 | Default = [#{ignorePostbackBean.actionDefault}]
9 |
10 | Ignore Postback = [#{ignorePostbackBean.actionIgnorePostback}]
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/showcase/rest-ws/src/main/java/org/ocpsoft/rewrite/showcase/rest/IntegerConstraint.java:
--------------------------------------------------------------------------------
1 | package org.ocpsoft.rewrite.showcase.rest;
2 |
3 | import org.ocpsoft.rewrite.context.EvaluationContext;
4 | import org.ocpsoft.rewrite.event.Rewrite;
5 | import org.ocpsoft.rewrite.param.Constraint;
6 |
7 | public final class IntegerConstraint implements Constraint
8 | {
9 | @Override
10 | public boolean isSatisfiedBy(Rewrite event, EvaluationContext context, String value)
11 | {
12 | try {
13 | Integer.valueOf(value);
14 | }
15 | catch (NumberFormatException e) {
16 | return false;
17 | }
18 | return true;
19 | }
20 | }
--------------------------------------------------------------------------------
/integration-cdi-tests/src/test/resources/binding-postback.xhtml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 | valueDefault = [#{bindingPostbackBean.valueDefault}]
9 |
10 | valueIgnorePostback = [#{bindingPostbackBean.valueIgnorePostback}]
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/integration-faces-tests/src/test/resources/binding-postback.xhtml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 | valueDefault = [#{bindingPostbackBean.valueDefault}]
9 |
10 | valueIgnorePostback = [#{bindingPostbackBean.valueIgnorePostback}]
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/integration-spring/src/test/resources/spring-web.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 | contextConfigLocation
7 | /WEB-INF/applicationContext*.xml
8 |
9 |
10 |
11 | org.springframework.web.context.ContextLoaderListener
12 |
13 |
14 |
--------------------------------------------------------------------------------
/.github/workflows/maven-deploy.yml:
--------------------------------------------------------------------------------
1 | name: Deploy Snapshots
2 |
3 | on:
4 | push:
5 | branches:
6 | - main
7 |
8 | jobs:
9 | deploy:
10 | runs-on: ubuntu-latest
11 | steps:
12 | - uses: actions/checkout@v3
13 | - name: Set up JDK 8
14 | uses: actions/setup-java@v3
15 | with:
16 | java-version: 8
17 | distribution: 'temurin'
18 | cache: 'maven'
19 | - run: ./mvnw --batch-mode -s .github/settings.xml -DperformRelease -DskipTests -Dgpg.skip=true deploy
20 | env:
21 | SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
22 | SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
23 |
--------------------------------------------------------------------------------
/api-tests/src/test/java/org/ocpsoft/rewrite/config/NullValueConfigurationProvider.java:
--------------------------------------------------------------------------------
1 | package org.ocpsoft.rewrite.config;
2 |
3 |
4 | /**
5 | * @author Lincoln Baxter, III
6 | *
7 | */
8 | public class NullValueConfigurationProvider implements ConfigurationProvider
9 | {
10 |
11 | @Override
12 | public int priority()
13 | {
14 | return 0;
15 | }
16 |
17 | @Override
18 | public boolean handles(final Object payload)
19 | {
20 | return true;
21 | }
22 |
23 | @Override
24 | public Configuration getConfiguration(final Object context)
25 | {
26 | return null;
27 | }
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/transform-markup/src/main/resources/ruby/sass/lib/sass/cache_stores/null.rb:
--------------------------------------------------------------------------------
1 | module Sass
2 | module CacheStores
3 | # Doesn't store anything, but records what things it should have stored.
4 | # This doesn't currently have any use except for testing and debugging.
5 | #
6 | # @private
7 | class Null < Base
8 | def initialize
9 | @keys = {}
10 | end
11 |
12 | def _retrieve(key, version, sha)
13 | nil
14 | end
15 |
16 | def _store(key, version, sha, contents)
17 | @keys[key] = true
18 | end
19 |
20 | def was_set?(key)
21 | @keys[key]
22 | end
23 | end
24 | end
25 | end
26 |
--------------------------------------------------------------------------------
/.github/settings.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 | sonatype-nexus-snapshots
7 | ${env.SONATYPE_USERNAME}
8 | ${env.SONATYPE_PASSWORD}
9 |
10 |
11 | ossrh
12 | ${env.SONATYPE_USERNAME}
13 | ${env.SONATYPE_PASSWORD}
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/api-tests/src/test/java/org/ocpsoft/rewrite/config/RewriteFilterInvalidRewriteType.java:
--------------------------------------------------------------------------------
1 | package org.ocpsoft.rewrite.config;
2 |
3 | import org.ocpsoft.rewrite.AbstractRewrite;
4 | import org.ocpsoft.rewrite.context.Context;
5 | import org.ocpsoft.rewrite.event.Flow;
6 | import org.ocpsoft.rewrite.event.Rewrite;
7 |
8 | public class RewriteFilterInvalidRewriteType extends AbstractRewrite implements Rewrite
9 | {
10 | @Override
11 | public Context getRewriteContext()
12 | {
13 | throw new IllegalStateException("Fail if called.");
14 | }
15 |
16 | @Override
17 | public Flow getFlow()
18 | {
19 | throw new IllegalStateException("Fail if called.");
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/integration-spring/src/test/resources/applicationContext.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/security-integration-shiro/src/test/java/org/ocpsoft/rewrite/security/shiro/ShiroTestRealm.java:
--------------------------------------------------------------------------------
1 | package org.ocpsoft.rewrite.security.shiro;
2 |
3 | import org.apache.shiro.authc.SimpleAccount;
4 | import org.apache.shiro.realm.SimpleAccountRealm;
5 |
6 | public class ShiroTestRealm extends SimpleAccountRealm
7 | {
8 |
9 | public ShiroTestRealm()
10 | {
11 |
12 | // an admin user
13 | SimpleAccount ck = new SimpleAccount("ck", "secret", getName());
14 | ck.addRole("admin");
15 | add(ck);
16 |
17 | // some other user
18 | SimpleAccount somebody = new SimpleAccount("somebody", "secret", getName());
19 | add(somebody);
20 |
21 | }
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/transform-markup/src/main/resources/ruby/sass/lib/sass/tree/each_node.rb:
--------------------------------------------------------------------------------
1 | require 'sass/tree/node'
2 |
3 | module Sass::Tree
4 | # A dynamic node representing a Sass `@each` loop.
5 | #
6 | # @see Sass::Tree
7 | class EachNode < Node
8 | # The name of the loop variable.
9 | # @return [String]
10 | attr_reader :var
11 |
12 | # The parse tree for the list.
13 | # @param [Script::Node]
14 | attr_accessor :list
15 |
16 | # @param var [String] The name of the loop variable
17 | # @param list [Script::Node] The parse tree for the list
18 | def initialize(var, list)
19 | @var = var
20 | @list = list
21 | super()
22 | end
23 | end
24 | end
25 |
--------------------------------------------------------------------------------
/config-prettyfaces/src/test/resources/faces-config-resolver-test.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 | myManagedBean
9 | com.ocpsoft.pretty.faces.el.resolver.FacesConfigBeanNameResolverTest$FacesConfigResolverManagedBean
10 | request
11 |
12 |
13 |
--------------------------------------------------------------------------------
/config-annotations/src/test/java/org/ocpsoft/rewrite/annotation/param/ParameterTestBean.java:
--------------------------------------------------------------------------------
1 | package org.ocpsoft.rewrite.annotation.param;
2 |
3 | import javax.enterprise.context.RequestScoped;
4 | import javax.inject.Named;
5 |
6 | import org.ocpsoft.rewrite.annotation.Join;
7 | import org.ocpsoft.rewrite.annotation.Parameter;
8 |
9 | @Named
10 | @RequestScoped
11 | @Join(path = "/param/{value}/", to = "/param.jsp")
12 | public class ParameterTestBean
13 | {
14 |
15 | @Parameter
16 | private String value;
17 |
18 | public String getValue()
19 | {
20 | return value;
21 | }
22 |
23 | public void setValue(String value)
24 | {
25 | this.value = value;
26 | }
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/config-annotations/src/test/java/org/ocpsoft/rewrite/annotation/query/QueryParameterBean.java:
--------------------------------------------------------------------------------
1 | package org.ocpsoft.rewrite.annotation.query;
2 |
3 | import javax.enterprise.context.RequestScoped;
4 | import javax.inject.Named;
5 |
6 | import org.ocpsoft.rewrite.annotation.Join;
7 | import org.ocpsoft.rewrite.annotation.Parameter;
8 |
9 | @Named
10 | @RequestScoped
11 | @Join(path = "/query", to = "/query.jsp")
12 | public class QueryParameterBean
13 | {
14 |
15 | @Parameter("q")
16 | private String value;
17 |
18 | public String getValue()
19 | {
20 | return value;
21 | }
22 |
23 | public void setValue(String value)
24 | {
25 | this.value = value;
26 | }
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/transform-markup/src/main/resources/ruby/redcloth/lib/redcloth/erb_extension.rb:
--------------------------------------------------------------------------------
1 | class ERB
2 | module Util
3 |
4 | #
5 | # A utility method for transforming Textile in _s_ to HTML.
6 | #
7 | # require "erb"
8 | # include ERB::Util
9 | #
10 | # puts textilize("Isn't ERB *great*?")
11 | #
12 | # _Generates_
13 | #
14 | # Isn’t ERB great ?
15 | #
16 | def textilize( s )
17 | if s && s.respond_to?(:to_s)
18 | RedCloth.new( s.to_s ).to_html
19 | end
20 | end
21 |
22 | alias t textilize
23 | module_function :t
24 | module_function :textilize
25 |
26 | end
27 | end
28 |
--------------------------------------------------------------------------------
/config-annotations/src/test/java/org/ocpsoft/rewrite/annotation/action/RequestActionBean.java:
--------------------------------------------------------------------------------
1 | package org.ocpsoft.rewrite.annotation.action;
2 |
3 | import javax.enterprise.context.RequestScoped;
4 | import javax.inject.Named;
5 |
6 | import org.ocpsoft.rewrite.annotation.Join;
7 | import org.ocpsoft.rewrite.annotation.RequestAction;
8 |
9 | @Named
10 | @RequestScoped
11 | @Join(path = "/action", to = "/action.jsp")
12 | public class RequestActionBean
13 | {
14 |
15 | private String log = "nothing happend";
16 |
17 | @RequestAction
18 | public void action()
19 | {
20 | log = "action invoked";
21 | }
22 |
23 | public String getLog()
24 | {
25 | return log;
26 | }
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/config-prettyfaces-tests/src/test/resources/pathparams/pretty-config.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/config-prettyfaces-tests/src/test/resources/rule_naming/pretty-config.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/integration-faces-tests/src/test/resources/jsessionid.xhtml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 | JSessionID Test Page
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/api/src/main/java/org/ocpsoft/rewrite/param/ParameterizedRule.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2013 Red Hat, Inc. and/or its affiliates.
3 | *
4 | * Licensed under the Eclipse Public License version 1.0, available at
5 | * http://www.eclipse.org/legal/epl-v10.html
6 | */
7 | package org.ocpsoft.rewrite.param;
8 |
9 | import org.ocpsoft.rewrite.config.Rule;
10 |
11 | /**
12 | * Represents a {@link Rule} that has a {@link ParameterStore}.
13 | *
14 | * @author Lincoln Baxter, III
15 | */
16 | public interface ParameterizedRule extends Rule, Parameterized
17 | {
18 | /**
19 | * Return the {@link ParameterStore} for this {@link Rule}
20 | */
21 | ParameterStore getParameterStore();
22 | }
23 |
--------------------------------------------------------------------------------
/config-prettyfaces-tests/src/test/java/org/ocpsoft/rewrite/prettyfaces/loop/ViewIdMatchBean.java:
--------------------------------------------------------------------------------
1 | package org.ocpsoft.rewrite.prettyfaces.loop;
2 |
3 | import javax.enterprise.context.RequestScoped;
4 | import javax.inject.Named;
5 |
6 | import com.ocpsoft.pretty.faces.annotation.URLMapping;
7 |
8 | @Named
9 | @RequestScoped
10 | // Please note that this pattern also matches the viewId
11 | @URLMapping(pattern = "/path/#{viewIdMatchBean.value}", viewId = "/path/viewidmatch.jsf")
12 | public class ViewIdMatchBean
13 | {
14 |
15 | private String value;
16 |
17 | public String getValue()
18 | {
19 | return value;
20 | }
21 |
22 | public void setValue(String value)
23 | {
24 | this.value = value;
25 | }
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/config-prettyfaces-tests/src/test/resources/interaction/faces-navigate-page.xhtml:
--------------------------------------------------------------------------------
1 |
3 |
8 |
9 |
10 | Navigate Test
11 |
12 |
13 |
14 |
15 | Navigate Test
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/transform-markup/src/main/resources/ruby/maruku/lib/maruku/ext/math/mathml_engines/ritex.rb:
--------------------------------------------------------------------------------
1 | module MaRuKu::Out::HTML
2 | def convert_to_mathml_ritex(kind, tex)
3 | begin
4 | if not $ritex_parser
5 | require 'ritex'
6 | $ritex_parser = Ritex::Parser.new
7 | end
8 |
9 | mathml = $ritex_parser.parse(tex.strip)
10 | doc = Document.new(mathml, {:respect_whitespace =>:all}).root
11 | return doc
12 | rescue LoadError => e
13 | maruku_error "Could not load package 'ritex'.\n"+
14 | "Please install it using:\n"+
15 | " $ gem install ritex\n\n"+e.inspect
16 | rescue Racc::ParseError => e
17 | maruku_error "Could not parse TeX: \n#{tex}"+
18 | "\n\n #{e.inspect}"
19 | end
20 | nil
21 | end
22 | end
23 |
--------------------------------------------------------------------------------
/transform-markup/src/main/resources/ruby/sass/lib/sass/plugin/generic.rb:
--------------------------------------------------------------------------------
1 | # The reason some options are declared here rather than in sass/plugin/configuration.rb
2 | # is that otherwise they'd clobber the Rails-specific options.
3 | # Since Rails' options are lazy-loaded in Rails 3,
4 | # they're reverse-merged with the default options
5 | # so that user configuration is preserved.
6 | # This means that defaults that differ from Rails'
7 | # must be declared here.
8 |
9 | unless defined?(Sass::GENERIC_LOADED)
10 | Sass::GENERIC_LOADED = true
11 |
12 | Sass::Plugin.options.merge!(:css_location => './public/stylesheets',
13 | :always_update => false,
14 | :always_check => true)
15 | end
16 |
--------------------------------------------------------------------------------
/api/src/main/java/org/ocpsoft/rewrite/param/ParameterConfigurator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2014 Red Hat, Inc. and/or its affiliates.
3 | *
4 | * Licensed under the Eclipse Public License version 1.0, available at
5 | * http://www.eclipse.org/legal/epl-v10.html
6 | */
7 | package org.ocpsoft.rewrite.param;
8 |
9 | import org.ocpsoft.rewrite.bind.Binding;
10 |
11 | /**
12 | * Marker interface for any object types that are used in the {@link ParameterConfiguration} interface.
13 | *
14 | * @see {@link Parameter} {@link Binding} {@link Converter} {@link Constraint} {@link Transposition} {@link Validator}
15 | *
16 | * @author Lincoln Baxter, III
17 | */
18 | public interface ParameterConfigurator
19 | {
20 | }
21 |
--------------------------------------------------------------------------------
/config-annotations/src/test/java/org/ocpsoft/rewrite/annotation/action/InboundActionBean.java:
--------------------------------------------------------------------------------
1 | package org.ocpsoft.rewrite.annotation.action;
2 |
3 | import javax.enterprise.context.RequestScoped;
4 | import javax.inject.Named;
5 |
6 | import org.ocpsoft.rewrite.annotation.Join;
7 | import org.ocpsoft.rewrite.annotation.RequestAction;
8 |
9 | @Named
10 | @RequestScoped
11 | @Join(path = "/rewritten-url", to = "/some-page.jsp")
12 | public class InboundActionBean
13 | {
14 |
15 | @RequestAction
16 | public void action()
17 | {
18 | throw new IllegalStateException(
19 | "This action should not be invoked because we will not " +
20 | "send a request to [/rewritten-url] in the test.");
21 | }
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/transform-markup/src/main/resources/ruby/sass/lib/sass/logger/base.rb:
--------------------------------------------------------------------------------
1 | require 'sass/logger/log_level'
2 |
3 | class Sass::Logger::Base
4 |
5 | include Sass::Logger::LogLevel
6 |
7 | attr_accessor :log_level
8 | attr_accessor :disabled
9 |
10 | log_level :trace
11 | log_level :debug
12 | log_level :info
13 | log_level :warn
14 | log_level :error
15 |
16 | def initialize(log_level = :debug)
17 | self.log_level = log_level
18 | end
19 |
20 | def logging_level?(level)
21 | !disabled && self.class.log_level?(level, log_level)
22 | end
23 |
24 | def log(level, message)
25 | self._log(level, message) if logging_level?(level)
26 | end
27 |
28 | def _log(level, message)
29 | Kernel::warn(message)
30 | end
31 |
32 | end
33 |
--------------------------------------------------------------------------------
/api-tests/src/test/webapp/WEB-INF/web.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 | javax.faces.PROJECT_STAGE
8 | Development
9 |
10 |
11 | Faces Servlet
12 | javax.faces.webapp.FacesServlet
13 |
14 |
15 | Faces Servlet
16 | *.xhtml
17 |
18 |
19 |
--------------------------------------------------------------------------------
/config-prettyfaces-tests/src/test/java/org/ocpsoft/rewrite/prettyfaces/outbound/ViewHardcodedParamsBean.java:
--------------------------------------------------------------------------------
1 | package org.ocpsoft.rewrite.prettyfaces.outbound;
2 |
3 | import javax.enterprise.context.RequestScoped;
4 | import javax.inject.Named;
5 |
6 | @Named("outbound")
7 | @RequestScoped
8 | public class ViewHardcodedParamsBean
9 | {
10 |
11 | public String hCommandLink() {
12 | return "view-hardcoded-params.jsf?faces-redirect=true¶m=value";
13 | }
14 |
15 | public String hCommandLinkExtra() {
16 | return "view-hardcoded-params.jsf?faces-redirect=true¶m=value&extraParam=extraValue";
17 | }
18 |
19 | public String hCommandLinkNotMapped() {
20 | return "view-hardcoded-params.jsf?faces-redirect=true¶m=value2";
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/config-prettyfaces-tests/src/test/resources/redirect/redirect-pretty-config.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 | #{redirectBean.queryValue}
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/impl/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 4.0.0
4 |
5 | org.ocpsoft.rewrite
6 | rewrite-parent
7 | 3.5.3-SNAPSHOT
8 | ../
9 |
10 |
11 | rewrite-impl
12 |
13 |
14 |
15 | org.ocpsoft.rewrite
16 | rewrite-api
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/integration-faces/src/main/resources/META-INF/faces-config.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 | rewrite_integration_faces
9 |
10 |
11 | org.ocpsoft.rewrite.faces.RewriteNavigationHandler
12 | org.ocpsoft.rewrite.faces.RewriteViewHandler
13 |
14 |
15 |
16 | org.ocpsoft.rewrite.faces.RewritePhaseListener
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/config-tuckey/src/test/resources/urlrewrite.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ^/some/olddir/(.*)$
7 | /very/newdir/$1
8 |
9 |
10 |
11 | ^/some/fordir/nonredirect$
12 | /index.html
13 |
14 |
15 |
16 | ^/some/fordir/(.*)$
17 | /some/olddir/$1
18 |
19 |
20 |
21 | ^/some/404/dir$
22 | /404me
23 |
24 |
25 |
26 | /blog/archive/**
27 | /roller/history/$1
28 |
29 |
30 |
--------------------------------------------------------------------------------
/integration-faces/src/main/java/org/ocpsoft/rewrite/faces/annotation/handler/DeferredConverter.java:
--------------------------------------------------------------------------------
1 | package org.ocpsoft.rewrite.faces.annotation.handler;
2 |
3 | import org.ocpsoft.rewrite.context.EvaluationContext;
4 | import org.ocpsoft.rewrite.event.Rewrite;
5 | import org.ocpsoft.rewrite.param.Converter;
6 |
7 | public class DeferredConverter implements Converter
8 | {
9 | private Converter> deferred;
10 |
11 | public DeferredConverter(Converter> validator)
12 | {
13 | this.deferred = validator;
14 | }
15 |
16 | @Override
17 | public Object convert(Rewrite event, EvaluationContext context, Object value)
18 | {
19 | return value;
20 | }
21 |
22 | public Converter> getDeferred()
23 | {
24 | return deferred;
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/integration-faces/src/main/java/org/ocpsoft/rewrite/faces/annotation/handler/DeferredValidator.java:
--------------------------------------------------------------------------------
1 | package org.ocpsoft.rewrite.faces.annotation.handler;
2 |
3 | import org.ocpsoft.rewrite.context.EvaluationContext;
4 | import org.ocpsoft.rewrite.event.Rewrite;
5 | import org.ocpsoft.rewrite.param.Validator;
6 |
7 | public class DeferredValidator implements Validator
8 | {
9 | private Validator> deferred;
10 |
11 | public DeferredValidator(Validator> validator)
12 | {
13 | this.deferred = validator;
14 | }
15 |
16 | @Override
17 | public boolean isValid(Rewrite event, EvaluationContext context, Object value)
18 | {
19 | return true;
20 | }
21 |
22 | public Validator> getDeferred()
23 | {
24 | return deferred;
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/examples/src/main/assembly/examples.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 | examples
8 |
9 |
10 | zip
11 |
12 |
13 | true
14 |
15 |
16 |
17 | ../showcase/bookstore
18 |
19 | .**
20 | .*/**
21 | target/**
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/integration-gwt/src/main/java/org/ocpsoft/rewrite/gwt/client/history/CookieContextPathProvider.java:
--------------------------------------------------------------------------------
1 | package org.ocpsoft.rewrite.gwt.client.history;
2 |
3 | import com.google.gwt.user.client.Cookies;
4 |
5 | /**
6 | * Standard {@link ContextPathProvider} for retrieving the context path via a cookie set when the server is accessed.
7 | *
8 | * @author Lincoln Baxter, III
9 | */
10 | public class CookieContextPathProvider implements ContextPathProvider
11 | {
12 | public void getContextPath(HistoryStateImpl historyState)
13 | {
14 | String contextPath = Cookies.getCookie("org.ocpsoft.rewrite.gwt.history.contextPath");
15 | if (contextPath != null)
16 | HistoryStateImpl.setContextPath(contextPath);
17 | }
18 |
19 | }
20 |
--------------------------------------------------------------------------------
/test-harness/src/main/resources/tomcat-weld-web-fragment.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 | org.jboss.weld.environment.servlet.Listener
7 |
8 |
9 |
10 | Object factory for the CDI Bean Manager
11 | BeanManager
12 | javax.enterprise.inject.spi.BeanManager
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/config-annotations/src/test/java/org/ocpsoft/rewrite/annotation/param/ParameterMatchesTestBean.java:
--------------------------------------------------------------------------------
1 | package org.ocpsoft.rewrite.annotation.param;
2 |
3 | import javax.enterprise.context.RequestScoped;
4 | import javax.inject.Named;
5 |
6 | import org.ocpsoft.rewrite.annotation.Join;
7 | import org.ocpsoft.rewrite.annotation.Matches;
8 | import org.ocpsoft.rewrite.annotation.Parameter;
9 |
10 | @Named
11 | @RequestScoped
12 | @Join(path = "/param/{value}/", to = "/param.jsp")
13 | public class ParameterMatchesTestBean
14 | {
15 |
16 | @Parameter
17 | @Matches("\\w{4}")
18 | private String value;
19 |
20 | public String getValue()
21 | {
22 | return value;
23 | }
24 |
25 | public void setValue(String value)
26 | {
27 | this.value = value;
28 | }
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/transform-markup/src/main/resources/ruby/maruku/lib/maruku/ext/math/elements.rb:
--------------------------------------------------------------------------------
1 | module MaRuKu
2 | class MDElement
3 | def md_inline_math(math)
4 | self.md_el(:inline_math, [], :math => math)
5 | end
6 |
7 | def md_equation(math, label, numerate)
8 | reglabel = /\\label\{(\w+)\}/
9 | math = math.gsub(reglabel, '') if label = math[reglabel, 1]
10 | num = nil
11 | if (label || numerate) && @doc # take number
12 | @doc.eqid2eq ||= {}
13 | num = @doc.eqid2eq.size + 1
14 | label = "eq#{num}" unless label # TODO do id for document
15 | end
16 | e = self.md_el(:equation, [], :math => math, :label => label, :num => num)
17 | @doc.eqid2eq[label] = e if label && @doc # take number
18 | e
19 | end
20 | end
21 | end
22 |
--------------------------------------------------------------------------------
/config-prettyfaces-tests/src/test/resources/dynaview/ambiguous-pretty-config.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/test-harness/src/main/resources/tomcat-owb-web-fragment.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 | org.apache.webbeans.servlet.WebBeansConfigurationListener
7 |
8 |
9 |
10 | Object factory for the CDI Bean Manager
11 | BeanManager
12 | javax.enterprise.inject.spi.BeanManager
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/annotations-api/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 4.0.0
4 |
5 | rewrite-parent
6 | org.ocpsoft.rewrite
7 | 3.5.3-SNAPSHOT
8 | ../
9 |
10 |
11 | rewrite-annotations-api
12 |
13 |
14 |
15 | org.ocpsoft.rewrite
16 | rewrite-api
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/integration-faces/src/test/resources/faces-web.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 | Faces Servlet
8 | javax.faces.webapp.FacesServlet
9 |
10 |
11 | Faces Servlet
12 | *.xhtml
13 |
14 |
15 | javax.faces.PROJECT_STAGE
16 | Development
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/config-annotations/src/test/java/org/ocpsoft/rewrite/annotation/convert/CustomConverterBean.java:
--------------------------------------------------------------------------------
1 | package org.ocpsoft.rewrite.annotation.convert;
2 |
3 | import javax.enterprise.context.RequestScoped;
4 | import javax.inject.Named;
5 |
6 | import org.ocpsoft.rewrite.annotation.Convert;
7 | import org.ocpsoft.rewrite.annotation.Join;
8 | import org.ocpsoft.rewrite.annotation.Parameter;
9 |
10 | @Named
11 | @RequestScoped
12 | @Join(path = "/convert/{value}/", to = "/convert.jsp")
13 | public class CustomConverterBean
14 | {
15 |
16 | @Parameter
17 | @Convert(with = LowercaseConverter.class)
18 | private String value;
19 |
20 | public String getValue()
21 | {
22 | return value;
23 | }
24 |
25 | public void setValue(String value)
26 | {
27 | this.value = value;
28 | }
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/config-annotations/src/test/java/org/ocpsoft/rewrite/annotation/validate/CustomValidatorBean.java:
--------------------------------------------------------------------------------
1 | package org.ocpsoft.rewrite.annotation.validate;
2 |
3 | import javax.enterprise.context.RequestScoped;
4 | import javax.inject.Named;
5 |
6 | import org.ocpsoft.rewrite.annotation.Join;
7 | import org.ocpsoft.rewrite.annotation.Parameter;
8 | import org.ocpsoft.rewrite.annotation.Validate;
9 |
10 | @Named
11 | @RequestScoped
12 | @Join(path = "/validate/{value}/", to = "/validate.jsp")
13 | public class CustomValidatorBean
14 | {
15 |
16 | @Parameter
17 | @Validate(with = EvenLengthValidator.class)
18 | private String value;
19 |
20 | public String getValue()
21 | {
22 | return value;
23 | }
24 |
25 | public void setValue(String value)
26 | {
27 | this.value = value;
28 | }
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/annotations-api/src/main/java/org/ocpsoft/rewrite/annotation/api/Parameter.java:
--------------------------------------------------------------------------------
1 | package org.ocpsoft.rewrite.annotation.api;
2 |
3 | import java.lang.reflect.AnnotatedElement;
4 | import java.lang.reflect.Method;
5 |
6 | /**
7 | * {@link AnnotatedElement} for a method parameter.
8 | *
9 | * @author Lincoln Baxter, III
10 | */
11 | public interface Parameter extends AnnotatedElement
12 | {
13 | /**
14 | * Return the {@link Class} type of this parameter.
15 | */
16 | public Class> getType();
17 |
18 | /**
19 | * Return the method declaring this parameter.
20 | */
21 | public Method getDeclaringMethod();
22 |
23 | /**
24 | * Return the index of this parameter in the declaring {@link Method} signature.
25 | */
26 | public int getIndex();
27 | }
28 |
--------------------------------------------------------------------------------
/impl-servlet-tests/src/test/java/org/ocpsoft/rewrite/servlet/wrapper/ResponseToLowercase.java:
--------------------------------------------------------------------------------
1 | package org.ocpsoft.rewrite.servlet.wrapper;
2 |
3 | import org.ocpsoft.rewrite.servlet.config.response.ResponseContent;
4 | import org.ocpsoft.rewrite.servlet.config.response.ResponseContentInterceptor;
5 | import org.ocpsoft.rewrite.servlet.config.response.ResponseContentInterceptorChain;
6 | import org.ocpsoft.rewrite.servlet.http.event.HttpServletRewrite;
7 |
8 | public class ResponseToLowercase implements ResponseContentInterceptor
9 | {
10 | @Override
11 | public void intercept(HttpServletRewrite event, ResponseContent buffer, ResponseContentInterceptorChain chain)
12 | {
13 | buffer.setContents(new String(buffer.getContents(), buffer.getCharset()).toLowerCase().getBytes());
14 | chain.proceed();
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/showcase/rest-ws/src/main/webapp/WEB-INF/web.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 | rewrite-showcase-rest
9 |
10 |
11 | org.ocpsoft.rewrite.config.CONFIG_RELOADING
12 | true
13 |
14 |
15 |
16 | 30
17 |
18 |
19 | /index.html
20 |
21 |
22 |
--------------------------------------------------------------------------------
/transform-markup/src/main/resources/ruby/sass/lib/sass/script/css_lexer.rb:
--------------------------------------------------------------------------------
1 | module Sass
2 | module Script
3 | # This is a subclass of {Lexer} for use in parsing plain CSS properties.
4 | #
5 | # @see Sass::SCSS::CssParser
6 | class CssLexer < Lexer
7 | private
8 |
9 | def token
10 | important || super
11 | end
12 |
13 | def string(re, *args)
14 | if re == :uri
15 | return unless uri = scan(URI)
16 | return [:string, Script::String.new(uri)]
17 | end
18 |
19 | return unless scan(STRING)
20 | [:string, Script::String.new((@scanner[1] || @scanner[2]).gsub(/\\(['"])/, '\1'), :string)]
21 | end
22 |
23 | def important
24 | return unless s = scan(IMPORTANT)
25 | [:raw, s]
26 | end
27 | end
28 | end
29 | end
30 |
--------------------------------------------------------------------------------
/addressbuilder/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 4.0.0
4 |
5 | org.ocpsoft.rewrite
6 | rewrite-parent
7 | 3.5.3-SNAPSHOT
8 | ../
9 |
10 |
11 | rewrite-addressbuilder
12 |
13 |
14 |
15 | org.ocpsoft.rewrite
16 | rewrite-test-base
17 | test
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/api/src/main/java/org/ocpsoft/rewrite/config/ConfigurationRuleBuilderWithMetadata.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2014 Red Hat, Inc. and/or its affiliates.
3 | *
4 | * Licensed under the Eclipse Public License version 1.0, available at
5 | * http://www.eclipse.org/legal/epl-v10.html
6 | */
7 | package org.ocpsoft.rewrite.config;
8 |
9 | /**
10 | * @author Lincoln Baxter, III
11 | *
12 | */
13 | public interface ConfigurationRuleBuilderWithMetadata extends ConfigurationBuilderRoot
14 | {
15 | /**
16 | * Specify additional meta-data to be associated with this {@link Rule}. Meta-data does not directly affect a
17 | * {@link Rule}'s behavior, but can be used to provide hints to custom extensions.
18 | */
19 | ConfigurationRuleBuilderWithMetadata withMetadata(Object key, Object value);
20 | }
21 |
--------------------------------------------------------------------------------
/transform-markup/src/main/resources/ruby/sass/lib/sass/script/null.rb:
--------------------------------------------------------------------------------
1 | require 'sass/script/literal'
2 |
3 | module Sass::Script
4 | # A SassScript object representing a null value.
5 | class Null < Literal
6 | # Creates a new null literal.
7 | def initialize
8 | super nil
9 | end
10 |
11 | # @return [Boolean] `false` (the Ruby boolean value)
12 | def to_bool
13 | false
14 | end
15 |
16 | # @return [Boolean] `true`
17 | def null?
18 | true
19 | end
20 |
21 | # @return [String] '' (An empty string)
22 | def to_s(opts = {})
23 | ''
24 | end
25 |
26 | def to_sass(opts = {})
27 | 'null'
28 | end
29 |
30 | # Returns a string representing a null value.
31 | #
32 | # @return [String]
33 | def inspect
34 | 'null'
35 | end
36 | end
37 | end
38 |
--------------------------------------------------------------------------------
/integration-cdi/src/main/java/org/ocpsoft/rewrite/cdi/util/WildcardTypeImpl.java:
--------------------------------------------------------------------------------
1 | package org.ocpsoft.rewrite.cdi.util;
2 |
3 | import java.lang.reflect.Type;
4 | import java.lang.reflect.WildcardType;
5 |
6 | /**
7 | * Implementation of WildcardType
8 | *
9 | * @author Bryn Cooke
10 | */
11 | public class WildcardTypeImpl implements WildcardType
12 | {
13 |
14 | private final Type[] upperBounds;
15 | private final Type[] lowerBounds;
16 |
17 | public WildcardTypeImpl(Type[] upperBounds, Type[] lowerBounds)
18 | {
19 |
20 | this.upperBounds = upperBounds;
21 | this.lowerBounds = lowerBounds;
22 | }
23 |
24 | @Override
25 | public Type[] getUpperBounds()
26 | {
27 | return upperBounds;
28 | }
29 |
30 | @Override
31 | public Type[] getLowerBounds()
32 | {
33 | return lowerBounds;
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/api/src/main/java/org/ocpsoft/rewrite/config/RuleMetadata.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2014 Red Hat, Inc. and/or its affiliates.
3 | *
4 | * Licensed under the Eclipse Public License version 1.0, available at
5 | * http://www.eclipse.org/legal/epl-v10.html
6 | */
7 | package org.ocpsoft.rewrite.config;
8 |
9 | import org.ocpsoft.rewrite.context.Context;
10 |
11 | /**
12 | * Defines a set of constants for accessing {@link Rule} metadata. Metadata will be available on {@link Rule} instances
13 | * that implement {@link Context}.
14 | *
15 | * @author Lincoln Baxter, III
16 | */
17 | public interface RuleMetadata
18 | {
19 | /**
20 | * The location where the {@link Rule} was added to the {@link ConfigurationBuilder}.
21 | */
22 | static String PROVIDER_LOCATION = RuleMetadata.class.getName() + "_LOCATION";
23 | }
24 |
--------------------------------------------------------------------------------
/integration-faces-tests/src/test/resources/navigate-encoding.xhtml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 | Value = [#{navigateEncodingBean.query}]
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/config-annotations/src/main/resources/META-INF/services/org.ocpsoft.rewrite.annotation.spi.AnnotationHandler:
--------------------------------------------------------------------------------
1 | org.ocpsoft.rewrite.annotation.handler.DomainHandler
2 | org.ocpsoft.rewrite.annotation.handler.JoinHandler
3 | org.ocpsoft.rewrite.annotation.handler.RuleHandler
4 | org.ocpsoft.rewrite.annotation.handler.PathPatternHandler
5 | org.ocpsoft.rewrite.annotation.handler.PriorityHandler
6 | org.ocpsoft.rewrite.annotation.handler.RequestActionHandler
7 | org.ocpsoft.rewrite.annotation.handler.RewriteConfigurationHandler
8 | org.ocpsoft.rewrite.annotation.handler.RolesRequiredHandler
9 | org.ocpsoft.rewrite.annotation.handler.ParameterHandler
10 | org.ocpsoft.rewrite.annotation.handler.MatchesHandler
11 | org.ocpsoft.rewrite.annotation.handler.ForwardToHandler
12 | org.ocpsoft.rewrite.annotation.handler.ConvertHandler
13 | org.ocpsoft.rewrite.annotation.handler.ValidateHandler
14 |
--------------------------------------------------------------------------------
/impl-servlet-tests/src/test/java/org/ocpsoft/rewrite/servlet/wrapper/ResponseToLowercaseWord.java:
--------------------------------------------------------------------------------
1 | package org.ocpsoft.rewrite.servlet.wrapper;
2 |
3 | import org.ocpsoft.rewrite.servlet.config.response.ResponseContent;
4 | import org.ocpsoft.rewrite.servlet.config.response.ResponseContentInterceptor;
5 | import org.ocpsoft.rewrite.servlet.config.response.ResponseContentInterceptorChain;
6 | import org.ocpsoft.rewrite.servlet.http.event.HttpServletRewrite;
7 |
8 | public class ResponseToLowercaseWord implements ResponseContentInterceptor
9 | {
10 | @Override
11 | public void intercept(HttpServletRewrite event, ResponseContent buffer, ResponseContentInterceptorChain chain)
12 | {
13 | buffer.setContents(new String(buffer.getContents(), buffer.getCharset()).replaceAll("uppercase", "lowercase")
14 | .getBytes());
15 | chain.proceed();
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/config-prettyfaces-tests/src/test/java/org/ocpsoft/rewrite/prettyfaces/errorpage/ErrorPageValidator.java:
--------------------------------------------------------------------------------
1 | package org.ocpsoft.rewrite.prettyfaces.errorpage;
2 |
3 | import javax.faces.application.FacesMessage;
4 | import javax.faces.component.UIComponent;
5 | import javax.faces.context.FacesContext;
6 | import javax.faces.validator.FacesValidator;
7 | import javax.faces.validator.Validator;
8 | import javax.faces.validator.ValidatorException;
9 |
10 | @FacesValidator("ErrorPageValidator")
11 | public class ErrorPageValidator implements Validator
12 | {
13 |
14 | @Override
15 | public void validate(FacesContext context, UIComponent component, Object value) throws ValidatorException
16 | {
17 | if (value != null && value.toString().equals("invalid")) {
18 | throw new ValidatorException(new FacesMessage("Invalid value: " + value));
19 | }
20 | }
21 |
22 | }
23 |
--------------------------------------------------------------------------------
/integration-faces-tests/src/test/java/org/ocpsoft/rewrite/faces/NavigateBeforeRestoreViewBean.java:
--------------------------------------------------------------------------------
1 | package org.ocpsoft.rewrite.faces;
2 | import javax.faces.bean.ManagedBean;
3 | import javax.faces.bean.RequestScoped;
4 |
5 | import org.ocpsoft.rewrite.annotation.Join;
6 | import org.ocpsoft.rewrite.annotation.RequestAction;
7 | import org.ocpsoft.rewrite.faces.annotation.Deferred;
8 | import org.ocpsoft.rewrite.faces.annotation.Phase;
9 | import org.ocpsoft.rewrite.faces.navigate.Navigate;
10 |
11 |
12 | @ManagedBean
13 | @RequestScoped
14 | @Join(path = "/navigate", to = "/faces/navigate-before-restoreview.xhtml")
15 | public class NavigateBeforeRestoreViewBean
16 | {
17 | @RequestAction
18 | @Deferred(before=Phase.RESTORE_VIEW)
19 | public Navigate action()
20 | {
21 | return Navigate.to(NavigateBeforeRestoreViewBean.class);
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/config-prettyfaces/src/test/resources/rewrite-pretty-config.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
9 |
10 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/showcase/bookstore/src/main/webapp/home.xhtml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | #{category.name}
11 | #{category.description}
12 |
13 |
14 |
15 |
16 |
17 |
18 | Show books
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/transform-markup/src/main/resources/ruby/sass/lib/sass/scss/script_parser.rb:
--------------------------------------------------------------------------------
1 | module Sass
2 | module SCSS
3 | # A mixin for subclasses of {Sass::Script::Parser}
4 | # that makes them usable by {SCSS::Parser} to parse SassScript.
5 | # In particular, the parser won't raise an error
6 | # when there's more content in the lexer once lexing is done.
7 | # In addition, the parser doesn't support `!` for a variable prefix.
8 | module ScriptParser
9 | private
10 |
11 | # @private
12 | def lexer_class
13 | klass = Class.new(super)
14 | klass.send(:include, ScriptLexer)
15 | klass
16 | end
17 |
18 | # Instead of raising an error when the parser is done,
19 | # rewind the StringScanner so that it hasn't consumed the final token.
20 | def assert_done
21 | @lexer.unpeek!
22 | end
23 | end
24 | end
25 | end
26 |
--------------------------------------------------------------------------------
/annotations-api/src/main/java/org/ocpsoft/rewrite/annotation/api/HandlerChain.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2011 Lincoln Baxter, III
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.ocpsoft.rewrite.annotation.api;
17 |
18 | public interface HandlerChain
19 | {
20 | void proceed();
21 | }
22 |
--------------------------------------------------------------------------------
/rewrite-servlet/src/main/assembly/javadocs.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 | javadoc
6 |
7 |
8 | jar
9 |
10 |
11 | false
12 |
13 |
14 |
15 | ${project.basedir}/target/dependency/javadoc
16 | /
17 | true
18 |
19 | META-INF/**
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/rewrite-servlet/src/main/assembly/sources.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 | sources
6 |
7 |
8 | jar
9 |
10 |
11 | false
12 |
13 |
14 |
15 | ${project.basedir}/target/dependency/sources
16 | /
17 | true
18 |
19 | META-INF/**
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/api-tests/src/test/java/org/ocpsoft/rewrite/config/ConfigurationCacheProviderMock.java:
--------------------------------------------------------------------------------
1 | package org.ocpsoft.rewrite.config;
2 |
3 | import javax.servlet.ServletContext;
4 |
5 | import org.ocpsoft.rewrite.servlet.config.HttpConfigurationCacheProvider;
6 |
7 |
8 | public class ConfigurationCacheProviderMock extends HttpConfigurationCacheProvider
9 | {
10 | private static final String KEY = ConfigurationCacheProviderMock.class.getName() + "_cachedConfig";
11 |
12 | @Override
13 | public Configuration getConfiguration(ServletContext context)
14 | {
15 | return (Configuration) context.getAttribute(KEY);
16 | }
17 |
18 | @Override
19 | public void setConfiguration(ServletContext context, Configuration configuration)
20 | {
21 | context.setAttribute(KEY, configuration);
22 | }
23 |
24 | @Override
25 | public int priority()
26 | {
27 | return 0;
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/config-prettyfaces-tests/src/test/java/org/ocpsoft/rewrite/prettyfaces/dynaview/ParameterizedDynaViewValidator.java:
--------------------------------------------------------------------------------
1 | package org.ocpsoft.rewrite.prettyfaces.dynaview;
2 |
3 | import javax.faces.application.FacesMessage;
4 | import javax.faces.component.UIComponent;
5 | import javax.faces.context.FacesContext;
6 | import javax.faces.validator.FacesValidator;
7 | import javax.faces.validator.Validator;
8 | import javax.faces.validator.ValidatorException;
9 |
10 | @FacesValidator(value = "ParameterizedDynaViewValidator")
11 | public class ParameterizedDynaViewValidator implements Validator
12 | {
13 |
14 | @Override
15 | public void validate(FacesContext context, UIComponent component, Object value) throws ValidatorException
16 | {
17 | if (value != null && value.toString().equals("invalid")) {
18 | throw new ValidatorException(new FacesMessage("Invalid"));
19 | }
20 | }
21 |
22 | }
23 |
--------------------------------------------------------------------------------
/transform-markup/download-gems.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # create working directories
4 | BASE=./target/gems
5 | mkdir -p $BASE/install
6 | mkdir -p $BASE/resources/ruby
7 |
8 | # install gems into install directory
9 | jruby -S gem install maruku sass RedCloth asciidoctor -i $BASE/install --no-rdoc --no-ri
10 |
11 | # copy required files to resource directory
12 | rsync -a --include '/lib/***' --exclude '*' $BASE/install/gems/maruku-*/ $BASE/resources/ruby/maruku
13 | rsync -a --include '/lib/***' --include '/VERSION*' --exclude '*' $BASE/install/gems/sass-*/ $BASE/resources/ruby/sass
14 | rsync -a --include '/lib/***' --exclude '*' $BASE/install/gems/RedCloth-*/ $BASE/resources/ruby/redcloth
15 | rsync -a --include '/lib/***' --exclude '*' $BASE/install/gems/asciidoctor-*/ $BASE/resources/ruby/asciidoctor
16 |
17 | echo "Done!"
18 | echo "You can now copy the contents of $BASE/resources to src/main/resources"
19 |
--------------------------------------------------------------------------------
/integration-spring/src/test/java/org/ocpsoft/rewrite/spring/SpringRoot.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2011 Lincoln Baxter, III
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.ocpsoft.rewrite.spring;
17 |
18 | /**
19 | * @author Christian Kaltepoth
20 | */
21 | public interface SpringRoot {
22 | }
23 |
--------------------------------------------------------------------------------
/security-integration-shiro/src/main/java/org/ocpsoft/rewrite/security/shiro/ShiroRoleRequired.java:
--------------------------------------------------------------------------------
1 | package org.ocpsoft.rewrite.security.shiro;
2 |
3 | import java.lang.annotation.Documented;
4 | import java.lang.annotation.ElementType;
5 | import java.lang.annotation.Inherited;
6 | import java.lang.annotation.Retention;
7 | import java.lang.annotation.RetentionPolicy;
8 | import java.lang.annotation.Target;
9 |
10 | /**
11 | * Specifies that the element annotated with {@link org.ocpsoft.rewrite.annotation.Rule} must be constrained to users
12 | * that are a member of the given role or roles.
13 | *
14 | * @author Christian Kaltepoth
15 | */
16 | @Inherited
17 | @Documented
18 | @Target(ElementType.TYPE)
19 | @Retention(RetentionPolicy.RUNTIME)
20 | public @interface ShiroRoleRequired
21 | {
22 | /**
23 | * The role or roles of which the user must be a member.
24 | */
25 | String[] value();
26 | }
27 |
--------------------------------------------------------------------------------
/impl-servlet-tests/src/test/resources/org/ocpsoft/rewrite/servlet/wrapper/forward.jsp:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 | ]]>
7 |
8 |
9 | ]]>
10 |
11 |
12 |
13 |
14 | Insert title here
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/test-harness/src/main/java/org/ocpsoft/rewrite/mock/MockFailedBinding.java:
--------------------------------------------------------------------------------
1 | package org.ocpsoft.rewrite.mock;
2 |
3 | import org.ocpsoft.rewrite.bind.Binding;
4 | import org.ocpsoft.rewrite.context.EvaluationContext;
5 | import org.ocpsoft.rewrite.event.Rewrite;
6 |
7 | public class MockFailedBinding implements Binding
8 | {
9 |
10 | @Override
11 | public Object retrieve(final Rewrite event, final EvaluationContext context)
12 | {
13 | throw new RuntimeException("Binding extraction failed (expected)");
14 | }
15 |
16 | @Override
17 | public boolean supportsRetrieval()
18 | {
19 | return true;
20 | }
21 |
22 | @Override
23 | public boolean supportsSubmission()
24 | {
25 | return true;
26 | }
27 |
28 | @Override
29 | public Object submit(final Rewrite event, final EvaluationContext context, final Object value)
30 | {
31 | throw new RuntimeException("Binding failed (expected)");
32 | }
33 | }
--------------------------------------------------------------------------------
/transform-markup/src/main/resources/ruby/sass/lib/sass/tree/variable_node.rb:
--------------------------------------------------------------------------------
1 | module Sass
2 | module Tree
3 | # A dynamic node representing a variable definition.
4 | #
5 | # @see Sass::Tree
6 | class VariableNode < Node
7 | # The name of the variable.
8 | # @return [String]
9 | attr_reader :name
10 |
11 | # The parse tree for the variable value.
12 | # @return [Script::Node]
13 | attr_accessor :expr
14 |
15 | # Whether this is a guarded variable assignment (`!default`).
16 | # @return [Boolean]
17 | attr_reader :guarded
18 |
19 | # @param name [String] The name of the variable
20 | # @param expr [Script::Node] See \{#expr}
21 | # @param guarded [Boolean] See \{#guarded}
22 | def initialize(name, expr, guarded)
23 | @name = name
24 | @expr = expr
25 | @guarded = guarded
26 | super()
27 | end
28 | end
29 | end
30 | end
31 |
--------------------------------------------------------------------------------
/integration-faces/src/test/resources/error-page-web.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 | 404
7 | /404.xhtml
8 |
9 |
10 |
11 | Faces Servlet
12 | javax.faces.webapp.FacesServlet
13 |
14 |
15 | Faces Servlet
16 | *.xhtml
17 |
18 |
19 | javax.faces.PROJECT_STAGE
20 | Development
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/integration-gwt/src/test/java/org/ocpsoft/rewrite/gwt/GWTRoot.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2011 Lincoln Baxter, III
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.ocpsoft.rewrite.gwt;
17 |
18 | /**
19 | * @author Lincoln Baxter, III
20 | *
21 | */
22 | public interface GWTRoot
23 | {
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/api/src/main/java/org/ocpsoft/rewrite/param/Parameters.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2013 Red Hat, Inc. and/or its affiliates.
3 | *
4 | * Licensed under the Eclipse Public License version 1.0, available at
5 | * http://www.eclipse.org/legal/epl-v10.html
6 | */
7 | package org.ocpsoft.rewrite.param;
8 |
9 | import org.ocpsoft.rewrite.context.EvaluationContext;
10 |
11 | /**
12 | * Utility for extracting values from the {@link ParameterValueStore}.
13 | *
14 | * @author Lincoln Baxter, III
15 | *
16 | */
17 | public class Parameters
18 | {
19 | /**
20 | * Retrieve a single parameter value from the {@link ParameterValueStore}.
21 | */
22 | public static String retrieve(EvaluationContext context, String string)
23 | {
24 | return ((ParameterValueStore) context.get(ParameterValueStore.class)).retrieve(((ParameterStore) context
25 | .get(ParameterStore.class)).get(string));
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/config-servlet/src/test/java/org/ocpsoft/rewrite/servlet/config/ConfigRoot.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2011 Lincoln Baxter, III
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.ocpsoft.rewrite.servlet.config;
17 |
18 | /**
19 | * @author Lincoln Baxter, III
20 | */
21 | public interface ConfigRoot
22 | {
23 | }
24 |
--------------------------------------------------------------------------------
/test-harness/src/main/resources/jetty-log4j.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/impl-servlet-tests/src/test/java/org/ocpsoft/rewrite/servlet/ServletRoot.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2011 Lincoln Baxter, III
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.ocpsoft.rewrite.servlet;
17 |
18 | /**
19 | * @author Lincoln Baxter, III
20 | *
21 | */
22 | public interface ServletRoot
23 | {
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/integration-cdi/src/test/java/org/ocpsoft/rewrite/cdi/CDIRoot.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2011 Lincoln Baxter, III
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.ocpsoft.rewrite.cdi;
17 |
18 | /**
19 | * @author Lincoln Baxter, III
20 | */
21 | public interface CDIRoot
22 | {
23 | // Intentionally empty
24 | }
25 |
--------------------------------------------------------------------------------
/config-tuckey/src/test/java/org/ocpsoft/rewrite/config/tuckey/TuckeyRoot.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2011 Lincoln Baxter, III
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.ocpsoft.rewrite.config.tuckey;
17 |
18 | /**
19 | * @author Lincoln Baxter, III
20 | *
21 | */
22 | public interface TuckeyRoot
23 | {
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/.github/workflows/maven.yml:
--------------------------------------------------------------------------------
1 | name: Java CI with Maven
2 |
3 | on:
4 | - push
5 | - pull_request
6 |
7 | jobs:
8 | build:
9 | runs-on: ubuntu-latest
10 | steps:
11 | - uses: actions/checkout@v3
12 | - name: Set up JDK 8
13 | uses: actions/setup-java@v3
14 | with:
15 | java-version: 8
16 | distribution: 'temurin'
17 | cache: 'maven'
18 | - run: ./mvnw --batch-mode --update-snapshots install -DskipTests
19 |
20 | test:
21 | runs-on: ubuntu-latest
22 | strategy:
23 | fail-fast: false
24 | matrix:
25 | container: [ 'WILDFLY_MANAGED_8', 'GLASSFISH_MANAGED_4.0' ]
26 | steps:
27 | - uses: actions/checkout@v3
28 | - name: Set up JDK 8
29 | uses: actions/setup-java@v3
30 | with:
31 | java-version: 8
32 | distribution: 'temurin'
33 | cache: 'maven'
34 | - run: ./mvnw --batch-mode --update-snapshots -P ${{ matrix.container }} install
--------------------------------------------------------------------------------
/impl-tests/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 4.0.0
4 |
5 | org.ocpsoft.rewrite
6 | rewrite-parent
7 | 3.5.3-SNAPSHOT
8 | ../
9 |
10 |
11 | rewrite-impl-tests
12 |
13 |
14 |
15 | org.ocpsoft.rewrite
16 | rewrite-impl
17 |
18 |
19 | org.ocpsoft.rewrite
20 | rewrite-test-harness
21 | test
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/annotations-impl/src/test/java/org/ocpsoft/rewrite/annotation/AnnotationRoot.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2010 Lincoln Baxter, III
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.ocpsoft.rewrite.annotation;
17 |
18 | /**
19 | * Marker interface for test deployments.
20 | *
21 | * @author Lincoln Baxter, III
22 | *
23 | */
24 | public interface AnnotationRoot
25 | {
26 | }
27 |
--------------------------------------------------------------------------------
/impl/README.md:
--------------------------------------------------------------------------------
1 | Rewrite Servlet Implementation
2 | =================================================
3 |
4 | Get Started
5 | ==========
6 |
7 | 1. Include OCPSoft Rewrite in your application's POM file:
8 |
9 |
10 | org.ocpsoft.rewrite
11 | rewrite-impl-servlet
12 | ${rewrite.version}
13 |
14 |
15 | 2. Create a configuration provider as [described here](https://github.com/ocpsoft/rewrite)
16 |
17 | 3. Run your application!
18 |
19 | FEEDBACK
20 | ========
21 |
22 | This project is looking for your feedback! What would make your task easier? How can we simplify this experience?
23 |
24 | TODO's
25 | ======
26 |
27 | * Continue simplification of Configuration object APIs and convenience classes
28 | * Rule to enable localhost admin/status page
29 | * High level pre-prepared rewrite rules
30 | * Resource.exists(String fileName) to check file existence
31 |
--------------------------------------------------------------------------------
/config-prettyfaces-tests/src/test/resources/redirect/redirect.xhtml:
--------------------------------------------------------------------------------
1 |
3 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | Encoding Test
14 |
15 |
16 |
17 | Encoding Test
18 |
19 |
20 |
21 |
22 |
23 | url=${prettyContext.requestURL}
24 | query=${prettyContext.requestQueryString}
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/impl-servlet/README.md:
--------------------------------------------------------------------------------
1 | Rewrite Servlet Implementation
2 | =================================================
3 |
4 | Get Started
5 | ==========
6 |
7 | 1. Include OCPSoft Rewrite in your application's POM file:
8 |
9 |
10 | org.ocpsoft.rewrite
11 | rewrite-impl-servlet
12 | ${rewrite.version}
13 |
14 |
15 | 2. Create a configuration provider as [described here](https://github.com/ocpsoft/rewrite)
16 |
17 | 3. Run your application!
18 |
19 | FEEDBACK
20 | ========
21 |
22 | This project is looking for your feedback! What would make your task easier? How can we simplify this experience?
23 |
24 | TODO's
25 | ======
26 |
27 | * Continue simplification of Configuration object APIs and convenience classes
28 | * Rule to enable localhost admin/status page
29 | * High level pre-prepared rewrite rules
30 | * Resource.exists(String fileName) to check file existence
31 |
--------------------------------------------------------------------------------
/impl-tests/README.md:
--------------------------------------------------------------------------------
1 | Rewrite Servlet Implementation
2 | =================================================
3 |
4 | Get Started
5 | ==========
6 |
7 | 1. Include OCPSoft Rewrite in your application's POM file:
8 |
9 |
10 | org.ocpsoft.rewrite
11 | rewrite-impl-servlet
12 | ${rewrite.version}
13 |
14 |
15 | 2. Create a configuration provider as [described here](https://github.com/ocpsoft/rewrite)
16 |
17 | 3. Run your application!
18 |
19 | FEEDBACK
20 | ========
21 |
22 | This project is looking for your feedback! What would make your task easier? How can we simplify this experience?
23 |
24 | TODO's
25 | ======
26 |
27 | * Continue simplification of Configuration object APIs and convenience classes
28 | * Rule to enable localhost admin/status page
29 | * High level pre-prepared rewrite rules
30 | * Resource.exists(String fileName) to check file existence
31 |
--------------------------------------------------------------------------------
/api/src/test/java/org/ocpsoft/rewrite/Root.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2011 Lincoln Baxter, III
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.ocpsoft.rewrite;
17 |
18 | /**
19 | * Marker interface declaring the root package of this project.
20 | *
21 | * @author Lincoln Baxter, III
22 | */
23 | public interface Root
24 | {
25 |
26 | }
27 |
--------------------------------------------------------------------------------
/impl-servlet-3.0/README.md:
--------------------------------------------------------------------------------
1 | Rewrite Servlet Implementation
2 | =================================================
3 |
4 | Get Started
5 | ==========
6 |
7 | 1. Include OCPSoft Rewrite in your application's POM file:
8 |
9 |
10 | org.ocpsoft.rewrite
11 | rewrite-impl-servlet
12 | ${rewrite.version}
13 |
14 |
15 | 2. Create a configuration provider as [described here](https://github.com/ocpsoft/rewrite)
16 |
17 | 3. Run your application!
18 |
19 | FEEDBACK
20 | ========
21 |
22 | This project is looking for your feedback! What would make your task easier? How can we simplify this experience?
23 |
24 | TODO's
25 | ======
26 |
27 | * Continue simplification of Configuration object APIs and convenience classes
28 | * Rule to enable localhost admin/status page
29 | * High level pre-prepared rewrite rules
30 | * Resource.exists(String fileName) to check file existence
31 |
--------------------------------------------------------------------------------
/transform-markup/src/main/resources/ruby/maruku/lib/maruku/output/entity_table.rb:
--------------------------------------------------------------------------------
1 | require 'rexml/document'
2 | require 'singleton'
3 |
4 | module MaRuKu::Out
5 | Entity = Struct.new(:html_num, :html_entity, :latex_string, :latex_package)
6 |
7 | class EntityTable
8 | # Sad but true
9 | include Singleton
10 |
11 | def initialize
12 | @entity_table = {}
13 |
14 | xml = File.new(File.join(File.dirname(__FILE__), '..', '..', '..', 'data', 'entities.xml'))
15 | doc = REXML::Document.new(xml)
16 | doc.elements.each("//char") do |c|
17 | num = c.attributes['num'].to_i
18 | name = c.attributes['name']
19 | convert = c.attributes['convertTo']
20 | package = c.attributes['package']
21 |
22 | e = Entity.new(num, name, convert, package)
23 | @entity_table[name] = e
24 | @entity_table[num] = e
25 | end
26 | end
27 |
28 | def entity(name)
29 | @entity_table[name]
30 | end
31 | end
32 | end
33 |
34 |
--------------------------------------------------------------------------------
/impl-servlet-tests/README.md:
--------------------------------------------------------------------------------
1 | Rewrite Servlet Implementation
2 | =================================================
3 |
4 | Get Started
5 | ==========
6 |
7 | 1. Include OCPSoft Rewrite in your application's POM file:
8 |
9 |
10 | org.ocpsoft.rewrite
11 | rewrite-impl-servlet
12 | ${rewrite.version}
13 |
14 |
15 | 2. Create a configuration provider as [described here](https://github.com/ocpsoft/rewrite)
16 |
17 | 3. Run your application!
18 |
19 | FEEDBACK
20 | ========
21 |
22 | This project is looking for your feedback! What would make your task easier? How can we simplify this experience?
23 |
24 | TODO's
25 | ======
26 |
27 | * Continue simplification of Configuration object APIs and convenience classes
28 | * Rule to enable localhost admin/status page
29 | * High level pre-prepared rewrite rules
30 | * Resource.exists(String fileName) to check file existence
31 |
--------------------------------------------------------------------------------
/api-tests/src/test/java/org/ocpsoft/rewrite/Root.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2011 Lincoln Baxter, III
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.ocpsoft.rewrite;
17 |
18 | /**
19 | * Marker interface declaring the root package of this project.
20 | *
21 | * @author Lincoln Baxter, III
22 | */
23 | public interface Root
24 | {
25 |
26 | }
27 |
--------------------------------------------------------------------------------
/api-tests/src/test/java/org/ocpsoft/rewrite/config/ConfigurationCacheProviderConfig1.java:
--------------------------------------------------------------------------------
1 | package org.ocpsoft.rewrite.config;
2 |
3 | import org.ocpsoft.rewrite.servlet.config.Path;
4 | import org.ocpsoft.rewrite.servlet.config.SendStatus;
5 |
6 |
7 | /**
8 | * @author Lincoln Baxter, III
9 | *
10 | */
11 | public class ConfigurationCacheProviderConfig1 implements ConfigurationProvider
12 | {
13 | private static int accessCount = 200;
14 |
15 | @Override
16 | public int priority()
17 | {
18 | return 0;
19 | }
20 |
21 | @Override
22 | public boolean handles(final Object payload)
23 | {
24 | return true;
25 | }
26 |
27 | @Override
28 | public Configuration getConfiguration(final Object context)
29 | {
30 | accessCount++;
31 |
32 | return ConfigurationBuilder.begin().addRule()
33 | .when(Path.matches("/cache1"))
34 | .perform(SendStatus.code(accessCount));
35 | }
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/config-prettyfaces/src/main/java/com/ocpsoft/pretty/faces/config/rewrite/Case.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2010 Lincoln Baxter, III
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.ocpsoft.pretty.faces.config.rewrite;
18 |
19 | /**
20 | * Enumeration describing different methods of case transformation.
21 | *
22 | * @author Lincoln Baxter, III
23 | */
24 | public enum Case {
25 | LOWERCASE, UPPERCASE, IGNORE
26 | }
27 |
--------------------------------------------------------------------------------
/transform-markup/src/main/resources/ruby/maruku/lib/maruku/version.rb:
--------------------------------------------------------------------------------
1 | module MaRuKu
2 | # The Maruku version.
3 | VERSION = '0.7.0'
4 |
5 | # @deprecated Exists for backwards compatibility. Use {VERSION}
6 | # @private
7 | Version = VERSION
8 |
9 | # The URL of the Maruku website.
10 | MARUKU_URL = 'http://github.com/bhollis/maruku/'
11 |
12 | # @deprecated Exists for backwards compatibility. Use {MARUKU_URL}
13 | # @private
14 | MarukuURL = MARUKU_URL
15 |
16 | # Whether Markdown implements the PHP Markdown extra syntax.
17 | #
18 | # Note: it is not guaranteed that if this is false,
19 | # then no special features will be used.
20 | #
21 | # @return [Boolean]
22 | def markdown_extra?
23 | true
24 | end
25 |
26 | # Whether Markdown implements the new meta-data proposal.
27 | #
28 | # Note: it is not guaranteed that if this is false,
29 | # then no special features will be used.
30 | #
31 | # @return [Boolean]
32 | def new_meta_data?
33 | true
34 | end
35 | end
36 |
--------------------------------------------------------------------------------
/transform-markup/src/main/resources/ruby/sass/lib/sass/tree/root_node.rb:
--------------------------------------------------------------------------------
1 | module Sass
2 | module Tree
3 | # A static node that is the root node of the Sass document.
4 | class RootNode < Node
5 | # The Sass template from which this node was created
6 | #
7 | # @param template [String]
8 | attr_reader :template
9 |
10 | # @param template [String] The Sass template from which this node was created
11 | def initialize(template)
12 | super()
13 | @template = template
14 | end
15 |
16 | # Runs the dynamic Sass code *and* computes the CSS for the tree.
17 | # @see #to_s
18 | def render
19 | Visitors::CheckNesting.visit(self)
20 | result = Visitors::Perform.visit(self)
21 | Visitors::CheckNesting.visit(result) # Check again to validate mixins
22 | result, extends = Visitors::Cssize.visit(result)
23 | Visitors::Extend.visit(result, extends)
24 | result.to_s
25 | end
26 | end
27 | end
28 | end
29 |
--------------------------------------------------------------------------------
/config-tuckey/README.md:
--------------------------------------------------------------------------------
1 | Tuckey URLRewriteFilter integration for Rewrite
2 | ===============================================
3 |
4 | A (for now) simple integration that loads the standard WEB-INF/urlrewrite.xml file for use in Rewrite
5 |
6 | How to use
7 | ==========
8 |
9 |
10 | * Remove URLRewriteFilter from your web.xml and POM.
11 |
12 | * Leave your existing /WEB-INF/urlrewrite.xml [configuration file](http://urlrewritefilter.googlecode.com/svn/trunk/src/doc/manual/3.2/index.html#configuration) in place.
13 |
14 | * Include OCPSoft Rewrite in your application's POM file:
15 |
16 |
17 | org.ocpsoft.rewrite
18 | rewrite-config-tuckey
19 | ${rewrite.version}
20 |
21 |
22 | * Run your Rewrite enhanced application!
23 |
24 | TODO's
25 | ======
26 |
27 | * Integrate with mod_rewrite style configuration.
28 |
29 | * Support Tuckey.org init parameters and configuration reloading.
30 |
--------------------------------------------------------------------------------
/transform-markup/src/main/resources/ruby/sass/lib/sass/importers.rb:
--------------------------------------------------------------------------------
1 | module Sass
2 | # Sass importers are in charge of taking paths passed to `@import`
3 | # and finding the appropriate Sass code for those paths.
4 | # By default, this code is always loaded from the filesystem,
5 | # but importers could be added to load from a database or over HTTP.
6 | #
7 | # Each importer is in charge of a single load path
8 | # (or whatever the corresponding notion is for the backend).
9 | # Importers can be placed in the {file:SASS_REFERENCE.md#load_paths-option `:load_paths` array}
10 | # alongside normal filesystem paths.
11 | #
12 | # When resolving an `@import`, Sass will go through the load paths
13 | # looking for an importer that successfully imports the path.
14 | # Once one is found, the imported file is used.
15 | #
16 | # User-created importers must inherit from {Importers::Base}.
17 | module Importers
18 | end
19 | end
20 |
21 | require 'sass/importers/base'
22 | require 'sass/importers/filesystem'
23 |
--------------------------------------------------------------------------------
/transform-markup/src/main/resources/ruby/sass/lib/sass/script/css_parser.rb:
--------------------------------------------------------------------------------
1 | require 'sass/script'
2 | require 'sass/script/css_lexer'
3 |
4 | module Sass
5 | module Script
6 | # This is a subclass of {Parser} for use in parsing plain CSS properties.
7 | #
8 | # @see Sass::SCSS::CssParser
9 | class CssParser < Parser
10 | private
11 |
12 | # @private
13 | def lexer_class; CssLexer; end
14 |
15 | # We need a production that only does /,
16 | # since * and % aren't allowed in plain CSS
17 | production :div, :unary_plus, :div
18 |
19 | def string
20 | return number unless tok = try_tok(:string)
21 | return tok.value unless @lexer.peek && @lexer.peek.type == :begin_interpolation
22 | end
23 |
24 | # Short-circuit all the SassScript-only productions
25 | alias_method :interpolation, :space
26 | alias_method :or_expr, :div
27 | alias_method :unary_div, :ident
28 | alias_method :paren, :string
29 | end
30 | end
31 | end
32 |
--------------------------------------------------------------------------------
/api-tests/src/test/java/org/ocpsoft/rewrite/config/RewriteFilterInvalidRewriteProvider.java:
--------------------------------------------------------------------------------
1 | package org.ocpsoft.rewrite.config;
2 |
3 | import org.ocpsoft.rewrite.event.Rewrite;
4 | import org.ocpsoft.rewrite.spi.RewriteProvider;
5 |
6 | public class RewriteFilterInvalidRewriteProvider implements RewriteProvider
7 | {
8 | @Override
9 | public int priority()
10 | {
11 | return 0;
12 | }
13 |
14 | @Override
15 | public boolean handles(Rewrite payload)
16 | {
17 | return false;
18 | }
19 |
20 | @Override
21 | public void rewrite(RewriteFilterInvalidRewriteType event)
22 | {
23 | throw new IllegalStateException("Fail if called.");
24 | }
25 |
26 | @Override
27 | public void init(Integer context)
28 | {
29 | throw new IllegalStateException("Fail if called.");
30 | }
31 |
32 | @Override
33 | public void shutdown(Integer context)
34 | {
35 | throw new IllegalStateException("Fail if called.");
36 | }
37 |
38 | }
39 |
--------------------------------------------------------------------------------
/api/src/main/java/org/ocpsoft/rewrite/util/Visitor.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2011 Lincoln Baxter, III
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.ocpsoft.rewrite.util;
17 |
18 | /**
19 | * General purpose visitor interface
20 | *
21 | * @author Christian Kaltepoth
22 | */
23 | public interface Visitor
24 | {
25 |
26 | /**
27 | * Visit the supplied object
28 | */
29 | void visit(E e);
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/config-prettyfaces/src/main/java/com/ocpsoft/pretty/faces/config/rewrite/TrailingSlash.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2010 Lincoln Baxter, III
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.ocpsoft.pretty.faces.config.rewrite;
18 |
19 | /**
20 | * Enumeration describing methods of URL trailing slash canonicalization.
21 | *
22 | * @author Lincoln Baxter, III
23 | */
24 | public enum TrailingSlash {
25 | APPEND, REMOVE, IGNORE
26 | }
27 |
--------------------------------------------------------------------------------
/config-servlet/src/test/java/org/ocpsoft/rewrite/servlet/config/JaasRolesTestProvider.java:
--------------------------------------------------------------------------------
1 | package org.ocpsoft.rewrite.servlet.config;
2 |
3 | import javax.servlet.ServletContext;
4 |
5 | import org.ocpsoft.rewrite.config.Configuration;
6 | import org.ocpsoft.rewrite.config.ConfigurationBuilder;
7 | import org.ocpsoft.rewrite.config.Direction;
8 |
9 | public class JaasRolesTestProvider extends HttpConfigurationProvider
10 | {
11 |
12 | @Override
13 | public Configuration getConfiguration(final ServletContext context)
14 | {
15 | Configuration config = ConfigurationBuilder
16 | .begin()
17 |
18 | .addRule()
19 | .when(JAASRoles.required("admin").and(Direction.isInbound())
20 | .and(Path.matches("/admin/{tail}")))
21 | .perform(SendStatus.code(200))
22 | .where("tail").matches(".*");
23 |
24 | return config;
25 | }
26 |
27 | @Override
28 | public int priority()
29 | {
30 | return 0;
31 | }
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/impl/src/main/java/org/ocpsoft/rewrite/instance/DefaultInstanceProvider.java:
--------------------------------------------------------------------------------
1 | package org.ocpsoft.rewrite.instance;
2 |
3 | import org.ocpsoft.logging.Logger;
4 | import org.ocpsoft.rewrite.spi.InstanceProvider;
5 |
6 | /**
7 | * Default implementation of {@link InstanceProvider} using Java reflection.
8 | *
9 | * @author Lincoln Baxter, III
10 | *
11 | */
12 | public class DefaultInstanceProvider implements InstanceProvider
13 | {
14 | private static Logger log = Logger.getLogger(DefaultInstanceProvider.class);
15 |
16 | @Override
17 | public int priority()
18 | {
19 | return 0;
20 | }
21 |
22 | @Override
23 | public Object getInstance(Class> type)
24 | {
25 | Object result = null;
26 | try {
27 | result = type.newInstance();
28 | }
29 | catch (Exception e) {
30 | log.debug("Could not create instance of type [" + type.getName() + "] through reflection.", e);
31 | }
32 | return result;
33 | }
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/test-base/src/main/java/org/ocpsoft/rewrite/category/IgnoreForAS7.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2011 Lincoln Baxter, III
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.ocpsoft.rewrite.category;
17 |
18 | /**
19 | * JUnit category which will prevent a certain test to be executed when running the test suite with JBoss AS7.
20 | *
21 | * @author Christian Kaltepoth
22 | */
23 | public interface IgnoreForAS7
24 | {
25 | }
26 |
--------------------------------------------------------------------------------
/api-tests/src/test/java/org/ocpsoft/rewrite/test/MockRewriteContext.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2011 Lincoln Baxter, III
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.ocpsoft.rewrite.test;
17 |
18 | import org.ocpsoft.rewrite.context.ContextBase;
19 |
20 | /**
21 | * @author Lincoln Baxter, III
22 | *
23 | */
24 | public class MockRewriteContext extends ContextBase
25 | {
26 | }
27 |
--------------------------------------------------------------------------------
/test-base/src/main/java/org/ocpsoft/rewrite/category/IgnoreForWildfly.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2011 Lincoln Baxter, III
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.ocpsoft.rewrite.category;
17 |
18 | /**
19 | * JUnit category which will prevent a certain test to be executed when running the test suite with Wildfly.
20 | *
21 | * @author Christian Kaltepoth
22 | */
23 | public interface IgnoreForWildfly
24 | {
25 | }
26 |
--------------------------------------------------------------------------------
/annotations-impl/src/test/java/org/ocpsoft/rewrite/annotation/visit/MethodHandler.java:
--------------------------------------------------------------------------------
1 | package org.ocpsoft.rewrite.annotation.visit;
2 |
3 | import org.ocpsoft.rewrite.annotation.api.HandlerChain;
4 | import org.ocpsoft.rewrite.annotation.api.MethodContext;
5 | import org.ocpsoft.rewrite.annotation.spi.MethodAnnotationHandler;
6 | import org.ocpsoft.rewrite.servlet.config.Path;
7 | import org.ocpsoft.rewrite.servlet.config.SendStatus;
8 |
9 | public class MethodHandler extends MethodAnnotationHandler
10 | {
11 | @Override
12 | public Class handles()
13 | {
14 | return MethodAnno.class;
15 | }
16 |
17 | @Override
18 | public void process(MethodContext context, MethodAnno annotation, HandlerChain chain)
19 | {
20 | context.getConfigurationBuilder().addRule()
21 | .when(Path.matches("/annotation/" + annotation.value()))
22 | .perform(SendStatus.code(202));
23 | }
24 |
25 | @Override
26 | public int priority()
27 | {
28 | return 0;
29 | }
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/integration-faces/src/test/resources/outcome-encoding-start.xhtml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
11 |
12 |
14 |
15 |
17 |
18 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/annotations-impl/src/test/java/org/ocpsoft/rewrite/annotation/visit/ParamHandler.java:
--------------------------------------------------------------------------------
1 | package org.ocpsoft.rewrite.annotation.visit;
2 |
3 | import org.ocpsoft.rewrite.annotation.api.HandlerChain;
4 | import org.ocpsoft.rewrite.annotation.api.ParameterContext;
5 | import org.ocpsoft.rewrite.annotation.spi.ParameterAnnotationHandler;
6 | import org.ocpsoft.rewrite.servlet.config.Path;
7 | import org.ocpsoft.rewrite.servlet.config.SendStatus;
8 |
9 | public class ParamHandler extends ParameterAnnotationHandler
10 | {
11 | @Override
12 | public Class handles()
13 | {
14 | return ParamAnno.class;
15 | }
16 |
17 | @Override
18 | public void process(ParameterContext context, ParamAnno annotation, HandlerChain chain)
19 | {
20 | context.getConfigurationBuilder().addRule()
21 | .when(Path.matches("/annotation/" + annotation.value()))
22 | .perform(SendStatus.code(203));
23 | }
24 |
25 | @Override
26 | public int priority()
27 | {
28 | return 0;
29 | }
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/config-prettyfaces-tests/src/test/java/org/ocpsoft/rewrite/prettyfaces/redirect/RedirectBean.java:
--------------------------------------------------------------------------------
1 | package org.ocpsoft.rewrite.prettyfaces.redirect;
2 |
3 | import javax.faces.bean.ManagedBean;
4 | import javax.faces.bean.RequestScoped;
5 |
6 | @ManagedBean
7 | @RequestScoped
8 | public class RedirectBean
9 | {
10 | public static final String PATH_VALUE = " ? ";
11 | public static final String QUERY_VALUE = "ora. es";
12 |
13 | public String value;
14 | public String queryValue;
15 |
16 | public String redirect()
17 | {
18 | value = PATH_VALUE;
19 | queryValue = QUERY_VALUE;
20 | return "pretty:valued";
21 | }
22 |
23 | public String getValue()
24 | {
25 | return value;
26 | }
27 |
28 | public void setValue(final String value)
29 | {
30 | this.value = value;
31 | }
32 |
33 | public String getQueryValue()
34 | {
35 | return queryValue;
36 | }
37 |
38 | public void setQueryValue(final String queryValue)
39 | {
40 | this.queryValue = queryValue;
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/test-base/src/main/java/org/ocpsoft/rewrite/category/IgnoreForGlassfish3.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2011 Lincoln Baxter, III
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.ocpsoft.rewrite.category;
17 |
18 | /**
19 | * JUnit category which will prevent a certain test to be executed when running the test suite with Glassfish 3.x.
20 | *
21 | * @author Christian Kaltepoth
22 | */
23 | public interface IgnoreForGlassfish3
24 | {
25 | }
26 |
--------------------------------------------------------------------------------
/test-base/src/main/java/org/ocpsoft/rewrite/category/IgnoreForGlassfish4.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2011 Lincoln Baxter, III
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.ocpsoft.rewrite.category;
17 |
18 | /**
19 | * JUnit category which will prevent a certain test to be executed when running the test suite with Glassfish 4.x.
20 | *
21 | * @author Christian Kaltepoth
22 | */
23 | public interface IgnoreForGlassfish4
24 | {
25 | }
26 |
--------------------------------------------------------------------------------
/test-harness/src/main/java/org/ocpsoft/rewrite/mock/MockRewriteContext.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2011 Lincoln Baxter, III
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.ocpsoft.rewrite.mock;
17 |
18 | import org.ocpsoft.rewrite.context.ContextBase;
19 |
20 |
21 | /**
22 | * @author Lincoln Baxter, III
23 | *
24 | */
25 | public class MockRewriteContext extends ContextBase
26 | {
27 | }
28 |
--------------------------------------------------------------------------------
/transform-markup/src/main/resources/ruby/redcloth/lib/redcloth/version.rb:
--------------------------------------------------------------------------------
1 | module RedCloth
2 | module VERSION
3 | MAJOR = 4
4 | MINOR = 2
5 | TINY = 9
6 | RELEASE_CANDIDATE = nil
7 |
8 | STRING = [MAJOR, MINOR, TINY, RELEASE_CANDIDATE].compact.join('.')
9 | TAG = "REL_#{[MAJOR, MINOR, TINY, RELEASE_CANDIDATE].compact.join('_')}".upcase.gsub(/\.|-/, '_')
10 | FULL_VERSION = "#{[MAJOR, MINOR, TINY, RELEASE_CANDIDATE].compact.join('.')}"
11 |
12 | class << self
13 | def to_s
14 | STRING
15 | end
16 |
17 | def ==(arg)
18 | STRING == arg
19 | end
20 | end
21 | end
22 |
23 | NAME = "RedCloth"
24 | GEM_NAME = NAME
25 | URL = "http://redcloth.org/"
26 | description = "Textile parser for Ruby."
27 |
28 | if RedCloth.const_defined?(:EXTENSION_LANGUAGE)
29 | SUMMARY = "#{NAME}-#{VERSION::FULL_VERSION}-#{EXTENSION_LANGUAGE}"
30 | else
31 | SUMMARY = "#{NAME}-#{VERSION::FULL_VERSION}"
32 | end
33 | DESCRIPTION = SUMMARY + " - #{description}\n#{URL}"
34 | end
35 |
--------------------------------------------------------------------------------
/annotations-impl/src/test/java/org/ocpsoft/rewrite/annotation/visit/FieldHandler.java:
--------------------------------------------------------------------------------
1 | package org.ocpsoft.rewrite.annotation.visit;
2 |
3 | import org.ocpsoft.rewrite.annotation.api.FieldContext;
4 | import org.ocpsoft.rewrite.annotation.api.HandlerChain;
5 | import org.ocpsoft.rewrite.annotation.spi.FieldAnnotationHandler;
6 | import org.ocpsoft.rewrite.servlet.config.Path;
7 | import org.ocpsoft.rewrite.servlet.config.SendStatus;
8 |
9 | public class FieldHandler extends FieldAnnotationHandler
10 | {
11 | @Override
12 | public Class handles()
13 | {
14 | return FieldAnno.class;
15 | }
16 |
17 | @Override
18 | public void process(FieldContext context, FieldAnno annotation, HandlerChain chain)
19 | {
20 | context.getConfigurationBuilder().addRule()
21 | .when(Path.matches("/annotation/" + annotation.value()))
22 | .perform(SendStatus.code(201));
23 | chain.proceed();
24 | }
25 |
26 | @Override
27 | public int priority()
28 | {
29 | return 0;
30 | }
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/config-annotations/src/test/java/org/ocpsoft/rewrite/annotation/RewriteAnnotationTest.java:
--------------------------------------------------------------------------------
1 | package org.ocpsoft.rewrite.annotation;
2 |
3 | import java.io.File;
4 |
5 | import org.jboss.shrinkwrap.api.ShrinkWrap;
6 | import org.jboss.shrinkwrap.api.spec.JavaArchive;
7 |
8 | public class RewriteAnnotationTest
9 | {
10 | public static JavaArchive getRewriteAnnotationArchive()
11 | {
12 | return ShrinkWrap.create(JavaArchive.class, "rewrite-annotations.jar")
13 | .addAsResource(new File("../annotations-api/target/classes/org"))
14 | .addAsResource(new File("../annotations-impl/target/classes/org"))
15 | .addAsResource(new File("../annotations-impl/target/classes/META-INF"));
16 | }
17 |
18 | public static JavaArchive getRewriteCdiArchive()
19 | {
20 | return ShrinkWrap.create(JavaArchive.class, "rewrite-cdi.jar")
21 | .addAsResource(new File("../integration-cdi/target/classes/org"))
22 | .addAsResource(new File("../integration-cdi/target/classes/META-INF"));
23 | }
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/config-prettyfaces-tests/src/test/resources/outbound/outbound.xhtml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/annotations-impl/src/test/java/org/ocpsoft/rewrite/annotation/scan/ClassFinderTestBean.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2011 Lincoln Baxter, III
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.ocpsoft.rewrite.annotation.scan;
17 |
18 | /**
19 | * Simple test bean used by {@link WebClassesFinderTest} and {@link WebLibFinderTest}.
20 | *
21 | * @author Christian Kaltepoth
22 | */
23 | @TestAnnotation
24 | public class ClassFinderTestBean
25 | {
26 | // Nothing
27 | }
28 |
--------------------------------------------------------------------------------
/impl-servlet/src/main/java/org/ocpsoft/rewrite/servlet/impl/HttpBufferRewriteImpl.java:
--------------------------------------------------------------------------------
1 | package org.ocpsoft.rewrite.servlet.impl;
2 |
3 | import javax.servlet.ServletContext;
4 | import javax.servlet.http.HttpServletRequest;
5 | import javax.servlet.http.HttpServletResponse;
6 |
7 | import org.ocpsoft.rewrite.servlet.http.event.HttpServletRewrite;
8 | import org.ocpsoft.urlbuilder.Address;
9 |
10 | public class HttpBufferRewriteImpl extends BaseHttpRewrite implements HttpServletRewrite
11 | {
12 | private HttpInboundRewriteImpl delegate;
13 |
14 | public HttpBufferRewriteImpl(HttpServletRequest request, HttpServletResponse response, ServletContext servletContext)
15 | {
16 | super(request, response, servletContext);
17 | this.delegate = new HttpInboundRewriteImpl(request, response, servletContext);
18 | }
19 |
20 | @Override
21 | public String getContextPath()
22 | {
23 | return delegate.getContextPath();
24 | }
25 |
26 | @Override
27 | public Address getAddress()
28 | {
29 | return delegate.getAddress();
30 | }
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/transform-markup/src/main/resources/ruby/sass/lib/sass/tree/for_node.rb:
--------------------------------------------------------------------------------
1 | require 'sass/tree/node'
2 |
3 | module Sass::Tree
4 | # A dynamic node representing a Sass `@for` loop.
5 | #
6 | # @see Sass::Tree
7 | class ForNode < Node
8 | # The name of the loop variable.
9 | # @return [String]
10 | attr_reader :var
11 |
12 | # The parse tree for the initial expression.
13 | # @return [Script::Node]
14 | attr_accessor :from
15 |
16 | # The parse tree for the final expression.
17 | # @return [Script::Node]
18 | attr_accessor :to
19 |
20 | # Whether to include `to` in the loop or stop just before.
21 | # @return [Boolean]
22 | attr_reader :exclusive
23 |
24 | # @param var [String] See \{#var}
25 | # @param from [Script::Node] See \{#from}
26 | # @param to [Script::Node] See \{#to}
27 | # @param exclusive [Boolean] See \{#exclusive}
28 | def initialize(var, from, to, exclusive)
29 | @var = var
30 | @from = from
31 | @to = to
32 | @exclusive = exclusive
33 | super()
34 | end
35 | end
36 | end
37 |
--------------------------------------------------------------------------------