Nuxeo Enterprise Platform 5.4

org.nuxeo.ecm.gwt.runtime.client
Annotation Type Extension


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

Author:
Bogdan Stefanescu

Required Element Summary
 java.lang.String[] targets
          A list of target extension points.
 
Optional Element Summary
 int hint
          The way extension is contributed.
 

Element Detail

targets

public abstract java.lang.String[] targets
A list of target extension points.

hint

public abstract int hint
The way extension is contributed. This is a hint to the extension point. Some extension points may simply ignore this.

Remember that hints are dependent on extension point capabilities. So before using them you must read the target extension point documentation. Also, implementors MUST use a coherent hint system. It is recommended to follow the system described below.

There are two type of extension points:

  1. Containers - that manage a set of contributions. This type of containers may be ordered so having an index to control the order when inserting contributions may be important. So in this case the hint can be used to either specify an index >=0, either specify the APPEND value (which usually have the same meaning as DEFAULT)
  2. Providers - that manage only one contribution This type of containers have no ordering but may wants to know if the contribution must replace the existing one or if it should be merged against the existing one. For this type of extension points we provide 3 hints:
    • APPEND - merge with existing contribution if any
    • REPLACE - replace existing contribution if any
    • AS_DEFAULT - deploy it only if no previous contribution was deployed
Note that we define a DEFAULT value that can be used to specify the DEFAULT registration hint defined by the target container. The DEFAULT is usually an APPEND or a REPLACE.

Also, note that when using indexes >= 0 to control the order the indexes may have any value. They are not representing the real index in the target container but a sort of 'weight' to be used to control ordering.

Default:
-1

Nuxeo Enterprise Platform 5.4

Copyright © 2010 Nuxeo SAS. All Rights Reserved.