diff --git a/api/pom.xml b/api/pom.xml index 4ac8cdac2d..f49fd1627a 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -378,19 +378,6 @@ - - attach-managedbeandocs - - jar - - - managed-bean-javadoc - ${project.build.directory}/managed-bean-javadocs - ${project.build.directory}/site/managed-bean-javadocs - javax.faces.bean - - - diff --git a/impl/src/main/java/javax/faces/bean/ApplicationScoped.java b/impl/src/main/java/javax/faces/bean/ApplicationScoped.java deleted file mode 100644 index 9e48bec4cb..0000000000 --- a/impl/src/main/java/javax/faces/bean/ApplicationScoped.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) 1997, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package javax.faces.bean; - -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; -import java.lang.annotation.ElementType; -import java.lang.annotation.Inherited; - -/** - * - *

When this annotation, along with {@link - * ManagedBean} is found on a class, the runtime must act as if a - * <managed-bean-scope>application<managed-bean-scope> - * element was declared for the corresponding managed bean.

- * - * - * @since 2.0 - * @deprecated This has been replaced by {@code javax.enterprise.context.ApplicationScoped}, - * which is a CDI build-in scope with similar semantics. - */ -@Retention(RetentionPolicy.RUNTIME) -@Target(ElementType.TYPE) -@Inherited -@Deprecated -public @interface ApplicationScoped { -} diff --git a/impl/src/main/java/javax/faces/bean/CustomScoped.java b/impl/src/main/java/javax/faces/bean/CustomScoped.java deleted file mode 100644 index c6ff8f1835..0000000000 --- a/impl/src/main/java/javax/faces/bean/CustomScoped.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) 1997, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package javax.faces.bean; - -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; -import java.lang.annotation.ElementType; -import java.lang.annotation.Inherited; - -/** - *

When this annotation, along with {@link - * ManagedBean} is found on a class, the runtime must act as if a - * <managed-bean-scope>VALUE<managed-bean-scope> - * element was declared for the corresponding managed bean, where VALUE is the - * value of the {@link #value} attribute, which must be an EL expression that - * evaluates to a Map.

- * - *

Developers must take care when using custom - * scopes to ensure that any object references made to or from a custom scoped - * bean consider the necessary scope lifetimes. The runtime is not required to - * perform any validations for such considerations.

- * - * - * @since 2.0 - * @deprecated This has been replaced by CDI custom scopes and - * {@code javax.enterprise.context.spi.Context}. See 2.4.2 and 6.2 of the CDI - * specification for further details. - */ -@Retention(RetentionPolicy.RUNTIME) -@Target(ElementType.TYPE) -@Inherited -@Deprecated -public @interface CustomScoped { - - /** - * Get the value. - * - * @return the value. - */ - public String value(); -} diff --git a/impl/src/main/java/javax/faces/bean/ManagedBean.java b/impl/src/main/java/javax/faces/bean/ManagedBean.java deleted file mode 100644 index 60df51bd64..0000000000 --- a/impl/src/main/java/javax/faces/bean/ManagedBean.java +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Copyright (c) 1997, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package javax.faces.bean; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; -import java.lang.annotation.Inherited; - -/** - *

The presence of this annotation on a class - * automatically registers the class with the runtime as a managed bean class. - * Classes must be scanned for the presence of this annotation at application - * startup, before any requests have been serviced.

- * - *
- * - *

- * The value of the {@link #name} attribute is taken to be the - * managed-bean-name. If the value of the name - * attribute is unspecified or is the empty String, the - * managed-bean-name is derived from taking the unqualified class name - * portion of the fully qualified class name and converting the first character - * to lower case. For example, if the ManagedBean annotation is on - * a class with the fully qualified class name com.foo.Bean, and - * there is no - * name attribute on the annotation, the - * managed-bean-name is taken to be bean. The fully - * qualified class name of the class to which this annotation is attached is - * taken to be the managed-bean-class.

- * - *

- * The scope of the managed bean is declared using one of {@link - * NoneScoped}, {@link RequestScoped}, {@link ViewScoped}, {@link - * SessionScoped}, {@link ApplicationScoped}, or {@link CustomScoped} - * annotations. If the scope annotations are omitted, the bean must be handled - * as if the {@link RequestScoped} annotation is present.

- * - *

- * If the value of the {@link #eager} attribute is true, and the - * managed-bean-scope value is "application", the runtime must - * instantiate this class when the application starts. This instantiation and - * storing of the instance must happen before any requests are serviced. If - * eager is unspecified or false, or the - * managed-bean-scope is something other than "application", the - * default "lazy" instantiation and scoped storage of the managed bean - * happens.

- * - *

- * When the runtime processes this annotation, if a managed bean exists whose - * name is equal to the derived managed-bean-name, a - * FacesException must be thrown and the application must not be - * placed in service.

- * - *

- * A class tagged with this annotation must have a public zero-argument - * constructor. If such a constructor is not defined on the class, a - * FacesException must be thrown and the application must not be - * placed in service.

- * - *
- * - * @since 2.0 - * @deprecated This has been replaced by the Managed Beans specification in - * general and specifically the dependency injection, scopes and naming - * from the CDI specification. Note that the eager attribute - * for application scoped beans is replaced specifically by observing - * the {@code javax.enterprise.context.Initialized} event for - * {@code javax.enterprise.context.ApplicationScoped}. See 6.7.3 of the CDI - * spec for further details. - * - */ -@Retention(RetentionPolicy.RUNTIME) -@Target(ElementType.TYPE) -@Inherited -@Deprecated -public @interface ManagedBean { - - /** - *

Taken to be the - * managed-bean-name. See class documentation for details.

- * - * @return the managed bean name. - */ - String name() default ""; - - /** - *

Taken to be the value of the - * eager attribute of the managed-bean. See class - * documentation for details.

- * - * @return the eager attribute of the managed bean. - */ - boolean eager() default false; -} diff --git a/impl/src/main/java/javax/faces/bean/ManagedProperty.java b/impl/src/main/java/javax/faces/bean/ManagedProperty.java deleted file mode 100644 index 4dd394ac8e..0000000000 --- a/impl/src/main/java/javax/faces/bean/ManagedProperty.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (c) 1997, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package javax.faces.bean; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - *

The presence of this annotation on a field of a - * class annotated with {@link ManagedBean} instructs the system to inject a - * value into this property as described in section JSF.5.3 of the spec prose - * document in the <managed-property> subsection. The time of - * instantiation is dictated by the value of the attributes on the usage of - * ManagedBean and by the application logic itself. The value of - * the {@link #value} attribute may be a literal String or a - * ValueExpression. If the latter, the expression must not be - * evaluated until the bean is instantiated. The value of the name attribute is - * taken to be the - * managed-property-name for this property. If not specified, the - * managed-property-name is taken to be the name of the field to which - * this is attribute is attached.

- * - *

If this annotation is present on a class that - * does not have the ManagedBean annotation, the implementation - * must take no action on this annotation.

- * - * @deprecated This has been replaced by {@code javax.faces.annotation.ManagedProperty}, - * which is a CDI build-in bean with similar semantics - */ -@Retention(RetentionPolicy.RUNTIME) -@Target(ElementType.FIELD) -@Deprecated -public @interface ManagedProperty { - - /** - *

Taken to be the - * managed-property-name. See class documentation for - * details.

- * - * @return the managed property name. - */ - String name() default ""; - - /** - *

Taken to be the value that is injected into - * the field. See class documentation for details.

- * - * @return the value. - */ - String value(); -} diff --git a/impl/src/main/java/javax/faces/bean/NoneScoped.java b/impl/src/main/java/javax/faces/bean/NoneScoped.java deleted file mode 100644 index cab87397d5..0000000000 --- a/impl/src/main/java/javax/faces/bean/NoneScoped.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) 1997, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package javax.faces.bean; - -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; -import java.lang.annotation.ElementType; -import java.lang.annotation.Inherited; - -/** - *

When this annotation, along with {@link - * ManagedBean} is found on a class, the runtime must act as if a - * <managed-bean-scope>none<managed-bean-scope> element - * was declared for the corresponding managed bean.

- * - * @since 2.0 - * @deprecated This has been replaced by {@code javax.enterprise.context.Dependent}, - * which is a CDI build-in scope with approximately similar semantics. - */ -@Retention(RetentionPolicy.RUNTIME) -@Target(ElementType.TYPE) -@Inherited -@Deprecated -public @interface NoneScoped { -} diff --git a/impl/src/main/java/javax/faces/bean/ReferencedBean.java b/impl/src/main/java/javax/faces/bean/ReferencedBean.java deleted file mode 100644 index ea02ed920e..0000000000 --- a/impl/src/main/java/javax/faces/bean/ReferencedBean.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) 1997, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package javax.faces.bean; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; -import java.lang.annotation.Inherited; - -/** - *

The presence of this annotation on a class is - * equivalent to the referenced-bean element in the application - * configuration resources.

- * - * @since 2.0 - * @deprecated The referenced-bean concept was used for a design time promise - * which however did not achieve widespread adoption. There is no direct - * replacement for this other than using the XML variant in faces-config.xml. - */ -@Retention(RetentionPolicy.CLASS) -@Target(ElementType.TYPE) -@Inherited -@Deprecated -public @interface ReferencedBean { - - /** - *

Taken to be the - * referenced-bean-name. See class documentation for - * {@link ManagedBean} for details.

- * - * @return the referenced bean name. - */ - String name() default ""; -} diff --git a/impl/src/main/java/javax/faces/bean/RequestScoped.java b/impl/src/main/java/javax/faces/bean/RequestScoped.java deleted file mode 100644 index e4c3e576ee..0000000000 --- a/impl/src/main/java/javax/faces/bean/RequestScoped.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) 1997, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package javax.faces.bean; - -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; -import java.lang.annotation.ElementType; -import java.lang.annotation.Inherited; - -/** - *

When this annotation, along with {@link - * ManagedBean} is found on a class, the runtime must act as if a - * <managed-bean-scope>request<managed-bean-scope> - * element was declared for the corresponding managed bean.

- * - * @since 2.0 - * @deprecated This has been replaced by {@code javax.enterprise.context.RequestScoped}, - * which is a CDI build-in scope with similar semantics. - */ -@Retention(RetentionPolicy.RUNTIME) -@Target(ElementType.TYPE) -@Inherited -@Deprecated -public @interface RequestScoped { -} diff --git a/impl/src/main/java/javax/faces/bean/SessionScoped.java b/impl/src/main/java/javax/faces/bean/SessionScoped.java deleted file mode 100644 index 1f161cacd7..0000000000 --- a/impl/src/main/java/javax/faces/bean/SessionScoped.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) 1997, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package javax.faces.bean; - -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; -import java.lang.annotation.ElementType; -import java.lang.annotation.Inherited; - -/** - *

When this annotation, along with {@link - * ManagedBean} is found on a class, the runtime must act as if a - * <managed-bean-scope>session<managed-bean-scope> - * element was declared for the corresponding managed bean.

- * - * @since 2.0 - * @deprecated This has been replaced by {@code javax.enterprise.context.SessionScoped}, - * which is a CDI build-in scope with similar semantics. - */ -@Retention(RetentionPolicy.RUNTIME) -@Target(ElementType.TYPE) -@Inherited -@Deprecated -public @interface SessionScoped { -} diff --git a/impl/src/main/java/javax/faces/bean/ViewScoped.java b/impl/src/main/java/javax/faces/bean/ViewScoped.java deleted file mode 100644 index 1649d774f8..0000000000 --- a/impl/src/main/java/javax/faces/bean/ViewScoped.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright (c) 1997, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package javax.faces.bean; - -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; -import java.lang.annotation.ElementType; -import java.lang.annotation.Inherited; - -/** - *

When this annotation, along with - * {@code ManagedBean} is found on a class, the runtime must act as if a - * <managed-bean-scope>view<managed-bean-scope> element - * was declared for the corresponding managed bean.

- * - *
- * - *

- * If ProjectStage is not ProjectStage.Production, - * verify that the current {@code - * UIViewRoot} does not have its {@code transient} property set to {@code true}. - * If so, add a FacesMessage for the current {@code viewId} to the - * FacesContext stating {@code @ViewScoped} beans cannot work if - * the view is marked as transient. Also log a Level.WARNING - * message to the log. If ProjectStage is - * ProjectStage.Production, do not do this verification.

- * - *

- * The bean must be stored in the map returned from - * {@code javax.faces.component.UIViewRoot.getViewMap(boolean)}.

- * - *

- * The runtime must ensure that any methods on the bean annotated with - * {@code PostConstruct} or {@code PreDestroy} are called when the scope begins - * and ends, respectively. Two circumstances can cause the scope to end.

- * - * - * - *

- * In the session expiration case, the runtime must ensure that - * {@code FacesContext.getCurrentInstance()} returns a valid instance if it is - * called during the processing of the {@code @PreDestroy} annotated method. The - * set of methods on {@code FacesContext} that are valid to call in this - * circumstance is identical to those documented as "valid to call this method - * during application startup or shutdown". On the {@code ExternalContext} - * returned from that {@code FacesContext}, all of the methods documented as - * "valid to call this method during application startup or shutdown" are valid - * to call. In addition, the method {@code - * ExternalContext.getSessionMap()} is also valid to call.

- * - *
- * - * - * @since 2.0 - * @deprecated This has been replaced by {@code javax.faces.view.ViewScoped}. - * The functionality of this corresponding annotation is identical to this one, - * but it is implemented as a CDI custom scope. - * - */ -@Retention(RetentionPolicy.RUNTIME) -@Target(ElementType.TYPE) -@Inherited -@Deprecated -public @interface ViewScoped { -} diff --git a/impl/src/main/java/javax/faces/bean/package-info.java b/impl/src/main/java/javax/faces/bean/package-info.java deleted file mode 100644 index 2ccd990930..0000000000 --- a/impl/src/main/java/javax/faces/bean/package-info.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (c) 1997, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/** - * This package is now deprecated. The specification for managed beans from JSF - * has been placed into its own specifications, namely Managed Beans and CDI. - */ -@Deprecated -package javax.faces.bean; -