info.magnolia.module.blossom.annotation
Annotation Type Available


@Retention(value=RUNTIME)
@Target(value=METHOD)
public @interface Available

Declares a method as being responsible for deciding if a template can be used on a specific page. The method can accept an argument of type Node or Content, a object of type TemplateDefinition which is the template definition of the current template and must return boolean. It should not throw a checked exception. If defined in a super class the method will be detected and used.

For example:

 @Available
 public boolean isAvailable(Node node, TemplateDefinition templateDefinition) { ... }
 

Since:
1.1.1
See Also:
Template, Content



Copyright © 2009-2012 Magnolia International Ltd.. All Rights Reserved.