7.0 Action Request System Java API

com.remedy.arsys.api
Class Menu

java.lang.Object
  extended bycom.remedy.arsys.api.ObjectBase
      extended bycom.remedy.arsys.api.Menu
All Implemented Interfaces:
java.lang.Cloneable, IARPersistentObject

public class Menu
extends ObjectBase
implements IARPersistentObject, java.lang.Cloneable

The Menu class and methods are used to represent the properties of menu objects.


Field Summary
 
Fields inherited from class com.remedy.arsys.api.ObjectBase
m_changeFlags, m_permissionList
 
Method Summary
 void activate()
          AR System reserved method.
 void clear()
          Clears all of the references to member objects.
 java.lang.Object clone()
          Clone implementation that returns an Object with data cloned from self.
 void create()
          Creates this object on the AR System server.
 boolean equals(java.lang.Object anObject)
          Use this method for checking equality.
 CharMenuInfo expandMenu()
          Expands the query and file references for the specified menu definition and returns a character menu with list-type items only.
static CharMenuInfo expandMenu(ARServerUser context, CharMenuInfo menu)
          Expands the query and file references for the specified menu definition and returns a character menu with list-type items only.
 ARServerUser getContext()
           
 MenuKey getKey()
          Returns the unique identifier for menu.
 CharMenuInfo getMenuDefinition()
          Returns the definition of the menu.
 PropInfo[] getProperties()
          Returns all property information of menu.
 int getRefreshCode()
          Returns when the menu is refreshed.
 int hashCode()
          Returns the hash code value for this instance of the current class.
 void load()
          Populates this object with information from the AR System server.
 void load(MenuCriteria criteria)
          Populates this object with information specified by MenuCriteria from the AR System server.
 void passivate()
          AR System reserved method.
 void remove()
          Removes this object on the AR System server.
 void setContext(ARServerUser ctxt)
          Associates ARServerUser information with this AR System server object.
 void setDeleteOption(int option)
          Sets the delete option indicating the action to take if specified in the menu.
 void setKey(MenuKey key)
          Sets the unique identifier for menu.
 void setMenuDefinition(CharMenuInfo menu)
          Sets the definition of the menu.
 void setProperties(PropInfo[] props)
          Sets property information of menu.
 void setRefreshCode(int refreshCode)
          Sets when the menu is refreshed.
 void store()
          Updates this menu on the database.
 void unsetContext()
          Removes the association to a specific user context.
 
Methods inherited from class com.remedy.arsys.api.ObjectBase
getDiary, getHelpText, getLastChangedBy, getLastUpdateTime, getName, getNewName, getOwner, getPermissions, resetChangeFlags, setDiary, setHelpText, setLastChangedBy, setName, setNewName, setOwner, setPermissions
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

setRefreshCode

public void setRefreshCode(int refreshCode)
Sets when the menu is refreshed. Use one of the following values to indicate when the menu is refreshed. This parameter enables you to balance menu consistency with performance.


getRefreshCode

public int getRefreshCode()
Returns when the menu is refreshed.


setMenuDefinition

public void setMenuDefinition(CharMenuInfo menu)
Sets the definition of the menu.


getMenuDefinition

public CharMenuInfo getMenuDefinition()
Returns the definition of the menu.


getProperties

public PropInfo[] getProperties()
Returns all property information of menu.


setProperties

public void setProperties(PropInfo[] props)
Sets property information of menu.


getKey

public MenuKey getKey()
Returns the unique identifier for menu.


setKey

public void setKey(MenuKey key)
Sets the unique identifier for menu.


setDeleteOption

public void setDeleteOption(int option)
Sets the delete option indicating the action to take if specified in the menu.

Parameters:
option - Possible values are:

  • 0: Do not delete the menu.
  • 1: Delete the entire block to which the menu belongs.

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Clone implementation that returns an Object with data cloned from self.

Overrides:
clone in class ObjectBase
Throws:
java.lang.CloneNotSupportedException

expandMenu

public CharMenuInfo expandMenu()
                        throws ARException
Expands the query and file references for the specified menu definition and returns a character menu with list-type items only.

Throws:
java.lang.NullPointerException - if invalid ARServerUser object
ARException - if menu is not expanded

expandMenu

public static CharMenuInfo expandMenu(ARServerUser context,
                                      CharMenuInfo menu)
                               throws ARException
Expands the query and file references for the specified menu definition and returns a character menu with list-type items only. Takes an ARServerUser object as an input.

Throws:
java.lang.NullPointerException - if invalid ARServerUser object
ARException - if menu is not expanded

create

public void create()
            throws ARException
Creates this object on the AR System server.

Specified by:
create in interface IARPersistentObject
Throws:
java.lang.NullPointerException - if invalid ARServerUser object
ARException - if object is not created

remove

public void remove()
            throws ARException
Removes this object on the AR System server.

Specified by:
remove in interface IARPersistentObject
Throws:
java.lang.NullPointerException - if invalid ARServerUser object
ARException - if object is not removed

load

public void load()
          throws ARException
Populates this object with information from the AR System server.

Specified by:
load in interface IARPersistentObject
Throws:
java.lang.NullPointerException - if invalid ARServerUser object
ARException - if object is not loaded

load

public void load(MenuCriteria criteria)
          throws ARException
Populates this object with information specified by MenuCriteria from the AR System server.

Throws:
java.lang.NullPointerException - if invalid ARServerUser object
ARException - if object is not loaded

store

public void store()
           throws ARException
Updates this menu on the database.

Specified by:
store in interface IARPersistentObject
Throws:
java.lang.NullPointerException - if invalid ARServerUser object
ARException - if object is not saved

activate

public void activate()
AR System reserved method.

Specified by:
activate in interface IARPersistentObject

passivate

public void passivate()
AR System reserved method.

Specified by:
passivate in interface IARPersistentObject

getContext

public ARServerUser getContext()

setContext

public void setContext(ARServerUser ctxt)
Associates ARServerUser information with this AR System server object.

Specified by:
setContext in interface IARPersistentObject

unsetContext

public void unsetContext()
Removes the association to a specific user context.

Specified by:
unsetContext in interface IARPersistentObject

clear

public void clear()
Clears all of the references to member objects.

Specified by:
clear in interface IARPersistentObject
Overrides:
clear in class ObjectBase

equals

public boolean equals(java.lang.Object anObject)
Use this method for checking equality. The result is true only if the argument is not null, is of same type and represents the same content.

Overrides:
equals in class ObjectBase

hashCode

public int hashCode()
Returns the hash code value for this instance of the current class. This method is supported as required by the general contract of Object.hashCode, for the benefit of hash tables such as those provided by java.util.Hashtable.

Overrides:
hashCode in class ObjectBase

7.0 Action Request System Java API