Documentation

Trace: REST API Filter

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
jvx:server:lco:accessible_notaccessible [2019/07/04 12:27]
admin
jvx:server:lco:accessible_notaccessible [2020/06/26 12:47] (current)
cduncan
Line 2: Line 2:
 ~~Title: Accessible and NotAccessible~~ ~~Title: Accessible and NotAccessible~~
  
-The **@Accessible** and **@NotAccessible** annotations are described in [[jvx:​server:​lco:​actions_in_objects|this article]]. But sometimes ​it's not enough to allow or deny the general access to a method or storage. Sometimes you want to configure the access for a specific environment,​ e.g. it shouldn'​t be possible to use an action in REST environment but it should be possible to use the same method in all other environments.+The **@Accessible** and **@NotAccessible** annotations are described in [[jvx:​server:​lco:​actions_in_objects|this article]]. But in some cases it's not enough to allow or deny the general access to a method or storage. Sometimesyou want to configure the access for a specific environment,​ e.g.it shouldn'​t be possible to use an action in REST environmentbut it should be possible to use the same method in all other environments.
  
 This environment control is built-in into JVx REST handling. This environment control is built-in into JVx REST handling.
Line 29: Line 29:
  
 <file java> <file java>
-@NotAccessible(environment = ILauncher.ENVIRONMENT_DESKTOP +","​ + ILauncher.ENVIRONMENT_REST)+@NotAccessible(environment = ILauncher.ENVIRONMENT_DESKTOP + ","​ + ILauncher.ENVIRONMENT_REST)
 public String getCustomerName() public String getCustomerName()
 { {
Line 36: Line 36:
 </​file>​ </​file>​
  
 +or (repeatable Annotations,​ since Java8)
 +
 +<file java>
 +@NotAccessible(environment = ILauncher.ENVIRONMENT_DESKTOP}
 +@NotAccessible(environment = ILauncher.ENVIRONMENT_REST}
 +public String getCustomerName()
 +{
 +    return "John Doe";
 +}
 +</​file>​
This website uses cookies for visitor traffic analysis. By using the website, you agree with storing the cookies on your computer.More information