You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@deltaspike.apache.org by st...@apache.org on 2012/06/15 18:49:57 UTC

[2/2] git commit: DELTASPIKE-203 implement @DefaultConfiguration Qualifier

DELTASPIKE-203 implement @DefaultConfiguration Qualifier

This Qualifier can be used to mark system wide default implementations.
See e.g. DefaultLocaleResolver.


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

Branch: refs/heads/master
Commit: 222b3c0d1138fed131edd095b78c75de407b654d
Parents: c75903a
Author: Mark Struberg <st...@apache.org>
Authored: Fri Jun 15 18:47:55 2012 +0200
Committer: Mark Struberg <st...@apache.org>
Committed: Fri Jun 15 18:47:55 2012 +0200

----------------------------------------------------------------------
 .../config/annotation/DefaultConfiguration.java    |   43 +++++++++++++++
 .../api/literal/DefaultConfigurationLiteral.java   |   31 +++++++++++
 2 files changed, 74 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/blob/222b3c0d/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/api/config/annotation/DefaultConfiguration.java
----------------------------------------------------------------------
diff --git a/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/api/config/annotation/DefaultConfiguration.java b/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/api/config/annotation/DefaultConfiguration.java
new file mode 100644
index 0000000..e0d006a
--- /dev/null
+++ b/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/api/config/annotation/DefaultConfiguration.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.core.api.config.annotation;
+
+import javax.inject.Qualifier;
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+/**
+ * <p>Qualifier for marking beans which provide defaults for
+ * a specific configuration.</p>
+ */
+@Target({ TYPE, PARAMETER, FIELD, METHOD, ANNOTATION_TYPE })
+@Retention(RUNTIME)
+@Documented
+@Qualifier
+public @interface DefaultConfiguration
+{
+}

http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/blob/222b3c0d/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/api/literal/DefaultConfigurationLiteral.java
----------------------------------------------------------------------
diff --git a/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/api/literal/DefaultConfigurationLiteral.java b/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/api/literal/DefaultConfigurationLiteral.java
new file mode 100644
index 0000000..11e6195
--- /dev/null
+++ b/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/api/literal/DefaultConfigurationLiteral.java
@@ -0,0 +1,31 @@
+/*
+ * 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.core.api.literal;
+
+import javax.enterprise.util.AnnotationLiteral;
+
+import org.apache.deltaspike.core.api.config.annotation.DefaultConfiguration;
+
+/**
+ * Literal for the {@link DefaultConfiguration} annotation.
+ */
+public class DefaultConfigurationLiteral extends AnnotationLiteral<DefaultConfiguration> implements DefaultConfiguration
+{
+    private static final long serialVersionUID = -8623640277155878657L;
+}