Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F92289297
websubmit_config.py
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Tue, Nov 19, 03:00
Size
6 KB
Mime Type
text/x-python
Expires
Thu, Nov 21, 03:00 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
22412533
Attached To
R3600 invenio-infoscience
websubmit_config.py
View Options
## This file is part of CDS Invenio.
## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 CERN.
##
## CDS Invenio is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
## published by the Free Software Foundation; either version 2 of the
## License, or (at your option) any later version.
##
## CDS Invenio is distributed in the hope that it will be useful, but
## WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
## General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with CDS Invenio; if not, write to the Free Software Foundation, Inc.,
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
"""CDS Invenio Submission Web Interface config file."""
__revision__
=
"$Id$"
## test:
test
=
"FALSE"
## CC all action confirmation mails to administrator? (0 == NO; 1 == YES)
CFG_WEBSUBMIT_COPY_MAILS_TO_ADMIN
=
0
class
InvenioWebSubmitFunctionError
(
Exception
):
"""This exception should only ever be raised by WebSubmit functions.
It will be caught and handled by the WebSubmit core itself.
It is used to signal to WebSubmit core that one of the functions
encountered a FATAL ERROR situation that should all further execution
of the submission.
The exception will carry an error message in its "value" string. This
message will probably be displayed on the user's browser in an Invenio
"error" box, and may be logged for the admin to examine.
Again: If this exception is raised by a WebSubmit function, an error
message will displayed and the submission ends in failure.
Extends: Exception.
"""
def
__init__
(
self
,
value
):
"""Set the internal "value" attribute to that of the passed "value"
parameter.
@param value: (string) - an error string to display to the user.
"""
Exception
.
__init__
(
self
)
self
.
value
=
value
def
__str__
(
self
):
"""Return oneself as a string (actually, return the contents of
self.value).
@return: (string)
"""
return
str
(
self
.
value
)
class
InvenioWebSubmitFunctionStop
(
Exception
):
"""This exception should only ever be raised by WebSubmit functions.
It will be caught and handled by the WebSubmit core itself.
It is used to signal to WebSubmit core that one of the functions
encountered a situation that should prevent the functions that follow
it from being executed, and that WebSubmit core should display some sort
of message to the user. This message will be stored in the "value"
attribute of the object.
***
NOTE: In the current WebSubmit, this "value" is ususally a JavaScript
string that redirects the user's browser back to the Web form
phase of the submission. The use of JavaScript, however is going
to be removed in the future, so the mechanism may change.
***
Extends: Exception.
"""
def
__init__
(
self
,
value
):
"""Set the internal "value" attribute to that of the passed "value"
parameter.
@param value: (string) - a string to display to the user.
"""
Exception
.
__init__
(
self
)
self
.
value
=
value
def
__str__
(
self
):
"""Return oneself as a string (actually, return the contents of
self.value).
@return: (string)
"""
return
str
(
self
.
value
)
class
InvenioWebSubmitFunctionWarning
(
Exception
):
"""This exception should be raised by a WebSubmit function
when unexpected behaviour is encountered during the execution
of the function. The unexpected behaviour should not have been
so serious that execution had to be halted, but since the
function was unable to perform its task, the event must be
logged.
Logging of the exception will be performed by WebSubmit.
Extends: Exception.
"""
def
__init__
(
self
,
value
):
"""Set the internal "value" attribute to that of the passed "value"
parameter.
@param value: (string) - a string to write to the log.
"""
Exception
.
__init__
(
self
)
self
.
value
=
value
def
__str__
(
self
):
"""Return oneself as a string (actually, return the contents of
self.value).
@return: (string)
"""
return
str
(
self
.
value
)
class
InvenioWebSubmitFileStamperError
(
Exception
):
"""This exception should be raised by websubmit_file_stamper when an
error is encoutered that prevents a file from being stamped.
When caught, this exception should be used to stop processing with a
failure signal.
Extends: Exception.
"""
def
__init__
(
self
,
value
):
"""Set the internal "value" attribute to that of the passed "value"
parameter.
@param value: (string) - a string to write to the log.
"""
Exception
.
__init__
(
self
)
self
.
value
=
value
def
__str__
(
self
):
"""Return oneself as a string (actually, return the contents of
self.value).
@return: (string)
"""
return
str
(
self
.
value
)
class
InvenioWebSubmitIconCreatorError
(
Exception
):
"""This exception should be raised by websubmit_icon_creator when an
error is encoutered that prevents an icon from being created.
When caught, this exception should be used to stop processing with a
failure signal.
Extends: Exception.
"""
def
__init__
(
self
,
value
):
"""Set the internal "value" attribute to that of the passed "value"
parameter.
@param value: (string) - a string to write to the log.
"""
Exception
.
__init__
(
self
)
self
.
value
=
value
def
__str__
(
self
):
"""Return oneself as a string (actually, return the contents of
self.value).
@return: (string)
"""
return
str
(
self
.
value
)
Event Timeline
Log In to Comment