Documentation

(jvx:server:lco)

Accessible and NotAccessible

This is an old revision of the document!


The @Accessible and @NotAccessible annotations are described in 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.

This environment control is built-in into JVx REST handling.

How to use the environment control?

@NotAccessible(environment = ILauncher.ENVIRONMENT_REST)
public String getCustomerName()
{
    return "John Doe";
}

It's also possible to use:

@NotAccessible(environment = NotAccessible.ENVIRONMENT_ALL)
public String getCustomerName()
{
    return "John Doe";
}

or

@NotAccessible(environment = ILauncher.ENVIRONMENT_DESKTOP + "," + ILauncher.ENVIRONMENT_REST)
public String getCustomerName()
{
    return "John Doe";
}

or (repeatable Annotations, since Java8)

@NotAccessible(environment = ILauncher.ENVIRONMENT_DESKTOP}
@NotAccessible(environment = ILauncher.ENVIRONMENT_REST}
public String getCustomerName()
{
    return "John Doe";
}
This website uses cookies for visitor traffic analysis. By using the website, you agree with storing the cookies on your computer.More information