001// Licensed under the Apache License, Version 2.0 (the "License");
002// you may not use this file except in compliance with the License.
003// You may obtain a copy of the License at
004//
005//     http://www.apache.org/licenses/LICENSE-2.0
006//
007// Unless required by applicable law or agreed to in writing, software
008// distributed under the License is distributed on an "AS IS" BASIS,
009// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
010// See the License for the specific language governing permissions and
011// limitations under the License.
012
013package org.apache.tapestry5.annotations;
014
015import org.apache.tapestry5.ioc.annotations.AnnotationUseContext;
016import org.apache.tapestry5.ioc.annotations.UseWith;
017
018import java.lang.annotation.Documented;
019import java.lang.annotation.Retention;
020import java.lang.annotation.Target;
021
022import static java.lang.annotation.ElementType.TYPE;
023import static java.lang.annotation.RetentionPolicy.RUNTIME;
024
025/**
026 * Identifies a page that should only be accessed from clients on the whitelist. This is used for
027 * the  built-in {@link org.apache.tapestry5.corelib.pages.T5Dashboard} page, but can also be used in application pages.
028 *
029 * Tapestry does its best to make a request to a whitelist-only page that is accessed from a client not on the whitelist
030 * appear to behave as if the page does not exist at all.
031 *
032 * @see org.apache.tapestry5.MetaDataConstants#WHITELIST_ONLY_PAGE
033 * @see org.apache.tapestry5.services.security.ClientWhitelist
034 * @since 5.3
035 */
036@Target(TYPE)
037@Retention(RUNTIME)
038@Documented
039@UseWith(AnnotationUseContext.PAGE)
040public @interface WhitelistAccessOnly
041{
042}