public class SystemItems
extends java.lang.Object
SystemData
items to the numerical internal
id in the current installation. This information is initialised
at startup and is then kept in memory.Modifier and Type | Field and Description |
---|---|
private static boolean |
isInitialised |
private static int[] |
roleKeys
An array to hold mappings for
RoleKeyData :
RoleKeyData.itemType --> RoleKeyData.id |
private static java.util.Map<java.lang.String,java.lang.Integer> |
systemIds
A map from system id --> numeric id
|
Constructor and Description |
---|
SystemItems() |
Modifier and Type | Method and Description |
---|---|
(package private) static void |
add(SystemData item)
Register a system item.
|
(package private) static void |
addRoleKey(RoleKeyData roleKey)
Register a role key.
|
static int |
getId(java.lang.String systemId)
Get the numeric id for an item when you know the system id.
|
static int |
getRoleKeyId(Item itemType)
|
(package private) static void |
init()
Initialize the class and load all mappings for item.systemId --> item.id
and for RoleKeyData.itemType --> RoleKeyData.id
|
(package private) static void |
unload()
Unload all settings.
|
private static boolean isInitialised
private static java.util.Map<java.lang.String,java.lang.Integer> systemIds
private static int[] roleKeys
RoleKeyData
:
RoleKeyData.itemType --> RoleKeyData.idstatic void init() throws BaseException
BaseException
- If there is an errorstatic void unload()
static void add(SystemData item)
Install
class while
creating new items.public static int getId(java.lang.String systemId)
systemId
- The system id stringstatic void addRoleKey(RoleKeyData roleKey)
Install
class while
creating new items.