public @interface Multitenant
@Multitenant will be enhanced to be mutlitenant capable in eXo container.@Multitenant(false), it can be useful if
the method already supports multitenancy (natively or not requires to be such) but other methods
should be still enhanced.@Multitenant(explicitly=true) on a class and then annotate target methods with @Multitenant.getInfo().
@Multitenant
public class AcmeComponent {
// This method, and optionally its return value, will be enhanced.
public AcmeData getData() {
return new AcmeData();
}
// This method will not be enhanced.
@Multitenant(false)
public InfoData getInfo() {
return new InfoData();
}
}
Example 2: enhance only explicitly selected methods.
@Multitenant(explicitly=true)
public class AcmeComponent {
// This method, and optionally its return value, will be enhanced.
@Multitenant
public AcmeData getData() {
return new AcmeData();
}
// This method will not be enhanced.
public InfoData getInfo() {
return new InfoData();
}
}
| Modifier and Type | Optional Element and Description |
|---|---|
boolean |
explicitly
If will be set in an annotation of a class, then it will mean to enhance only explicitly
annotated methods of the class.
|
boolean |
value
Value
true means 'make it multitenant', false means 'skip it and don't do anything'. |
public abstract boolean value
true means 'make it multitenant', false means 'skip it and don't do anything'.true by default and means enhance a type to make it multitenant capable,
false means to skip enhancement.public abstract boolean explicitly
true if special treating should be performed on a type to make it
multitenant capable, false by default and it means enhance all methods.Copyright © 2014 eXo Platform SAS. All Rights Reserved.