[Erp5-report] r25680 - in /erp5/trunk/products/ERP5Wizard: ./ Tool/ transport/
nobody at svn.erp5.org
nobody at svn.erp5.org
Wed Feb 25 09:16:59 CET 2009
Author: ivan
Date: Wed Feb 25 09:16:55 2009
New Revision: 25680
URL: http://svn.erp5.org?rev=25680&view=rev
Log:
Moved to respective base packages.
Removed:
erp5/trunk/products/ERP5Wizard/LogMixIn.py
erp5/trunk/products/ERP5Wizard/WebServiceMixIn.py
erp5/trunk/products/ERP5Wizard/transport/
Modified:
erp5/trunk/products/ERP5Wizard/Tool/WizardTool.py
erp5/trunk/products/ERP5Wizard/__init__.py
Removed: erp5/trunk/products/ERP5Wizard/LogMixIn.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Wizard/LogMixIn.py?rev=25679&view=auto
==============================================================================
--- erp5/trunk/products/ERP5Wizard/LogMixIn.py [utf8] (original)
+++ erp5/trunk/products/ERP5Wizard/LogMixIn.py (removed)
@@ -1,143 +1,0 @@
-##############################################################################
-#
-# Copyright (c) 2006 Nexedi SARL and Contributors. All Rights Reserved.
-# Jean-Paul Smets-Solanes <jp at nexedi.com>
-# Ivan Tyagov <ivan at nexedi.com>
-#
-# WARNING: This program as such is intended to be used by professional
-# programmers who take the whole responsability of assessing all potential
-# consequences resulting from its eventual inadequacies and bugs
-# End users who are looking for a ready-to-use solution with commercial
-# garantees and support are strongly adviced to contract a Free Software
-# Service Company
-#
-# This program 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.
-#
-# This program 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 this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-##############################################################################
-
-from AccessControl import ClassSecurityInfo
-from Products.ERP5Type import Permissions
-
-class LogMixIn:
- """
- This mixin is to try to share all the code related
- to log file access, caching, log filtering and filtering
- optimisation.
-
- The model chosen here is simplistic:
- - one tool per service
- - account parameter is used to select the customer account
- - log_name parameter is used to select the log
- """
-
- security = ClassSecurityInfo()
-
- security.declareProtected('getLogFile', Permissions.ManagePortal)
- def getLogFile(self, file_name, account=None):
- """
- Returns the raw log file (as they are)
- """
- raise NotImplementedError # Must be overriden
-
- security.declareProtected('getLogFileNameList', Permissions.ManagePortal)
- def getLogFileNameList(self,
- log_name, account=None,
- domain=None, user_name=None,
- from_line=None, to_line=None,
- from_date=None, to_date=None, ):
- """
- Returns the list of file names for all log files. This
- is iseful if we use logrotate for example. It is also
- useful to provide some filtering parameters here
- (ex. to reduce the number of files to parse)
- """
- raise NotImplementedError # Must be overriden
-
- security.declareProtected('getLogNameList', Permissions.ManagePortal)
- def getLogNameList(self, account=None):
- """
- Returns the list of log names.
- """
- raise NotImplementedError # Must be overriden
-
- security.declareProtected('parseLogLine', Permissions.ManagePortal)
- def parseLogLine(self, log_name, log_line):
- """
- Parses the line and returns a dict
- """
- method = self.getTypeBasedMethod('parseLogLine')
- return method(log_name, log_line)
-
- security.declareProtected('isLineRestricted', Permissions.ManagePortal)
- def isLineRestricted(self,
- log_name, log_line,
- account=None, domain=None, user_name=None,
- from_line=None, to_line=None,
- from_date=None, to_date=None, ):
- """
- Returns True if the line
- """
- method = self.getTypeBasedMethod('isLineRestricted')
- return method(log_name, self.parseLogLine(log_name, log_line))
-
- security.declareProtected('getLogData', Permissions.ManagePortal)
- def getLogData(self,
- log_name, account=None,
- domain=None, user_name=None,
- from_line=None, to_line=None,
- from_date=None, to_date=None):
- """
- Returns the log file data as single chunk, by assembling
- various files in the appropriate order and by filtering them.
-
- - account: an ID which represents a customer
- - user: a user
- - from_line: retrieves logs from a given line
- - to_line: retrieves logs to a given line (excl. )
- - from_date: retrieves logs from a given date
- - to_date: retrieves logs to a given date (excl. )
- """
- # default implemetation is provided here
- # it just calls isLineRestricted and
- # (in the future) tries to do some clever caching
- raise NotImplementedError # Must be overriden
-
- security.declareProtected('getRestrictedLogData', Permissions.View)
- def getRestrictedLogData(self,
- log_name, account=None,
- domain=None, user_name=None,
- from_line=None, to_line=None,
- from_date=None, to_date=None, ):
- """
- Returns the log file data as single chunk. Adds security checks.
- """
- raise NotImplementedError # Must be overriden
-
- security.declareProtected('getLogFile', Permissions.ManagePortal)
- def getLogEventList(self,
- log_name='system', account=None,
- domain=None, user=None,
- from_line=None, to_line=None,
- from_date=None, to_date=None, ):
- """
- Returns the log information in a format which is similar
- to other Event like formats in ERP5 (ex. those which are used
- to represent lists of events such as in checkConsistency
- or elsewhere, ex. workflow history, message lists. Please take
- time to decide what is the best representation here)
-
- This means that the data is parsed.
- """
- raise NotImplementedError # Must be overriden
Modified: erp5/trunk/products/ERP5Wizard/Tool/WizardTool.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Wizard/Tool/WizardTool.py?rev=25680&r1=25679&r2=25680&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Wizard/Tool/WizardTool.py [utf8] (original)
+++ erp5/trunk/products/ERP5Wizard/Tool/WizardTool.py [utf8] Wed Feb 25 09:16:55 2009
@@ -47,7 +47,6 @@
from Products.PluggableAuthService.interfaces.plugins import IAuthenticationPlugin
from Products.ERP5Type.Cache import CachingMethod
from urlparse import urlparse
-from Products.ERP5Wizard.WebServiceMixIn import WebServiceMixIn
# global (RAM) cookie storage
cookiejar = cookielib.CookieJar()
@@ -177,7 +176,7 @@
'user_id': 'preferred_express_user_id',}
-class WizardTool(BaseTool, WebServiceMixIn):
+class WizardTool(BaseTool):
""" WizardTool is able to generate custom business templates. """
id = 'portal_wizard'
Removed: erp5/trunk/products/ERP5Wizard/WebServiceMixIn.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Wizard/WebServiceMixIn.py?rev=25679&view=auto
==============================================================================
--- erp5/trunk/products/ERP5Wizard/WebServiceMixIn.py [utf8] (original)
+++ erp5/trunk/products/ERP5Wizard/WebServiceMixIn.py (removed)
@@ -1,56 +1,0 @@
-##############################################################################
-#
-# Copyright (c) 2006 Nexedi SARL and Contributors. All Rights Reserved.
-# Ivan Tyagov <ivan at nexedi.com>
-#
-# WARNING: This program as such is intended to be used by professional
-# programmers who take the whole responsability of assessing all potential
-# consequences resulting from its eventual inadequacies and bugs
-# End users who are looking for a ready-to-use solution with commercial
-# garantees and support are strongly adviced to contract a Free Software
-# Service Company
-#
-# This program 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.
-#
-# This program 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 this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-##############################################################################
-
-from AccessControl import ClassSecurityInfo
-from Products.ERP5Type import Permissions
-from Products.ERP5Wizard.transport.XMLRPCConnection import XMLRPCConnection
-from Products.ERP5Wizard.transport.SOAPConnection import SOAPConnection
-
-class WebServiceMixIn:
- """
- Do all kinds of web services in all kinds of protocols.
- """
-
- security = ClassSecurityInfo()
-
- security.declareProtected('connect', Permissions.ManagePortal)
- def connect(self, url, user_name=None, password=None, transport=None):
- """
- Connect to remote instances
- of any kind of web service (not only ERP5) with many
- different kinds of authentication.
- authentication_method: 'xml-rpc' or 'soap'
- """
- # XXX: implement connection caching per zope thread
- if transport == 'xml-rpc':
- connection_handler = XMLRPCConnection(url, user_name, password)
- elif transport == 'soap':
- connection_handler = SOAPConnection(url, user_name, password)
-
- connection_handler = connection_handler.connect()
- return connection_handler
Modified: erp5/trunk/products/ERP5Wizard/__init__.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Wizard/__init__.py?rev=25680&r1=25679&r2=25680&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Wizard/__init__.py [utf8] (original)
+++ erp5/trunk/products/ERP5Wizard/__init__.py [utf8] Wed Feb 25 09:16:55 2009
@@ -44,11 +44,10 @@
# Finish installation
def initialize(context):
import Document
- from Tool import WizardTool, IntrospectionTool
+ from Tool import WizardTool
# Define object classes and tools
object_classes = ()
- portal_tools = (WizardTool.WizardTool,
- IntrospectionTool.IntrospectionTool,)
+ portal_tools = (WizardTool.WizardTool,)
content_classes = ()
content_constructors = ()
# Do initialization step
More information about the Erp5-report
mailing list