You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@deltaspike.apache.org by gp...@apache.org on 2013/03/29 01:18:28 UTC

git commit: DELTASPIKE-336 added use-case

Updated Branches:
  refs/heads/master b0daa0891 -> 756cbe48c


DELTASPIKE-336 added use-case


Project: http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/commit/756cbe48
Tree: http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/tree/756cbe48
Diff: http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/diff/756cbe48

Branch: refs/heads/master
Commit: 756cbe48c20c77e80aa6638e095d334386114fe4
Parents: b0daa08
Author: gpetracek <gp...@apache.org>
Authored: Fri Mar 29 00:39:37 2013 +0100
Committer: gpetracek <gp...@apache.org>
Committed: Fri Mar 29 00:42:40 2013 +0100

----------------------------------------------------------------------
 .../impl/config/view/custom/uc004/PageBean004.java |   32 ++++++++++
 .../jsf/impl/config/view/custom/uc004/Pages.java   |   43 +++++++++++++
 .../view/custom/uc004/TestFacesRedirect.java       |   47 +++++++++++++++
 3 files changed, 122 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/blob/756cbe48/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/custom/uc004/PageBean004.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/custom/uc004/PageBean004.java b/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/custom/uc004/PageBean004.java
new file mode 100644
index 0000000..e10b356
--- /dev/null
+++ b/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/custom/uc004/PageBean004.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.deltaspike.test.jsf.impl.config.view.custom.uc004;
+
+import org.apache.deltaspike.core.api.config.view.ViewConfig;
+
+import javax.enterprise.inject.Model;
+
+@Model
+class PageBean004
+{
+    public Class<? extends ViewConfig> item()
+    {
+        return Pages.Public.Index.class;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/blob/756cbe48/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/custom/uc004/Pages.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/custom/uc004/Pages.java b/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/custom/uc004/Pages.java
new file mode 100644
index 0000000..345072d
--- /dev/null
+++ b/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/custom/uc004/Pages.java
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.deltaspike.test.jsf.impl.config.view.custom.uc004;
+
+import org.apache.deltaspike.core.api.config.view.ViewConfig;
+import org.apache.deltaspike.jsf.api.config.view.View;
+
+import static org.apache.deltaspike.jsf.api.config.view.View.ViewParameterMode.INCLUDE;
+
+//TODO add tests
+
+interface Pages
+{
+    @TestFacesRedirect
+    interface Public extends ViewConfig
+    {
+        class Index implements Public
+        {
+        }
+    }
+
+    @TestFacesRedirect
+    @View(viewParams = INCLUDE)
+    class Home implements ViewConfig
+    {
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/blob/756cbe48/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/custom/uc004/TestFacesRedirect.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/custom/uc004/TestFacesRedirect.java b/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/custom/uc004/TestFacesRedirect.java
new file mode 100644
index 0000000..98b969a
--- /dev/null
+++ b/deltaspike/modules/jsf/impl/src/test/java/org/apache/deltaspike/test/jsf/impl/config/view/custom/uc004/TestFacesRedirect.java
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.deltaspike.test.jsf.impl.config.view.custom.uc004;
+
+import org.apache.deltaspike.core.api.config.view.metadata.annotation.ViewMetaData;
+import org.apache.deltaspike.jsf.api.config.view.View;
+
+import javax.enterprise.inject.Stereotype;
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import static org.apache.deltaspike.jsf.api.config.view.View.NavigationMode.REDIRECT;
+
+/**
+ * Custom meta-data
+ */
+
+//don't use @Inherited
+@Target({TYPE})
+@Retention(RUNTIME)
+@Documented
+
+@Stereotype
+@ViewMetaData
+@View(navigation = REDIRECT)
+@interface TestFacesRedirect
+{
+}