Commit dac03d4e authored by Amos Latteier's avatar Amos Latteier

Removed 'self' argument from API documentation methods. Also fixed some permission information.

parent 73fb83db
......@@ -84,7 +84,7 @@
##############################################################################
def manage_addDocument(self, id, title):
def manage_addDocument(id, title):
"""
Add a DTML Document to the current ObjectManager
"""
......@@ -101,7 +101,7 @@ class DTMLDocument:
'OFSP.PropertyManager.PropertyManager',
)
def __call__(self, client=None, REQUEST={}, RESPONSE=None, **kw):
def __call__(client=None, REQUEST={}, RESPONSE=None, **kw):
"""
Calling a DTMLDocument causes the Document to interpret the DTML
......@@ -174,7 +174,7 @@ class DTMLDocument:
"""
def manage_edit(self, data, title):
def manage_edit(data, title):
"""
Change the DTML Document, replacing its contents with 'data'
and
......@@ -185,18 +185,19 @@ class DTMLDocument:
Permission -- 'Change DTML Documents'
"""
def document_src(self):
def document_src():
"""
Returns the unrendered source text of the DTML Document.
Permission -- 'View management screens'
"""
def get_size(self):
def get_size():
"""
Returns the size of the unrendered source text of the DTML
Document in bytes.
Permission -- 'View'
"""
__constructor__=manage_addDocument
......
......@@ -83,7 +83,7 @@
#
##############################################################################
def manage_addDTMLMethod(self, id, title):
def manage_addDTMLMethod(id, title):
"""
Add a DTML Method to the current ObjectManager
"""
......@@ -103,7 +103,7 @@ class DTMLMethod:
__extends__=('OFSP.ObjectManagerItem.ObjectManagerItem',)
def __call__(self, client=None, REQUEST={}, **kw):
def __call__(client=None, REQUEST={}, **kw):
"""
Calling a DTMLMethod causes the Method to interpret the DTML
......@@ -174,7 +174,7 @@ class DTMLMethod:
Permission -- 'View'
"""
def manage_edit(self, data, title):
def manage_edit(data, title):
"""
Change the DTML Method, replacing its contents with 'data' and
changing its title.
......@@ -184,18 +184,19 @@ class DTMLMethod:
Permission -- 'Change DTML Methods'
"""
def document_src(self):
def document_src():
"""
Returns the unrendered source text of the DTML Method.
Permission -- 'View management screens'
"""
def get_size(self):
def get_size():
"""
Returns the size of the unrendered source text of the DTML
Method in bytes.
Permission -- 'View'
"""
__constructor__ = manage_addDTMLMethod
......@@ -280,7 +280,7 @@ class DateTime:
"""
def timeTime(self):
def timeTime():
"""
Return the date/time as a floating-point number in UTC, in the
......@@ -290,7 +290,7 @@ class DateTime:
"""
def toZone(self, z):
def toZone(z):
"""
Return a DateTime with the value as the current object,
......@@ -298,7 +298,7 @@ class DateTime:
"""
def isFuture(self):
def isFuture():
"""
Return true if this object represents a date/time later than
......@@ -306,7 +306,7 @@ class DateTime:
"""
def isPast(self):
def isPast():
"""
Return true if this object represents a date/time earlier than
......@@ -314,7 +314,7 @@ class DateTime:
"""
def isCurrentYear(self):
def isCurrentYear():
"""
Return true if this object represents a date/time that falls
......@@ -323,7 +323,7 @@ class DateTime:
"""
def isCurrentMonth(self):
def isCurrentMonth():
"""
Return true if this object represents a date/time that falls
......@@ -332,7 +332,7 @@ class DateTime:
"""
def isCurrentDay(self):
def isCurrentDay():
"""
Return true if this object represents a date/time that falls
......@@ -341,7 +341,7 @@ class DateTime:
"""
def isCurrentHour(self):
def isCurrentHour():
"""
Return true if this object represents a date/time that falls
......@@ -350,7 +350,7 @@ class DateTime:
"""
def isCurrentMinute(self):
def isCurrentMinute():
"""
Return true if this object represents a date/time that falls
......@@ -359,7 +359,7 @@ class DateTime:
"""
def earliestTime(self):
def earliestTime():
"""
Return a new DateTime object that represents the earliest
......@@ -368,7 +368,7 @@ class DateTime:
"""
def latestTime(self):
def latestTime():
"""
Return a new DateTime object that represents the latest
......@@ -449,7 +449,7 @@ class DateTime:
"""
def isLeapYear(self):
def isLeapYear():
"""
Return true if the current year (in the context of the
......@@ -457,7 +457,7 @@ class DateTime:
"""
def dayOfYear(self):
def dayOfYear():
"""
Return the day of the year, in context of the timezone
......@@ -466,7 +466,7 @@ class DateTime:
"""
# Component access
def parts(self):
def parts():
"""
Return a tuple containing the calendar year, month, day, hour,
......@@ -474,14 +474,14 @@ class DateTime:
"""
def timezone(self):
def timezone():
"""
Return the timezone in which the object is represented.
"""
def year(self):
def year():
"""
Return the calendar year of the object
......@@ -489,7 +489,7 @@ class DateTime:
"""
def month(self):
def month():
"""
Return the month of the object as an integer
......@@ -497,7 +497,7 @@ class DateTime:
"""
def Month(self):
def Month():
"""
Return the full month name
......@@ -505,7 +505,7 @@ class DateTime:
"""
def aMonth(self):
def aMonth():
"""
Return the abbreviated month name.
......@@ -513,7 +513,7 @@ class DateTime:
"""
def Mon(self):
def Mon():
"""
Compatibility: see aMonth
......@@ -521,7 +521,7 @@ class DateTime:
"""
def pMonth(self):
def pMonth():
"""
Return the abbreviated (with period) month name.
......@@ -529,7 +529,7 @@ class DateTime:
"""
def Mon_(self):
def Mon_():
"""
Compatibility: see pMonth
......@@ -537,7 +537,7 @@ class DateTime:
"""
def day(self):
def day():
"""
Return the integer day
......@@ -545,7 +545,7 @@ class DateTime:
"""
def Day(self):
def Day():
"""
Return the full name of the day of the week
......@@ -553,7 +553,7 @@ class DateTime:
"""
def DayOfWeek(self):
def DayOfWeek():
"""
Compatibility: see Day
......@@ -561,7 +561,7 @@ class DateTime:
"""
def aDay(self):
def aDay():
"""
Return the abbreviated name of the day of the week
......@@ -569,7 +569,7 @@ class DateTime:
"""
def pDay(self):
def pDay():
"""
Return the abbreviated (with period) name of the day of the
......@@ -579,7 +579,7 @@ class DateTime:
"""
def Day_(self):
def Day_():
"""
Compatibility: see pDay
......@@ -587,7 +587,7 @@ class DateTime:
"""
def dow(self):
def dow():
"""
Return the integer day of the week, where Sunday is 0
......@@ -595,7 +595,7 @@ class DateTime:
"""
def dow_1(self):
def dow_1():
"""
Return the integer day of the week, where Sunday is 1
......@@ -603,7 +603,7 @@ class DateTime:
"""
def h_12(self):
def h_12():
"""
Return the 12-hour clock representation of the hour
......@@ -611,7 +611,7 @@ class DateTime:
"""
def h_24(self):
def h_24():
"""
Return the 24-hour clock representation of the hour
......@@ -619,7 +619,7 @@ class DateTime:
"""
def ampm(self):
def ampm():
"""
Return the appropriate time modifier (am or pm)
......@@ -627,7 +627,7 @@ class DateTime:
"""
def hour(self):
def hour():
"""
Return the 24-hour clock representation of the hour
......@@ -635,7 +635,7 @@ class DateTime:
"""
def minute(self):
def minute():
"""
Return the minute
......@@ -643,7 +643,7 @@ class DateTime:
"""
def second(self):
def second():
"""
Return the second
......@@ -651,14 +651,14 @@ class DateTime:
"""
def millis(self):
def millis():
"""
Return the millisecond since the epoch in GMT.
"""
def strftime(self, format):
def strftime(format):
"""
Return date time string formatted according to 'format'
......@@ -666,28 +666,28 @@ class DateTime:
"""
# General formats from previous DateTime
def Date(self):
def Date():
"""
Return the date string for the object.
"""
def Time(self):
def Time():
"""
Return the time string for an object to the nearest second.
"""
def TimeMinutes(self):
def TimeMinutes():
"""
Return the time string for an object not showing seconds.
"""
def AMPM(self):
def AMPM():
"""
Return the time string for an object to the nearest second.
......@@ -695,68 +695,68 @@ class DateTime:
"""
def AMPMMinutes(self):
def AMPMMinutes():
"""
Return the time string for an object not showing seconds.
"""
def PreciseTime(self):
def PreciseTime():
"""
Return the time string for the object.
"""
def PreciseAMPM(self):
def PreciseAMPM():
"""Return the time string for the object."""
def yy(self):
def yy():
"""Return calendar year as a 2 digit string"""
def mm(self):
def mm():
"""Return month as a 2 digit string"""
def dd(self):
def dd():
"""Return day as a 2 digit string"""
def rfc822(self):
def rfc822():
"""Return the date in RFC 822 format"""
# New formats
def fCommon(self):
def fCommon():
"""Return a string representing the object\'s value
in the format: March 1, 1997 1:45 pm"""
def fCommonZ(self):
def fCommonZ():
"""Return a string representing the object\'s value
in the format: March 1, 1997 1:45 pm US/Eastern"""
def aCommon(self):
def aCommon():
"""Return a string representing the object\'s value
in the format: Mar 1, 1997 1:45 pm"""
def aCommonZ(self):
def aCommonZ():
"""Return a string representing the object\'s value
in the format: Mar 1, 1997 1:45 pm US/Eastern"""
def pCommon(self):
def pCommon():
"""Return a string representing the object\'s value
in the format: Mar. 1, 1997 1:45 pm"""
def pCommonZ(self):
def pCommonZ():
"""Return a string representing the object\'s value
in the format: Mar. 1, 1997 1:45 pm US/Eastern"""
def ISO(self):
def ISO():
"""Return the object in ISO standard format
Dates are output as: YYYY-MM-DD HH:MM:SS
"""
def HTML4(self):
def HTML4():
"""Return the object in the format used in the HTML4.0 specification,
one of the standard forms in ISO8601. See
http://www.w3.org/TR/NOTE-datetime
......
......@@ -84,7 +84,7 @@
##############################################################################
def manage_addFile(self,id,file='',title='',precondition='', content_type=''):
def manage_addFile(id, file='', title='', precondition='', content_type=''):
"""
Add a new File object.
......@@ -136,7 +136,7 @@ class File:
'OFSP.PropertyManager.PropertyManager',
)
def update_data(self, data, content_type=None, size=None):
def update_data(data, content_type=None, size=None):
"""
Updates the contents of the File with 'data'.
......@@ -147,14 +147,14 @@ class File:
Permission -- Python only
"""
def getSize(self):
def getSize():
"""
Returns the size of the file in bytes.
Permission -- 'View'
"""
def getContentType(self):
def getContentType():
"""
Returns the content type of the file.
......
......@@ -84,7 +84,7 @@
##############################################################################
def manage_addFolder(self, id, title):
def manage_addFolder(id, title):
"""
Add a Folder to the current ObjectManager
......@@ -108,3 +108,14 @@ class Folder:
)
__constructor__ = manage_addFolder
......@@ -83,7 +83,7 @@
#
##############################################################################
def manage_addImage(self, id, file, title='', precondition='', content_type=''):
def manage_addImage(id, file, title='', precondition='', content_type=''):
"""
Add a new Image object.
......@@ -135,7 +135,7 @@ class Image:
__extends__=('OFSP.File.File',)
def tag(self, height=None, width=None, alt=None,
def tag(height=None, width=None, alt=None,
scale=0, xscale=0, yscale=0, **args):
"""
This method returns a string which contains an HTML IMG tag
......@@ -152,3 +152,10 @@ class Image:
Permission -- 'View'
"""
......@@ -109,7 +109,7 @@ class ObjectManager:
object.
"""
def objectIds(self, type=None):
def objectIds(type=None):
"""
This method returns a list of the ids of the contained
objects.
......@@ -133,7 +133,7 @@ class ObjectManager:
Permission -- 'Access contents information'
"""
def objectValues(self, type=None):
def objectValues(type=None):
"""
This method returns a sequence of contained objects.
......@@ -156,7 +156,7 @@ class ObjectManager:
Permission -- 'Access contents information'
"""
def objectItems(self, type=None):
def objectItems(type=None):
"""
This method returns a sequence of (id, object) tuples.
......@@ -176,13 +176,13 @@ class ObjectManager:
Permission -- 'Access contents information'
"""
def superValues(self, t):
def superValues(type):
"""
This method returns a list of objects of a given meta_type(es)
contained in the Object Manager and all its parent Object
Managers.
The t argument specifies the meta_type(es). It can be a string
The type argument specifies the meta_type(es). It can be a string
specifying one meta_type, or it can be a list of strings to
specify many.
......
......@@ -108,7 +108,7 @@ class ObjectManagerItem:
This object is acquired and should not be set.
"""
def getId(self):
def getId():
"""
Returns the object's id.
......@@ -121,7 +121,7 @@ class ObjectManagerItem:
Permission -- Always available
"""
def title_or_id(self):
def title_or_id():
"""
If the title is not blank, return it, otherwise
return the id.
......@@ -129,7 +129,7 @@ class ObjectManagerItem:
Permission -- Always available
"""
def title_and_id(self):
def title_and_id():
"""
If the title is not blank, the return the title
followed by the id in parentheses. Otherwise return the id.
......@@ -137,7 +137,7 @@ class ObjectManagerItem:
Permission -- Always available
"""
def manage_workspace(self):
def manage_workspace():
"""
This is the web method that is called when a user selects an
......@@ -145,10 +145,9 @@ class ObjectManagerItem:
Management navigation view.
Permission -- 'View management screens'
"""
def this(self):
def this():
"""
Return the object.
......@@ -161,10 +160,10 @@ class ObjectManagerItem:
you are in a method of a non-item subobject of an item and you
need to get the item outside of the context of the subobject.
Permission -- XXX
Permission -- Always available
"""
def absolute_url(self, relative=None):
def absolute_url(relative=None):
"""
Return the absolute url to the object.
......@@ -176,14 +175,14 @@ class ObjectManagerItem:
Permission -- Always available
"""
def getPhysicalRoot(self):
def getPhysicalRoot():
"""
Returns the top-level Zope Application object.
Permission -- Python only
"""
def getPhysicalPath(self):
def getPhysicalPath():
"""
Get the path of an object from the root, ignoring virtual
hosts.
......@@ -192,7 +191,7 @@ class ObjectManagerItem:
"""
def unrestrictedTraverse(self, path, default=None):
def unrestrictedTraverse(path, default=None):
"""
Return the object obtained by traversing the given path from
the object on which the method was called. This method begins
......@@ -205,7 +204,7 @@ class ObjectManagerItem:
Permission -- Python only
"""
def restrictedTraverse(self, path, default=None):
def restrictedTraverse(path, default=None):
"""
Return the object obtained by traversing the given path from
the object on which the method was called, performing security
......@@ -215,7 +214,6 @@ class ObjectManagerItem:
returned.
Permission -- Python only
"""
......
......@@ -93,23 +93,23 @@ class PropertyManager:
read-only and can have default values.
"""
def getProperty(self, id, d=None):
def getProperty(id, d=None):
"""
Return the value of the property 'id'. If the property is not
found the optional second argument or None is returned.
Permission -- Access contents information
Permission -- 'Access contents information'
"""
def getPropertyType(self, id):
def getPropertyType(id):
"""
Get the type of property 'id'. Returns None if no such
property exists.
Permission -- Access contents information
Permission -- 'Access contents information'
"""
def hasProperty(self, id):
def hasProperty(id):
"""
Returns a true value if the Property Manager has the property
'id'. Otherwise returns a false value.
......@@ -117,41 +117,32 @@ class PropertyManager:
Permission -- 'Access contents information'
"""
def propertyIds(self):
def propertyIds():
"""
Returns a list of property ids.
Permission -- 'Access contents information'
"""
def propertyValues(self):
def propertyValues():
"""
Returns a list of property values.
Permission -- 'Access contents information'
"""
def propertyItems(self):
def propertyItems():
"""
Return a list of (id, property) tuples.
Permission -- 'Access contents information'
"""
def propertyMap(self):
def propertyMap():
"""
Returns a tuple of mappings, giving meta-data for properties.
The meta-data includes 'id', 'type', and 'mode'.
Permission -- Access contents information
Permission -- 'Access contents information'
"""
## Removed for now at brian's request
##
## def propdict(self):
## """
## Returns the properties as a mapping from property id to
## property value.
## Permission --
## """
......@@ -94,7 +94,7 @@ class PropertySheet:
"""
def xml_namespace(self):
def xml_namespace():
"""
Return a namespace string usable as an xml namespace
......@@ -106,7 +106,7 @@ class PropertySheet:
"""
def getProperty(self, id, d=None):
def getProperty(id, d=None):
"""
Get the property 'id', returning the optional second
......@@ -116,7 +116,7 @@ class PropertySheet:
"""
def getPropertyType(self, id):
def getPropertyType(id):
"""
Get the type of property 'id'. Returns None if no such
......@@ -126,7 +126,7 @@ class PropertySheet:
"""
def hasProperty(self, id):
def hasProperty(id):
"""
Returns true if 'self' has a property with the given 'id',
......@@ -136,7 +136,7 @@ class PropertySheet:
"""
def propertyIds(self):
def propertyIds():
"""
Returns a list of property ids.
......@@ -145,7 +145,7 @@ class PropertySheet:
"""
def propertyValues(self):
def propertyValues():
"""
Returns a list of actual property values.
......@@ -154,7 +154,7 @@ class PropertySheet:
"""
def propertyItems(self):
def propertyItems():
"""
Return a list of (id, property) tuples.
......@@ -163,7 +163,7 @@ class PropertySheet:
"""
def propertyMap(self):
def propertyMap():
"""
Returns a tuple of mappings, giving meta-data for properties.
......@@ -172,7 +172,7 @@ class PropertySheet:
"""
def propertyInfo(self):
def propertyInfo():
"""
Returns a mapping containing property meta-data.
......@@ -181,7 +181,7 @@ class PropertySheet:
"""
def manage_addProperty(self, id, value, type, REQUEST=None):
def manage_addProperty(id, value, type, REQUEST=None):
"""
Add a new property with the given 'id', 'value' and 'type'.
......@@ -235,7 +235,7 @@ class PropertySheet:
"""
def manage_changeProperties(self, REQUEST=None, **kw):
def manage_changeProperties(REQUEST=None, **kw):
"""
Change existing object properties by passing either a mapping
......@@ -264,7 +264,7 @@ class PropertySheet:
"""
def manage_delProperties(self, ids=None, REQUEST=None):
def manage_delProperties(ids=None, REQUEST=None):
"""
Delete one or more properties with the given 'ids'. The 'ids'
......
......@@ -104,7 +104,7 @@ class PropertySheets:
"""
def values(self):
def values():
"""
Return a sequence of all of the PropertySheet objects for
......@@ -114,7 +114,7 @@ class PropertySheets:
"""
def items(self):
def items():
"""
Return a sequence containing an '(id, object)' tuple for
......@@ -124,7 +124,7 @@ class PropertySheets:
"""
def get(self, name, default=None):
def get(name, default=None):
"""
Return the PropertySheet identified by 'name', or the value
......
......@@ -182,7 +182,7 @@ class Request:
"""
def get_header(self, name, default=None):
def get_header(name, default=None):
"""
Return the named HTTP header, or an optional default argument
......@@ -196,7 +196,7 @@ class Request:
"""
def has_key(self, key):
def has_key(key):
"""
Returns a true value if the REQUEST object contains key,
......@@ -207,7 +207,7 @@ class Request:
"""
def keys(self):
def keys():
"""
Returns a sorted sequence of all keys in the REQUEST object.
......@@ -216,7 +216,7 @@ class Request:
"""
def items(self):
def items():
"""
Returns a sequence of (key, value) tuples for all the keys in
......@@ -226,7 +226,7 @@ class Request:
"""
def values(self):
def values():
"""
Returns a sequence of values for all the keys in the REQUEST
......@@ -236,7 +236,7 @@ class Request:
"""
def setServerURL(self, protocol=None, hostname=None, port=None):
def setServerURL(protocol=None, hostname=None, port=None):
"""
Sets the specified elements of 'SERVER_URL', also affecting
......@@ -248,7 +248,7 @@ class Request:
"""
def setVirtualRoot(self, path, hard=0):
def setVirtualRoot(path, hard=0):
"""
Alters 'URL', 'URLn', 'URLPATHn', 'BASEn', 'BASEPATHn', and
......
......@@ -92,7 +92,7 @@ class Response:
"""
def setStatus(self, status, reason=None):
def setStatus(status, reason=None):
'''
Sets the HTTP status code of the response; the argument may
......@@ -120,7 +120,7 @@ class Response:
'''
def setHeader(self, name, value):
def setHeader(name, value):
'''
Sets an HTTP return header "name" with value "value", clearing
......@@ -133,7 +133,7 @@ class Response:
'''
def addHeader(self, name, value):
def addHeader(name, value):
'''
Set a new HTTP return header with the given value, while
......@@ -143,7 +143,7 @@ class Response:
'''
def setBase(self,base):
def setBase(base):
"""
Set the base URL for the returned document.
......@@ -152,7 +152,7 @@ class Response:
"""
def appendCookie(self, name, value):
def appendCookie(name, value):
'''
Returns an HTTP header that sets a cookie on cookie-enabled
......@@ -165,7 +165,7 @@ class Response:
'''
def expireCookie(self, name, **kw):
def expireCookie(name, **kw):
'''
Cause an HTTP cookie to be removed from the browser
......@@ -182,7 +182,7 @@ class Response:
'''
def setCookie(self,name,value,**kw):
def setCookie(name,value,**kw):
'''
Set an HTTP cookie on the browser
......@@ -196,7 +196,7 @@ class Response:
'''
def appendHeader(self, name, value, delimiter=","):
def appendHeader(name, value, delimiter=","):
'''
Append a value to a cookie
......@@ -209,7 +209,7 @@ class Response:
'''
def redirect(self, location, lock=0):
def redirect(location, lock=0):
"""
Cause a redirection without raising an error. If the "lock"
......@@ -222,8 +222,8 @@ class Response:
"""
def write(self, data):
"""\
def write(data):
"""
Return data as a stream
HTML data may be returned using a stream-oriented interface.
......@@ -236,7 +236,7 @@ class Response:
Note that published objects must not generate any errors
after beginning stream-oriented output.
Permission -- XXX
Permission -- Always available
"""
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment