Oracle Fusion Middleware
Java API Reference for Oracle WebLogic Server
12c (12.1.2)

Part Number E27170-02

weblogic.descriptor.annotation
Class BeanAnnotations

java.lang.Object
  extended by weblogic.descriptor.annotation.GlobalAnnotations
      extended by weblogic.descriptor.annotation.BeanAnnotations

public class BeanAnnotations
extends GlobalAnnotations

Defines annotations that can be specified in a bean interface comment block to contribute to the definition of a descriptor bean.


Field Summary
static AnnotationDefinition ABSTRACT
          Indicates that the annotated interface does not define a concrete bean and will always be extended by some other interface.
static AnnotationDefinition ALLOW_DIFF_WITH_SIBLING_CLASS
           
static AnnotationDefinition BASE_INTERFACE
          Indicates that the annotated interface represents a base interface.
static AnnotationDefinition BEAN
          Indicates that the annotated interface defines a descriptor bean.
static AnnotationDefinition CUSTOMIZER
          Specifies a class that customizes the implementation of the annotated interface.
static AnnotationDefinition CUSTOMIZER_FACTORY
          Specifies a class that implements CustomizerFactory interface and use this class to create cusomizter classes' instance.
static AnnotationDefinition DELEGATE_BEAN
          Specifies delegate MBean for bean type.
static AnnotationDefinition INHERIT_SUPER_CUSTOMIZER
          Specifies whether bean implementation implements the methods implemented by the customizer of super bean.
static AnnotationDefinition REFERENCEABLE
          Indicates that instances of the annotated bean can be referred to by other beans.
static AnnotationDefinition ROOT
          Indicates that the annotated interface is the root of the descriptor and specifies the name of the root element.
static AnnotationDefinition SCHEMA_LOCATION
          Explicitly specifies schemaLocation for bean type to take care of scenarios where beans' xml types share the same namespace but have different schema locations.
static AnnotationDefinition TARGET_NAMESPACE
          Specifies target Namespace for bean type individually, rather than specifying it for a group using Beangen parameter.
static AnnotationDefinition VALIDATOR
          Specifies a custom method to be called as part of on-demand validation for the annotated bean.
static AnnotationDefinition XML_TYPE_NAME
          Explictly specifies the xml type name to be used in the schema definition for the annotated bean.
 
Fields inherited from class weblogic.descriptor.annotation.GlobalAnnotations
CONFIGURABLE, DYNAMIC, EXCLUDE, OBSOLETE, ROLE_ALLOWED, ROLE_PERMIT_ALL
 
Constructor Summary
BeanAnnotations()
           
 
Method Summary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BEAN

public static final AnnotationDefinition BEAN
Indicates that the annotated interface defines a descriptor bean. This annotation is not required if the bean interface name ends with "Bean".

Usage: @bean

Usage: @wld:bean


ABSTRACT

public static final AnnotationDefinition ABSTRACT
Indicates that the annotated interface does not define a concrete bean and will always be extended by some other interface. The practical result of this annotation is that the bean generator will allow this bean to define operations without defining corresponding custom methods in a customizer.

Usage: @abstract

Usage: @wld:bean abstract = booleanValue


CUSTOMIZER_FACTORY

public static final AnnotationDefinition CUSTOMIZER_FACTORY
Specifies a class that implements CustomizerFactory interface and use this class to create cusomizter classes' instance. This class should provide a public and non-argument constructor.

Usage: @customizerFactory customizerClassName

Usage: @wld:bean customizerFactory = customizerClassName


CUSTOMIZER

public static final AnnotationDefinition CUSTOMIZER
Specifies a class that customizes the implementation of the annotated interface. This customizer may implement operations, augment the implementation of property methods and implement bean lifecyle events. See ExampleCustomizedBean for an example of a customized bean and ExampleCustomizedBeanCustomizer for an example of a customizer class.

Usage: @customizer customizerClassName

Usage: @wld:bean customizer = customizerClassName


ALLOW_DIFF_WITH_SIBLING_CLASS

public static final AnnotationDefinition ALLOW_DIFF_WITH_SIBLING_CLASS

VALIDATOR

public static final AnnotationDefinition VALIDATOR
Specifies a custom method to be called as part of on-demand validation for the annotated bean. The method must be static and accessible to the generated bean class. It must have the following form:

public static void methodName(BeanType bean) throws IllegalArgumentException;

See ExampleValidationBean for an example use of this annotation and ExampleCustomValidator.validateExampleValidationBean(weblogic.descriptor.example.ExampleValidationBean) for an example of a validator method.

Usage: @validator validatorMethod

Usage: @wld:bean validator = validatorMethod


ROOT

public static final AnnotationDefinition ROOT
Indicates that the annotated interface is the root of the descriptor and specifies the name of the root element. Note that there can only be one bean in a descriptor that has this annotation.

Usage: @root rootElementName

Usage: @wld:bean root = rootElementName


BASE_INTERFACE

public static final AnnotationDefinition BASE_INTERFACE
Indicates that the annotated interface represents a base interface. Any interfaces that it extends are not considered part of the bean defintion.

Usage: @baseInterface

Usage: @wld:bean baseInterface = booleanValue


REFERENCEABLE

public static final AnnotationDefinition REFERENCEABLE
Indicates that instances of the annotated bean can be referred to by other beans. This annotation is required for any bean that can be used as a value for a reference property.

Usage: @referenceable

Usage: @wld:bean referenceable = booleanValue


XML_TYPE_NAME

public static final AnnotationDefinition XML_TYPE_NAME
Explictly specifies the xml type name to be used in the schema definition for the annotated bean. By default the type name will be derived by:
  1. Removing the trailing Bean (or MBean) Inserting a '-' before each capital letter that is preceeded by a lowercase letter
  2. Converting all capital letters to lowercase
  3. Appending "Type" to the name.
For example, FooBarBean becomes foo-barType

Usage: @xmlTypeName String

Usage: @wld:bean xmlTypeName = String


SCHEMA_LOCATION

public static final AnnotationDefinition SCHEMA_LOCATION
Explicitly specifies schemaLocation for bean type to take care of scenarios where beans' xml types share the same namespace but have different schema locations. Schema location declared on Beangen command line will override this annotation

Usage: @schemaLocation String

Usage: @wld:bean schemaLocation = String


TARGET_NAMESPACE

public static final AnnotationDefinition TARGET_NAMESPACE
Specifies target Namespace for bean type individually, rather than specifying it for a group using Beangen parameter. Target namespace declared on Beangen command line will override this annotation

Usage: @targetNamespace String

Usage: @wld:bean targetNamespace = String


DELEGATE_BEAN

public static final AnnotationDefinition DELEGATE_BEAN
Specifies delegate MBean for bean type. All properties that are not set will be delegated to that MBean.

Usage: @delegate String

Usage: @wld:bean delegate = String


INHERIT_SUPER_CUSTOMIZER

public static final AnnotationDefinition INHERIT_SUPER_CUSTOMIZER
Specifies whether bean implementation implements the methods implemented by the customizer of super bean. If this annotation is specified, bean impl just inherits the implementations from super bean's implementation instead of re-implement them.

Usage: @inheritSuperCustomizer String

Constructor Detail

BeanAnnotations

public BeanAnnotations()

Copyright 1996, 2013, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.

Oracle Fusion Middleware
Java API Reference for Oracle WebLogic Server
12c (12.1.2)

Part Number E27170-02