Constructor Summary

Method Summary

Get if a user must see this menu option
Access is an externaly set flag to signal whether or not a user can see this menu option,
access is not set at the XML configuration file, but usually set by calling hasAccess()

hasAccess

Get whether or not a user with the given application mask and roles can
access this menu option. Application Masks are 32 bit integers with one
bit flags per application.

Standard application masks

Application

Bit Position

Int Mask

Bug Tracker

10

1024

Duty Manager

11

1024

Project Manager

12

4096

Mailwire

13

8192

Web Builder

14

16384

Virtual Disk

15

32768

Sales

16

65536

Collaborative Tools

17

131072

Marketing Tools

18

262144

Directory

19

524288

Shop

20

1048576

Hipermail

21

2097152

Training

22

4194304

Surveys

23

8388608

Configuration

30

1073741824

Parameters:

iAppMask - int Application mask

bAdmin - boolean true if user has administrator role

bOwner - boolean true if user is owner of his WorkArea

Returns:

boolean true if user is administrator or owner and mask is
"admin" or "owner" respectively. Or true if getBitMask() bitwise-and iAppMask
is not zero (getBitMask()&iAppMask!=0).

getTitle

public java.lang.String getTitle()

Get menu option title

Returns:

String <title> tag value or empty string if title is not set

getHRef

public java.lang.String getHRef()

Get menu option href

Returns:

String <href> tag value or empty string if href is not set

getForbid

public java.lang.String getForbid()

Get menu option alternative href used when a user has not enought permissions
to access standard href. Whether to use href or forbid must be determined by
the caller program at runtime.

Returns:

String <forbid> tag value or empty string if forbid is not set

getAccess

public boolean getAccess()

Get if a user must see this menu option

Access is an externaly set flag to signal whether or not a user can see this menu option,
access is not set at the XML configuration file, but usually set by calling hasAccess()

Returns:

boolean

Since:

4.0

setAccess

public void setAccess(boolean bHasAcess)

Set if a user must see this menu option

Parameters:

boolean -

Since:

4.0

getSelected

public boolean getSelected()

setSelected

public void setSelected(boolean bIsSelected)

selectSubOption

public void selectSubOption(int nSubOption)

toXML

public java.lang.String toXML()

Get XML for menu option

The returned XML is like <option name="hipermail" access="false" selected="false"><mask/><title><![CDATA[e-mail]]></title><href>../hipermail/mail_top_f.htm?selected=1&subselected=0</href><forbid><![CDATA[javascript:alert('e-mail is disabled, please edit hipergate.cnf for activating it')]]></forbid><suboptions/></option>