net.sf.ginp.config
Class Configuration

java.lang.Object
  extended by net.sf.ginp.config.Configuration

public class Configuration
extends java.lang.Object

Represents a parsed ginp.xml configuration

Author:
Justin Sher

Field Summary
static java.lang.String PATH_TO_CONFIG_FROM_WEBROOT
           
 
Constructor Summary
Configuration()
          Constructor
 
Method Summary
static java.lang.Boolean accessCheck(java.lang.String userName, java.lang.String userPass)
          Validate a user
static boolean configOK()
           
static java.lang.String getCharacterEncoding()
           
static java.util.List getCollectionForUser(java.lang.String user)
          Gets the configurations available to a particular user
static java.lang.String getCollectionPageName()
          This is the name of the page where the selected set of pictures are are to be displayed, as a collection of pictures.
static java.lang.String getConfigfilelocation()
          Returns the value of configfilelocation (path and filename)
static java.lang.String getConfigfilelocationPath()
          Returns the file system path of configfilelocation.
static int getFilmStripThumbSize()
          Get the maximum dimension of the film strip navigator thumbnail images.
static java.lang.String getForcelocale()
           
static java.lang.String getPicturePageName()
          This is the name of the page where the individial picture is to be displayed.
static int getThumbSize()
          Get the maximum dimension of thumbnail images.
static void setAdminpassword(java.lang.String newAdminpassword)
           
static void setCharacterEncoding(java.lang.String newCharacterEncoding)
          Sets the value of "UTF-8".
static void setCollectionPageName(java.lang.String newCollectionPageName)
          Sets the value of collectionPageName.
static void setConfigfilelocation(javax.servlet.http.HttpServletRequest req)
          Sets the value of configfilelocation.
static void setConfigfilelocation(java.lang.String newConfigFile)
          Sets the value of configfilelocation.
static void setFilmStripThumbSize(java.lang.String newFilmStripThumbSize)
          Sets the value of filmStripThumbSize.
static void setForcelocale(java.lang.String newForcelocale)
          Sets the value of forcelocale.
static void setPicturePageName(java.lang.String newPicturePageName)
          Sets the value of picturePageName.
static void setThumbSize(java.lang.String newThumbSize)
          Sets the value of thumbSize.
static boolean useDataBase()
           
static void writeConfig()
          Saves current settings to Disk.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PATH_TO_CONFIG_FROM_WEBROOT

public static final java.lang.String PATH_TO_CONFIG_FROM_WEBROOT
See Also:
Constant Field Values
Constructor Detail

Configuration

public Configuration()
Constructor

Method Detail

getCollectionForUser

public static java.util.List getCollectionForUser(java.lang.String user)
Gets the configurations available to a particular user

Parameters:
user - the name of the user
Returns:
the collections available

useDataBase

public static boolean useDataBase()

accessCheck

public static java.lang.Boolean accessCheck(java.lang.String userName,
                                            java.lang.String userPass)
Validate a user

Parameters:
userName - username
userPass - password
Returns:
if the user is valid or not

getForcelocale

public static java.lang.String getForcelocale()

getThumbSize

public static int getThumbSize()
Get the maximum dimension of thumbnail images.

Returns:
The maximum thumbnail dimension in pixels.

getFilmStripThumbSize

public static int getFilmStripThumbSize()
Get the maximum dimension of the film strip navigator thumbnail images.

Returns:
The maximum film strip navigator thumbnail dimension in pixels.

getPicturePageName

public static java.lang.String getPicturePageName()
This is the name of the page where the individial picture is to be displayed.

Returns:
The name of the page where the picture will be shown.

getCollectionPageName

public static java.lang.String getCollectionPageName()
This is the name of the page where the selected set of pictures are are to be displayed, as a collection of pictures.

Returns:
The name of the page where the folder contents will be shown.

getCharacterEncoding

public static java.lang.String getCharacterEncoding()

configOK

public static boolean configOK()

getConfigfilelocation

public static java.lang.String getConfigfilelocation()
Returns the value of configfilelocation (path and filename)


getConfigfilelocationPath

public static java.lang.String getConfigfilelocationPath()
Returns the file system path of configfilelocation.


setConfigfilelocation

public static void setConfigfilelocation(javax.servlet.http.HttpServletRequest req)
Sets the value of configfilelocation.

Parameters:
configfilelocation - The value to assign configfilelocation.

setConfigfilelocation

public static void setConfigfilelocation(java.lang.String newConfigFile)
Sets the value of configfilelocation.

Parameters:
configfilelocation - The value to assign configfilelocation.

setThumbSize

public static void setThumbSize(java.lang.String newThumbSize)
Sets the value of thumbSize.

Parameters:
thumbSize - The value to assign thumbSize.

setFilmStripThumbSize

public static void setFilmStripThumbSize(java.lang.String newFilmStripThumbSize)
Sets the value of filmStripThumbSize.

Parameters:
filmStripThumbSize - The value to assign filmStripThumbSize.

setPicturePageName

public static void setPicturePageName(java.lang.String newPicturePageName)
Sets the value of picturePageName.

Parameters:
picturePageName - The value to assign picturePageName.

setCollectionPageName

public static void setCollectionPageName(java.lang.String newCollectionPageName)
Sets the value of collectionPageName.

Parameters:
collectionPageName - The value to assign collectionPageName.

setForcelocale

public static void setForcelocale(java.lang.String newForcelocale)
Sets the value of forcelocale.

Parameters:
forcelocale - The value to assign forcelocale.

setCharacterEncoding

public static void setCharacterEncoding(java.lang.String newCharacterEncoding)
Sets the value of "UTF-8".

Parameters:
"UTF-8" - The value to assign "UTF-8".

setAdminpassword

public static void setAdminpassword(java.lang.String newAdminpassword)

writeConfig

public static void writeConfig()
Saves current settings to Disk.



Copyright © 2004-2007 null. All Rights Reserved.