actions.xml File

Definition

File that contains the collection of permissions in actions to use for your application.

Structure

Actions are specified in the actions.xml file using XML tag descriptors. See the table below for a list of the most frequently used tags and their parameters.

Action Tag Descriptors

Tag

Tag Description

Parameters

Parameter Description

BUSINESSSERVICE

Root element that describes the application in the rest of the tags.

NAME

Name of the application.

It must be unique on the J2EE Engine.

DESCRIPTION

Provides a short description for the application or for actions.

LOCALE

Land and language for the short description.

NAME

Short description for the application or action.

ACTION

Describes the individual actions.

NAME

Name of the action.

PERMISSION

Describes each permission.

CLASS

Specifies the permission class that is used for the permission.

NAME

String used to use for the permission’s first parameter, for example, Economy.

VALUE

Used by Action and Value permissions. Contains the string value to use for the permission’s second parameter, for example, create.

An action may contain multiple permission tags.

Example

The following example shows how to use the most frequently used tag descriptors.

<BUSINESSSERVICE NAME="MyApplication">
  <DESCRIPTION LOCALE=
"en" VALUE="My Application" /> 
 <!--  Detailed Business Service Actions  --> 
 <ACTION NAME=
"ViewReservation">
  <DESCRIPTION LOCALE=
"en" VALUE="Permission for viewing reservations" /> 
  <PERMISSION CLASS=
"com.sap.engine.examples.permissions.PermissionClass" 
      NAME=
"Reservation" VALUE="view" /> 
  </ACTION>

  <ACTION NAME= 
"CreateReservation" >
   <DESCRIPTION LOCALE= 
"en" VALUE= "Permission for creating reservations" />
   <PERMISSION CLASS=
"com.sap.engine.examples.permissions.PermissionClass" 
       NAME=
"Reservation" VALUE="create" /> 

  </ACTION>

  <ACTION NAME= 
"CancelReservation" >
   <DESCRIPTION LOCALE= 
"en" VALUE= "Permission for canceling reservations" />
   <PERMISSION CLASS=
"com.sap.engine.examples.permissions.PermissionClass" 
       NAME=
"Reservation" VALUE="cancel" /> 

   </ACTION>

   <ACTION NAME= 
"AllPermissions" >
       <DESCRIPTION LOCALE= 
"en" VALUE= "Permission for all maintenance tasks" />
   <PERMISSION CLASS=
"com.sap.engine.examples.permissions.PermissionClass" 
       NAME=
"Reservation" VALUE="view" />   

   <PERMISSION CLASS="com.sap.engine.examples.permissions.PermissionClass" 
       NAME=
"Reservation" VALUE="create" />   

   <PERMISSION CLASS="com.sap.engine.examples.permissions.PermissionClass" 
       NAME=
"Reservation" VALUE="cancel" /> 
   </ACTION>
   
  </BUSINESSSERVICE>

You can also use wildcards for parameters that accept all values. See the example action below.

  <ACTION NAME= "AllPermissions" >
   <DESCRIPTION LOCALE= 
"en" VALUE= "Permission for creating reservations" />
   <PERMISSION CLASS=
"com.sap.engine.examples.permissions.PermissionClass" 
       NAME=
"Reservation" VALUE="*" /> 

  </ACTION>