powered by ASAP

Java command annotations are used for the developing Java commands in PAK. This chapter describes the functionality of the @App annotation. It also gives an example of how you can use this annotation in your implementation.

1. Basics

The @App annotation can be used to annotate a Java class. It enables to define properties an app must fulfill in order to be able to execute the command.

Ignoring/warning of commands annotated with @App shall be done by the applications themselves. They are responsible for protecting themselves from such invalid command actions.

2. Properties

The mandatory property values allows to define a list of String properties that are required to be able to execute the annotated command. This information must be processed and handled by the application developer.

3. Usage

Listing 1 demonstrates how the @App annotation has to be used in your command. This can be used as an example that a command only works if it is a desktop application, since otherwise the permission to edit may be missing.

Listing 1. Usage of the @App annotation
/**
 * @workflowDocu This command gets an element by its id or key.
 */
@JavaCommand
@App("Desktop") (1)
public class GetElement {

	[...]

}
1 Use of the @App annotation with value Desktop to define the need of a desktop application