Inherits from:
No subclasses
Overview
New Session object - passed around inside the data object to handle storage of ViewConfigs/ImageConfigs in the web_user_db How it is used... The session object is "lazily" attached to EnsEMBL::Web::Proxiable objects and is accessed via EnsEMBL::Web::Proxiable::get_session method. You usually won't need to do this explicitly - because it is done implicitly by methods such as: EnsEMBL::Web::Proxiable::get_imageconfig, EnsEMBL::Web::Proxiable::image_config_hash, EnsEMBL::Web::Proxiable::get_viewconfig, EnsEMBL::Web::Proxiable::attach_image_config all of which create either EnsEMBL::Web::ViewConfig or EnsEMBL::Web::ImageConfig objects. These commands in turn access the database if we already have a session (whose is accessible by session_id) and if the appropriate viewconfig is defined as storable. (In this way it replaces the ViewConfigAdaptor/ImageConfigAdaptor modules At the end of the configuration section of the webpage if any data needs to be saved to the session this is done so (and if required a session cookie set and stored in the users browser. (See EnsEMBL::Web::Document::WebPage to see where this is done (by the EnsEMBL::Web::Proxiable::fix_session method.$object->get_session->add_data()
$object->get_session->purge_data()
Constructor
- new (EnsEMBL::Web::Root)
Method
- BUILD
- _format_error (EnsEMBL::Web::Root)
- _temp_store
- colourmap
- create_session_id
- de_romanize (EnsEMBL::Web::Root)
- deepcopy
- dynamic_use (EnsEMBL::Web::Root)
- dynamic_use_failure (EnsEMBL::Web::Root)
- evaluate_bp (EnsEMBL::Web::Root)
- getImageConfig
- getViewConfig
- get_ImageConfig
- get_cached_data
- get_data
- input
- is_valid_module_name (EnsEMBL::Web::Root)
- make_directory (EnsEMBL::Web::Root)
- neat_sr_name (EnsEMBL::Web::Root)
- not_allowed (EnsEMBL::Web::Root)
- pretty_date (EnsEMBL::Web::Root)
- receive_shared_data
- reset_config
- round_bp (EnsEMBL::Web::Root)
- save_data
- seq_region_sort (EnsEMBL::Web::Root)
- storable_data
- store
- temp_file_create (EnsEMBL::Web::Root)
- temp_file_name (EnsEMBL::Web::Root)
- templatize (EnsEMBL::Web::Root)
- thousandify (EnsEMBL::Web::Root)
- ticket (EnsEMBL::Web::Root)
- url (EnsEMBL::Web::Root)
Unknown
- _get_unique_source_name
- _parse_referer (EnsEMBL::Web::Root)
- add_das
- add_das_from_string
- attachImageConfig
- configure_das_views
- exturl
- filters (EnsEMBL::Web::Root)
- get_all_das
- get_das_parser
- get_site
- get_view_config_as_string
- help_feedback (EnsEMBL::Web::Root)
- is_available (EnsEMBL::Web::Root)
- save_das
- set_data
- set_view_config_from_string
Methods
- BUILD
Most of the build functions is done automagically by Class::Std, two unusual ones are the path and Cookie object..
View source
_format_error
Format an error message by wrapping text to 120 columns
Inherited from EnsEMBL::Web::Root
View source
_temp_store
At any point can copy back value from image_config into the temporary storage space for the config!!
View source
add_data
$object->get_session->add_data().
View source
colourmap
Gets the colour map
View source
create_session_id
Gets session ID if the session ID doesn't exist a new one is grabbed and added to the users cookies
View source
de_romanize
Converts a number from roman (IV...) format to number...
Inherited from EnsEMBL::Web::Root
View source
deepcopy
Recursive deep copy of hashrefs/arrayrefs...
View source
dynamic_use
Equivalent of USE - but used at runtime
Inherited from EnsEMBL::Web::Root
View source
dynamic_use_failure
Return error message cached if use previously failed!
Inherited from EnsEMBL::Web::Root
View source
evaluate_bp
Reverse of round BP - takes a value with a K/M/G at the end and converts to integer value...
Inherited from EnsEMBL::Web::Root
View source
getImageConfig
If passed one parameter then it loads the data (and doesn't cache it) If passed two parameters it loads the data (and caches it against the second name - NOTE you must use the second name version IF you want the configuration to be saved by the session - otherwise it will be lostReturns an image Config object...
View source
getViewConfig
Create a new EnsEMBL::Web::ViewConfig object for the script passed Loops through core and all plugins looking for a EnsEMBL::*::ViewConfig::$script package and if it exists calls the function init() on the package to set (a) the default values, (b) whether or not the user can over-ride these settings loaded in the order: core first, followed each of the plugin directories (from bottom to top in the list in conf/Plugins.pm)
If a session exists and the code is storable connect to the database and retrieve the data from the session_data table
Then loop through the EnsEMBL::Web::Input object and set anything in this Keep a record of what the user has changed!!
View source
get_ImageConfig
Return a new image config object...
View source
get_cached_data
Retrieve the data from cache
View source
get_data
Retrieve the data use Data::Dumper; warn Dumper($Data_of{ ident $self });
View source
input
Wrapper accessor to keep code simple...
View source
is_valid_module_name
returns true if valid module name...
Inherited from EnsEMBL::Web::Root
View source
make_directory
Creates a writeable directory - making sure all parents exist!
Inherited from EnsEMBL::Web::Root
View source
neat_sr_name
Returns seq-region name formatted neatly...
Inherited from EnsEMBL::Web::Root
View source
new
Constructor. Constructs the class - as its a base class contains nothing.!
Inherited from EnsEMBL::Web::Root
View source
not_allowed
Loops through array of filters and returns the first one that fails
Inherited from EnsEMBL::Web::Root
View source
pretty_date
Converts a MySQL datetime field into something human-readable
Inherited from EnsEMBL::Web::Root
View source
purge_data
$object->get_session->purge_data().
View source
receive_shared_data
View source
reset_config
Reset the config given by $config name in the storage hash
View source
round_bp
Returns #bp formatted neatly as either m/k
Inherited from EnsEMBL::Web::Root
View source
save_data
Save all data back to the database
View source
seq_region_sort
Used to sort chromosomes into a sensible order!
Inherited from EnsEMBL::Web::Root
View source
storable_data
Returns an array ref of hashes suitable for dumping to a database record.
View source
store
Write session back to the database if required... Only work with storable configs and only if they or attached image configs have been altered!
Comment | not really, we also have das and tmp data which needs to be stored as well |
View source
temp_file_create
Creates a temporary file name and makes sure its parent directory exists
Inherited from EnsEMBL::Web::Root
View source
temp_file_name
Creates a random filename
Inherited from EnsEMBL::Web::Root
View source
templatize
Takes a string, and a template pattern and returns the string with "/" from the template inserted...
Inherited from EnsEMBL::Web::Root
View source
thousandify
Retuns comma separated version of number...
Inherited from EnsEMBL::Web::Root
View source
ticket
Returns a random ticket string
Inherited from EnsEMBL::Web::Root
View source
url
Assembles a valid URL, adding the site's base URL and CGI-escaping any parametersreturns a URL string
Inherited from EnsEMBL::Web::Root
View source