net.sf.ginp
Class GinpModel

java.lang.Object
  extended by net.sf.ginp.GinpModel

public class GinpModel
extends java.lang.Object

Model class to represent 1 user session instance of the application. All state information is stored in this class.

Version:
$Revision: 303 $
Author:
Doug Culnane

Constructor Summary
GinpModel()
          Constructor for the GinpModel object requiring the absolute path of the configuration file.
 
Method Summary
 java.lang.Boolean accessCheck(java.lang.String validUserName, java.lang.String userPass)
          check valid username and password
 void doCommand(java.lang.String command, java.util.Vector params)
          Perform a command on the model.
 PicCollection getCollection()
          Gets the collection attribute of the GinpModel object
 PicCollection getCollection(int i)
          Gets the collection attribute of the GinpModel object
 PicCollection[] getCollections()
          Gets the collections attribute of the GinpModel object
 int getCurrCollectionId()
          Gets the collection attribute of the GinpModel object
 java.lang.String getCurrentPage()
          Gets the pageLoctaion attribute of the GinpModel object
 java.lang.String getDebugDump()
          Gets a String that is a Dump of Debug info about this models state.
 java.lang.String getDebugInfo()
          Gets a String that is a Dump of Debug info about this models state.
 java.util.Locale getLocale()
          Gets the prefered Locale for this GinpModel
 int getPageHeight()
          Gets the users last set page height in pixels.
 int getPageOffset()
          Gets the pageOffset attribute of the GinpModel object
 int getPagePosition()
          Gets the pagePosition attribute of the GinpModel object
 int getPageWidth()
          Gets the users last set page width in pixels.
 java.lang.String getUserName()
          Gets this model's user log on name.
 boolean setCurrectCollection(int id)
          Sets the currect PicCollection number of the GinpModel
 void setCurrentPage(java.lang.String url)
          Sets the current page attribute of the GinpModel object
 void setLocale(java.util.Locale loc)
          Sets the locale attribute of the GinpModel object
 void setPageHeight(int i)
          Sets the page height attribute of the Model.
 void setPageOffset(int i)
          Sets the pageOffset attribute of the GinpModel object
 void setPagePosition(int i)
          Sets the pagePosition attribute of the GinpModel object
 void setPageWidth(int i)
          Sets the page width attribute of the Model.
 void setUserName(java.lang.String user)
          Sets the user's log on name for the model.
 java.lang.String translate(java.lang.String lookupcode)
          Translate the supplied English text in to this Models prefured language.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GinpModel

public GinpModel()
Constructor for the GinpModel object requiring the absolute path of the configuration file.

Parameters:
config -
Method Detail

getPageOffset

public int getPageOffset()
Gets the pageOffset attribute of the GinpModel object

Returns:
The pageOffset value

setPageOffset

public void setPageOffset(int i)
Sets the pageOffset attribute of the GinpModel object

Parameters:
i - The new pageOffset value

getPagePosition

public int getPagePosition()
Gets the pagePosition attribute of the GinpModel object

Returns:
The pagePosition value

setPagePosition

public void setPagePosition(int i)
Sets the pagePosition attribute of the GinpModel object

Parameters:
i - The new pagePosition value

setCurrectCollection

public boolean setCurrectCollection(int id)
Sets the currect PicCollection number of the GinpModel

Parameters:
id - Integer id of the collection selected as current.
Returns:
True if comand done without error.

setCurrentPage

public void setCurrentPage(java.lang.String url)
Sets the current page attribute of the GinpModel object

Parameters:
url - The new current page url

setLocale

public void setLocale(java.util.Locale loc)
Sets the locale attribute of the GinpModel object

Parameters:
loc - The new locale value

setPageHeight

public void setPageHeight(int i)
Sets the page height attribute of the Model. This is used when presentation elements require the available size of the page in pixels.

Parameters:
i - The users current page height in pixels.

setPageWidth

public void setPageWidth(int i)
Sets the page width attribute of the Model. This is used when presentation elements require the available size of the page in pixels.

Parameters:
i - The users current page width in pixels.

setUserName

public void setUserName(java.lang.String user)
Sets the user's log on name for the model. This is used to parse the configuration file for the user's collections

Parameters:
user - The new userName value

getCollection

public PicCollection getCollection(int i)
Gets the collection attribute of the GinpModel object

Parameters:
i - Description of the Parameter
Returns:
The collection value

getCollection

public PicCollection getCollection()
Gets the collection attribute of the GinpModel object

Returns:
The collection value

getCollections

public PicCollection[] getCollections()
Gets the collections attribute of the GinpModel object

Returns:
The collections value

getCurrCollectionId

public int getCurrCollectionId()
Gets the collection attribute of the GinpModel object

Returns:
The collection value

getCurrentPage

public java.lang.String getCurrentPage()
Gets the pageLoctaion attribute of the GinpModel object

Returns:
The pageLoctaion value

getLocale

public java.util.Locale getLocale()
Gets the prefered Locale for this GinpModel

Returns:
The prefered Locale

getPageHeight

public int getPageHeight()
Gets the users last set page height in pixels.

Returns:
The page height value in pixels

getPageWidth

public int getPageWidth()
Gets the users last set page width in pixels.

Returns:
The page width value in pixels

getUserName

public java.lang.String getUserName()
Gets this model's user log on name.

Returns:
The model's user name

doCommand

public void doCommand(java.lang.String command,
                      java.util.Vector params)
Perform a command on the model.

Parameters:
command - The commands identifiying name.
params - The CommandParameters to be actioned

translate

public java.lang.String translate(java.lang.String lookupcode)
                           throws java.util.MissingResourceException
Translate the supplied English text in to this Models prefured language.

Parameters:
lookupcode - English Lookup Code Key.
Returns:
A translator of the text or null if not knowen.
Throws:
java.util.MissingResourceException - Description of the Exception

getDebugDump

public java.lang.String getDebugDump()
Gets a String that is a Dump of Debug info about this models state.

Returns:
The debugDump value

getDebugInfo

public java.lang.String getDebugInfo()
Gets a String that is a Dump of Debug info about this models state.

Returns:
The debugDump value

accessCheck

public java.lang.Boolean accessCheck(java.lang.String validUserName,
                                     java.lang.String userPass)
check valid username and password

Parameters:
validUserName - the username
userPass - the password
Returns:
whether they have access or not


Copyright © 2004-2007 null. All Rights Reserved.