com.azalient.api.a.model
Interface ISettings

All Superinterfaces:
IPage

public interface ISettings
extends IPage

The Settings object holds model-specific settings, such as password and last-save version number. It is also a holder for information such as the path to the model file, and the names of the currently active pages within the model.


Field Summary
static String AZA
           
static String EXCEL
           
static String TMP
           
 
Fields inherited from interface com.azalient.api.a.tables.IPage
ZERO
 
Method Summary
 boolean checkPassword()
          Prompt the user to enter the password for this (locked) model.
 String currentPageName(PageType type)
          Return the active page name of the given type
 void currentPageName(PageType type, String newName)
          Store the name of the currently active page of teh given type
 File dataFile()
          The current data file
 File dataFileImport()
          The file from which the model was imported
 String dataName()
          The filename of the current model (not including its directory).
 String dataPath()
          The directory holding the current model file
 Object get(ISettingsKey key)
          Get value associated with given key, guaranteed non-null
 boolean getB(ISettingsKey key)
          Get boolean value associated with given key
 double getD(ISettingsKey key)
          Get double value associated with given key
 int getI(ISettingsKey key)
          Get int value associated with given key
 String getS(ISettingsKey key)
          Get String value associated with given key, guaranteed non-null
 UTime getT(ISettingsKey key)
          Get UTime value associated with given key, guaranteed non-null
 boolean importing()
          True during an import process
 String newPageName(PageType type)
          Create a new unique page name of the given type
 IStore<IPluginInfo> pluginInfo()
          Get a reference to the plugin information store
 RecordR record(PageType pageType, String pageName, String tableName, String recordName)
           
 File resourcesDir()
          The resources directory, base don the name of the current data file
 void set(ISettingsKey key, Object value)
          set value associated with key, use null to reset to default (non-null) value
 boolean setPassword()
          Prompt the user to set a password for this model.
 boolean viewLock()
           
 void viewLock(boolean b)
           
 
Methods inherited from interface com.azalient.api.a.tables.IPage
baseName, pageName, pageType
 

Field Detail

TMP

static final String TMP
See Also:
Constant Field Values

AZA

static final String AZA
See Also:
Constant Field Values

EXCEL

static final String EXCEL
See Also:
Constant Field Values
Method Detail

pluginInfo

IStore<IPluginInfo> pluginInfo()
Get a reference to the plugin information store


dataFile

File dataFile()
The current data file


resourcesDir

File resourcesDir()
The resources directory, base don the name of the current data file


dataFileImport

File dataFileImport()
The file from which the model was imported


importing

boolean importing()
True during an import process


dataPath

String dataPath()
The directory holding the current model file


dataName

String dataName()
The filename of the current model (not including its directory). @see dataFile()


newPageName

String newPageName(PageType type)
Create a new unique page name of the given type


currentPageName

String currentPageName(PageType type)
Return the active page name of the given type


currentPageName

void currentPageName(PageType type,
                     String newName)
Store the name of the currently active page of teh given type


get

Object get(ISettingsKey key)
Get value associated with given key, guaranteed non-null


getS

String getS(ISettingsKey key)
Get String value associated with given key, guaranteed non-null


getI

int getI(ISettingsKey key)
Get int value associated with given key


getD

double getD(ISettingsKey key)
Get double value associated with given key


getB

boolean getB(ISettingsKey key)
Get boolean value associated with given key


getT

UTime getT(ISettingsKey key)
Get UTime value associated with given key, guaranteed non-null


set

void set(ISettingsKey key,
         Object value)
set value associated with key, use null to reset to default (non-null) value


viewLock

boolean viewLock()

viewLock

void viewLock(boolean b)

setPassword

boolean setPassword()
Prompt the user to set a password for this model.

Returns:
true on successful new password, false otherwise

checkPassword

boolean checkPassword()
Prompt the user to enter the password for this (locked) model.

Returns:
true if password just types matches stored password

record

RecordR record(PageType pageType,
               String pageName,
               String tableName,
               String recordName)
Internal - Not recommended for use. Public as a side-effect of implementation method