Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.knowgate.hipergate
Class Menu

    java.lang.Object
      com.knowgate.hipergate.Menu

    public class Menu

extends java.lang.Object

hipergate top menu definition JiBX handler

This class needs to be processed with JiBX after being compiled. If you get the error org.jibx.runtime.JiBXException: Unable to access binding information for class com.knowgate.hipergate.Menu whilst trying to execute hipergate then execute from the command line: C:\JRE\bin\java -cp C:\JAR\bcel.jar;C:\JAR\jibx-1beta3.jar;C:\JAR\jibx-extras.jar;C:\JAR\xpp3.jar org.jibx.binding.Compile C:\knowgate\storage\xslt\schemas\menu-def-jixb.xml

Constructor Summary
`Menu()` Default constructor

Method Summary
`int` | `countAccesibleSubOptions()` Number of top level options that have access set to true
`int` | `countSubOptions()` Number of top level options
`boolean` | `getAccess(int nOption)`
`MenuOption` | `getOption(int nIndex)` Get option by index
`MenuOption` | `getOption(java.lang.String sName)` Get option by index Perform linear search on top level options
`boolean` | `getSelected(int nOption)`
`static Menu` | `parse(java.lang.String sXMLDocPath, java.lang.String sEnc)` Create a Menu object by parsing its definition from an XML file
`void` | `setAccessFor(int iAppMask, boolean bAdmin, boolean bOwner)` Determine access to evey menu option for an application mask Get whether or not a user with the given application mask and roles can access each menu option.
`java.lang.String` | `toXML()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Menu

    public Menu()

  Default constructor

Method Detail

### countSubOptions

    public int countSubOptions()

  Number of top level options

  Returns:
    int

### countAccesibleSubOptions

    public int countAccesibleSubOptions()

  Number of top level options that have access set to true

  Returns:
    int

### getOption

    public MenuOption getOption(int nIndex)
                         throws java.lang.ArrayIndexOutOfBoundsException

  Get option by index

  Parameters:
    `nIndex` - int Option Index
  Returns:
    MenuOption
  Throws:
    `java.lang.ArrayIndexOutOfBoundsException` - if n<0 or n>=countSubOptions()

### getOption

    public MenuOption getOption(java.lang.String sName)
                         throws java.lang.ArrayIndexOutOfBoundsException

  Get option by index

  Perform linear search on top level options

  Parameters:
    `sName` - String Option name
  Returns:
    MenuOption
  Throws:
    `java.lang.ArrayIndexOutOfBoundsException` - if no option with such name was found

### getAccess

    public boolean getAccess(int nOption)

### getSelected

    public boolean getSelected(int nOption)

### setAccessFor

    public void setAccessFor(int iAppMask,
                             boolean bAdmin,
                             boolean bOwner)

  Determine access to evey menu option for an application mask

  Get whether or not a user with the given application mask and roles can access each menu option. Application Masks are 32 bit integers with one bit flags per application. This method calls setAccess(hasAccess(iAppMask, bAdmin, bOwner)) for each menu option thus setting the access flag for all of them

  Parameters:
    `iAppMask` - int Application mask
    `bAdmin` - boolean true if user has administrator role
    `bOwner` - boolean true if user is owner of his WorkArea
  Since:
    4.0

### toXML

    public java.lang.String toXML()

### parse

    public static Menu parse(java.lang.String sXMLDocPath,
                             java.lang.String sEnc)
                      throws JiBXException,
                             java.io.FileNotFoundException,
                             java.io.UnsupportedEncodingException,
                             java.io.IOException

  Create a Menu object by parsing its definition from an XML file

  Parameters:
    `sXMLDocPath` - String Full path to menu XML definition file
    `sEnc` - String Character encoding, if null then UTF-8 is assumed.
  Returns:
    Menu object
  Throws:
    `JiBXException`
    `java.io.FileNotFoundException`
    `java.io.UnsupportedEncodingException`
    `java.io.IOException`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD