    001// Copyright 2008, 2009, 2013 The Apache Software Foundation
    002//
    003// Licensed under the Apache License, Version 2.0 (the "License");
    004// you may not use this file except in compliance with the License.
    005// You may obtain a copy of the License at
    006//
    007//     http://www.apache.org/licenses/LICENSE-2.0
    008//
    009// Unless required by applicable law or agreed to in writing, software
    010// distributed under the License is distributed on an "AS IS" BASIS,
    011// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    012// See the License for the specific language governing permissions and
    013// limitations under the License.
    014
    015package org.apache.tapestry5.annotations;
    016
    017import org.apache.tapestry5.ioc.annotations.AnnotationUseContext;
    018import org.apache.tapestry5.ioc.annotations.UseWith;
    019
    020import java.lang.annotation.Documented;
    021import java.lang.annotation.Retention;
    022import java.lang.annotation.Target;
    023
    024import static java.lang.annotation.ElementType.TYPE;
    025import static java.lang.annotation.RetentionPolicy.RUNTIME;
    026
    027/**
    028 * A marker annotation that indicates that the page in question may only be accessed with a exact activation context.
    029 *
    030 * @see org.apache.tapestry5.MetaDataConstants#UNKNOWN_ACTIVATION_CONTEXT_CHECK
    031 * @since 5.4
    032 */
    033@Target(TYPE)
    034@Retention(RUNTIME)
    035@Documented
    036@UseWith(AnnotationUseContext.PAGE)
    037public @interface UnknownActivationContextCheck
    038{
    039    /**
    040     * If <code>true</code>, the default, the framework will check for an exact (number and type of parameters)
    041     * activation context method and if not found will respond with a 404 Not Found status code, if <code>false</code>
    042     * the activation context is ignored as it was before 5.4 release.
    043     *
    044     * @see org.apache.tapestry5.MetaDataConstants#UNKNOWN_ACTIVATION_CONTEXT_CHECK
    045     * @see org.apache.tapestry5.services.HttpError
    046     */
    047    boolean value() default true;
    048}