Info
Products.RPMDistro.RPMBuilder
Up one level
Modules
Classes
class RPMBuilder
(
LargePortalFolder
,
ZSyncerSupport
)
A server used to manage and distribute RedHat RPM's as per
the XML-RPC expectations of the RedHat up2date suite.
RPMDistro: Add
Implements
IRPMBuilder
IPersistentExtra
IPersistent
IFolder
IObjectManager
ICopyContainer
INavigation
IAcquirer
IDAVCollection
IDAVResource
IWriteLock
EtagBaseInterface
ITraversable
IPropertyManager
IRoleManager
IPermissionMappingSupport
IItem
ICopySource
IOwned
IUndoSupport
IFindSupport
IPublishTraverse
ISimpleItem
ICatalogAware
IWorkflowAware
IOpaqueItemManager
IFolderish
IMutableMinimalDublinCore
IDynamicType
IDublinCore
ICatalogableDublinCore
IMutableDublinCore
IOrderedContainer
ILocalPortletAssignable
COPY (self, REQUEST, RESPONSE)
Create a duplicate of the source resource whose state
and behavior match that of the source resource as closely
as possible. Though we may later try to make a copy appear
seamless across namespaces (e.g. from Zope to Apache), COPY
is currently only supported within the Zope namespace.
Contributors (self)
View
Deprecated alias of listContributors.
CreationDate (self, zone=None )
View
Dublin Core Date element - date resource created.
Creator (self)
View
Dublin Core Creator element - resource author.
DELETE (self, REQUEST, RESPONSE)
Delete a collection resource. For collection resources, DELETE
may return either 200 (OK) or 204 (No Content) to indicate total
success, or may return 207 (Multistatus) to indicate partial
success. Note that in Zope a DELETE currently never returns 207.
Date (self, zone=None )
View
Dublin Core Date element - default date.
Description (self)
View
Dublin Core Description element - resource summary.
EffectiveDate (self, zone=None )
View
Dublin Core Date element - date resource becomes effective.
ExpirationDate (self, zone=None )
View
Dublin Core Date element - date resource expires.
Format (self)
View
Dublin Core Format element - resource format.
HEAD (self, REQUEST, RESPONSE)
Retrieve resource information without a response body.
Identifier (self)
View
Dublin Core Identifier element - resource ID.
LOCK (self, REQUEST, RESPONSE)
Lock a resource
Language (self)
View
Dublin Core Language element - resource language.
MKCOL (self, REQUEST, RESPONSE)
Create a new collection resource. If called on an existing
resource, MKCOL must fail with 405 (Method Not Allowed).
MKCOL_handler (self, id, REQUEST=None , RESPONSE=None )
Handle WebDAV MKCOL.
MOVE (self, REQUEST, RESPONSE)
Move a resource to a new location. Though we may later try to
make a move appear seamless across namespaces (e.g. from Zope
to Apache), MOVE is currently only supported within the Zope
namespace.
ModificationDate (self, zone=None )
View
Dublin Core Date element - date resource last modified.
OPTIONS (self, REQUEST, RESPONSE)
Retrieve communication options.
PROPFIND (self, REQUEST, RESPONSE)
Retrieve properties defined on the resource.
PROPPATCH (self, REQUEST, RESPONSE)
Set and/or remove properties defined on the resource.
PUT (self, REQUEST, RESPONSE)
The PUT method has no inherent meaning for collection
resources, though collections are not specifically forbidden
to handle PUT requests. The default response to a PUT request
for collections is 405 (Method Not Allowed).
PUT_factory (self, name, typ, body)
Factory for PUT requests to objects which do not yet exist.
Used by NullResource.PUT.
Returns -- Bare and empty object of the appropriate type (or None, if
we don't know what to do)
ZopeFind (self, obj, obj_ids=None , obj_metatypes=None , obj_searchterm=None , obj_expr=None , obj_mtime=None , obj_mspec=None , obj_permission=None , obj_roles=None , search_sub=0 , REQUEST=None , result=None , pre='' )
Zope Find interface
Publisher (self)
View
Dublin Core Publisher element - resource publisher.
RPMSUrl (self)
View
allow mirrorlist generation
Rights (self)
View
Dublin Core Rights element - resource copyright.
SQLConnectionIDs (container)
Find SQL database connections in the current folder and above
This function returns a list of two-element tuples. The second element
is the connection ID, the first element either its title, or if the
title is empty, its ID.
SecurityCheckPermission (md, permission, object)
Check whether the security context allows the given permission on
the given object.
Arguments:
permission -- A permission name
object -- The object being accessed according to the permission
Subject (self)
View
Dublin Core Subject element - resource keywords.
TRACE (self, REQUEST, RESPONSE)
Return the HTTP message received back to the client as the
entity-body of a 200 (OK) response. This will often usually
be intercepted by the web server in use. If not, the TRACE
request will fail with a 405 (Method Not Allowed), since it
is not often possible to reproduce the HTTP request verbatim
from within the Zope environment.
Title (self)
View
Dublin Core Title element - resource name.
Type (self)
View
Dublin Core Type element - resource type.
UNLOCK (self, REQUEST, RESPONSE)
Remove an existing lock on a resource.
XbuildDistro (self, distro, archs=[] , clean=False , verify=False , debug=False , force=False , depsolve=False , kickstart=False , REQUEST=None )
go away and build for all the architectures it represents, this distro
ZQueryIds (self)
ZopeFind (self, obj, obj_ids=None , obj_metatypes=None , obj_searchterm=None , obj_expr=None , obj_mtime=None , obj_mspec=None , obj_permission=None , obj_roles=None , search_sub=0 , REQUEST=None , result=None , pre='' )
Zope Find interface
ZopeFindAndApply (self, obj, obj_ids=None , obj_metatypes=None , obj_searchterm=None , obj_expr=None , obj_mtime=None , obj_mspec=None , obj_permission=None , obj_roles=None , search_sub=0 , REQUEST=None , result=None , pre='' , apply_func=None , apply_path='' )
Zope Find interface and apply
InitializeClass (self)
destServer (self)
we can really only deal with one ZSyncer at a time, so this function
filters any commented server(s) in the list, returning just the first
getPortalTypeName (self)
needed for the portal type view mechanism ...
absolute_url (self, relative=0 )
Return the absolute URL of the object.
This a canonical URL based on the object's physical
containment path. It is affected by the virtual host
configuration, if any, and can be used by external
agents, such as a browser, to address the object.
If the relative argument is provided, with a true value, then
the value of virtual_url_path() is returned.
Some Products incorrectly use '/'+absolute_url(1) as an
absolute-path reference. This breaks in certain virtual
hosting situations, and should be changed to use
absolute_url_path() instead.
absolute_url_path (self)
Return the path portion of the absolute URL of the object.
This includes the leading slash, and can be used as an
'absolute-path reference' as defined in RFC 2396.
ac_inherited_permissions (self, all=0 )
access_debug_info (self)
Return debug info.
acquiredRolesAreUsedBy (self, permission)
actions (self)
View
return a list of valid transitions for the object
addCreator (self, creator=None )
Modify portal content
Add creator to Dublin Core creators.
addDTMLDocument (self, id, title='' , file='' , REQUEST=None , submit=None )
Add a DTML Document object with the contents of file. If
'file' is empty, default document text is used.
addDTMLMethod (self, id, title='' , file='' , REQUEST=None , submit=None )
Add a DTML Method object with the contents of file. If
'file' is empty, default document text is used.
additional_buttons (self)
all_meta_types (self)
allowedContentTypes (self)
List type info objects for types which can be added in
this folder.
bobobase_modification_time (self)
buildArchs (self, REQUEST=None )
Access contents information
return a list of architectures which this builder will build for
buildDistro (self, distro, archs=[] , clean=False , verify=False , debug=False , force=False , depsolve=False , kickstart=False , REQUEST=None )
Change configuration
go away and build for all the architectures it represents, this distro
buildEgg (self, egg)
build an egg - it's not recursive
buildPkgs (self, pkgs, REQUEST=None )
Change configuration
delegate package builds to *all* chroots that may wish to build the SRPMPackage's
this implementation may change to a build queue at some point
callManyRemote (self, methodlist)
ZSyncer: Use ZSyncer
Call multiple remote methods and return a list of
return values, using as few requests as possible.
methodlist should be a sequence of dictionaries with the following
keys:
'path': (optional): path to the object on which to call the method,
relative to the remote syncer's base. If not provided,
the zsyncer itself is used.
'name': name of the method.
'args' (optional): list of positional arguments to pass.
'kwargs' (optional): dictionary of keyword arguments to pass.
callMethod_ (self, path, method_name, *args, **kw)
ZSyncer: Use ZSyncer
Call an arbitrary method (with security checks).
*path* is path to the object. If it is None,
the zsyncer itself will be used.
*method_name* is method to call. Any result is returned.
This is intended to be called by the client zsyncer, ONLY via
callRemote(), but there is no way to enforce that.
Note that for security reasons, you must have permission to
use ZSyncer *and* to call the requested method in context.
callMethods_ (self, methodlist)
ZSyncer: Use ZSyncer
Call a list of arbitrary methods (with security checks).
Return a list of results.
*methodlist* is a list of dictionaries with these keys:
'path': path to the object on which to call the method,
relative to the base folder. (optional, defaults to the
syncer itself).
'name': name of the method.
'args' (optional): list of positional arguments to pass.
'kwargs' (optional): dictionary of keyword arguments to pass.
This is intended to be called by the client zsyncer,
ONLY via callManyRemote(), but there is no way to enforce that.
Note that for security reasons, you must have permission
to use ZSyncer *and* to call all the requested methods in
context.
callRemote (self, server_url, path, method_name, *args, **kw)
ZSyncer: Use ZSyncer
Find an arbitrary callable at *path* on the remote server,
call it with the given arguments, and return the result.
If *path* is None, it's the remote syncer itself.
call_ (self, request, REQUEST=None )
ZSyncer: Use ZSyncer
*request* (poorly named, but changing it breaks stuff) is not
an HTTPRequest, rather it should be a pickled tuple
containing method_name (string), arguments (a sequence), and
keyword arguments (a dictionary).
Return value is a pickled tuple of (success, value) where
success is boolean and value is the return value of
getattr(self, method_name)(*args, **kwargs)
cb_dataItems (self)
cb_dataValid (self)
cb_isCopyable (self)
cb_isMoveable (self)
cb_userHasCopyOrMovePermission (self)
chains (self, wftool=None )
View management screens
return workflow chains
changeOwnership (self, user, recursive=0 )
Change the ownership to the given user.
If 'recursive' is true then also take ownership of all sub-objects,
otherwise sub-objects retain their ownership information.
cheatBuildDistro (self, image, distro, clean=False , verify=False , depsolve=False , kickstart=False , buildstamp=True , REQUEST=None )
mount and copy image onto our build structure and bundle that instead of
creating it with the anaconda installer builder tools
checkIdAvailable (self, id)
checkRPMDB (self, do_yum=0 , REQUEST=None )
Access contents information
hmmm - I think this stuff has changed with the pyrpm package and there's now
no yum - we just throw a directory at it ...
Basically, we're just going and checking the /var/lib/rpm database on the
build server ...
this is now optional - we may or may not have pyrpm installed ...
contentIds (self, filter=None )
contentItems (self, filter=None )
contentValues (self, filter=None , sort_on=None , reverse=0 )
Able to sort on field.
content_type (self)
WebDAV needs this to do the Right Thing (TM).
created (self)
View
Dublin Core Date element - date resource created.
dav__init (self, request, response)
dav__simpleifhandler (self, request, response, method='PUT' , col=0 , url=None , refresh=0 )
dav__validate (self, object, methodname, REQUEST)
debugInfo (self)
View management screens
return tuple of sorted dict keys, plus the __dict__
decodeFolderFilter (self, encoded)
Parse cookie string for using variables in dtml.
dependencyNames (self, names, arch)
New resolver, returns two lists of package names - resolved, and unresolved
dependencyValues (self, pkgs, *args, **kw)
New resolver, returns two lists of RPMValues - resolved, and unresolved
destServer (self)
Access contents information
we can really only deal with one ZSyncer at a time, so this function
filters any commented server(s) in the list, returning just the first
destServers (self)
Access contents information
returns list of non-commented servers
distTag (self)
Access contents information
return the name prepended to (some) packages via the %dist macro
distroFiles (self)
Access contents information
return a list of potential target DistroISO files
distroVerifyImage (self, distro, installbuildroot='' )
Access contents information
check that all the usual suspect correct file system stuff is present in the image ...
distroVerifyRPM (self, distro, REQUEST=None )
Access contents information
use rpm tools to verify the distro packages for all it's architectures
distroVerifyYum (self, distro, REQUEST=None )
Access contents information
use yum tools to verify the distro packages for all it's architectures
edit (self, title='' , description='' )
Edit the folder title (and possibly other attributes later)
editMetadata (self, title='' , subject=() , description='' , contributors=() , effective_date=None , expiration_date=None , format='text/html' , language='en-US' , rights='' )
Modify portal content
Need to add check for webDAV locked resource for TTW methods.
effective (self)
View
Dublin Core Date element - date resource becomes effective.
emptyContent (self)
initially dupe kupu into setting a blank field
encodeFolderFilter (self, REQUEST)
Parse cookie string for using variables in dtml.
expires (self)
View
Dublin Core Date element - date resource expires.
EditLink (self, object, borrow_lock=0 , skip_data=0 )
Insert the external editor link to an object if appropriate
famNewPackage (self, filename)
Change configuration
a File Attribute Monitor notification that a new package has arrived
on the file system
we build any new (ie non-cataloged) SRPM, and assign any new RPM
famRemovePackage (self, filename)
Change configuration
a File Attribute Monitor notification that a new package has arrived
on the file system
filtered_manage_options (self, REQUEST=None )
filtered_meta_types (self, user=None )
folderlistingFolderContents (self, contentFilter=None , suppressHiddenFiles=0 )
Calls listFolderContents in protected only by ACI so that
folder_listing can work without the List folder contents permission,
as in CMFDefault.
generateId (self, prefix='item' , suffix='' , rand_ceiling=999999999 )
Access contents information
Returns an ID not used yet by this folder.
The ID is unlikely to collide with other threads and clients.
The IDs are sequential to optimize access to objects
that are likely to have some relation.
get (self, name, default=None )
Access contents information
getActionInfo (self, action_chain, check_visibility=0 , check_condition=0 )
Get an Action info mapping specified by a chain of actions.
getActionsFor (self, workflow)
View management screens
return a list of valid transition states
getAttribute (self, name)
Retrieves an attribute value by name.
getAttributeNode (self, name)
Retrieves an Attr node by name or None if
there is no such attribute.
getAttributes (self)
Returns a NamedNodeMap containing the attributes
of this node (if it is an element) or None otherwise.
getBastionDomain (self)
return a BastionDomain - DNS info for anything within a hosting
context
getBatchObjectListing (self, REQUEST=None )
View management screens
Return a structure for a page template to show the list of objects.
getIdsSubset (self, objs)
Get the ids of only cmf objects (used for moveObjectsByDelta).
getChildNodes (self)
Returns a NodeList that contains all children of this node.
If there are no children, this is a empty NodeList
getContentType (self, fieldname)
kupu get's confused with our non-AT types ...
getDefaultSorting (self)
Get default sorting key and direction.
getElementsByTagName (self, tagname)
Returns a NodeList of all the Elements with a given tag
name in the order in which they would be encountered in a
preorder traversal of the Document tree. Parameter: tagname
The name of the tag to match (* = all tags). Return Value: A new
NodeList object containing all the matched Elements.
getErrorAdvice (self, error_type, error_value)
ZSyncer: Use ZSyncer
Given an error_type and error_value,
say something helpful :-)
This is a bit hacky because of having two connection methods
that do different things.
getField (self, fieldname)
getFirstChild (self)
The first child of this node. If there is no such node
this returns None
icon (self, relative_to_portal=0 )
Using this method allows the content class
creator to grab icons on the fly instead of using a fixed
attribute on the class.
getIconURL (self)
Get the absolute URL of the icon for the object.
getId (self)
Return the id of the object as a string.
This method should be used in preference to accessing an id attribute
of an object directly. The getId method is public.
getIdsSubset (self, objs)
Get the ids of only cmf objects (used for moveObjectsByDelta).
getLastChild (self)
The last child of this node. If there is no such node
this returns None.
getMetadataHeaders (self)
View
Return RFC-822-style headers.
getNextSibling (self)
The node immediately preceding this node. If
there is no such node, this returns None.
getNodeName (self)
The name of this node, depending on its type
getNodeType (self)
A code representing the type of the node.
getNodeValue (self)
The value of this node, depending on its type
getObjectPosition (self, id)
getOwner (self, info=0 , aq_get= , UnownableOwner=[] , getSecurityManager= )
Get the owner
If a true argument is provided, then only the owner path and id are
returned. Otherwise, the owner object is returned.
getOwnerDocument (self)
The Document object associated with this node.
When this is a document this is None
getOwnerTuple (self)
Return a tuple, (userdb_path, user_id) for the owner.
o Ownership can be acquired, but only from the containment path.
o If unowned, return None.
getParentNode (self)
The parent of this node. All nodes except Document
DocumentFragment and Attr may have a parent
getPath (self)
Access contents information
getPathInfo (self, path)
ZSyncer: Use ZSyncer
Useful for building UIs.
Returns a dictionary with the following keys/values:
'full':
absolute_url_path of the object (requires Zope 2.7 or higher).
If the object is not found, assume it's an 'extra' object;
then full = path.
'relative':
string path to the object relative to this zsyncer.
If the object is not found, assume it's an 'extra' object;
in that case, full = path.
'id_or_path':
string path relative to REQUEST['folder'] if REQUEST['recursive']
is true; otherwise, id (the final path element).
getPhysicalPath (self)
Get the physical path of the object.
Returns a path (an immutable sequence of strings) that can be used to
access this object again later, for example in a copy/paste operation.
getPhysicalRoot() and getPhysicalPath() are designed to operate
together.
getPortalTypeName (self)
needed for the portal type view mechanism ...
getPreviousSibling (self)
The node immediately preceding this node. If
there is no such node, this returns None.
getProperty (self, id, d=None )
Get the property 'id'.
Returns the optional second argument or None if no such property is
found.
getPropertyType (self, id)
Get the type of property 'id'.
Returns None if no such property exists.
getSiteManager (self)
getSize (self, ob=None )
getStatusOf (self, workflow, wftool=None , variable=None )
View management screens
return the status of ourselves in the context of this workflow (the corresponding
WorkflowTool function is strangely declared private ...
getSyncerRootId (self)
ZSyncer: Use ZSyncer
Get the ID of the object to use for traversing to syncable objects.
getSyncerRootPath (self)
ZSyncer: Use ZSyncer
Get path to the root to use for traversing to syncable objects,
as a string.
getTagName (self)
The name of the element
getTypeInfo (self)
View
Get the TypeInformation object specified by the portal type.
getURL (self, relative=False )
Access contents information
getWrappedOwner (self)
Get the owner, modestly wrapped in the user folder.
o If the object is not owned, return None.
o If the owner's user database doesn't exist, return Nobody.
o If the owner ID does not exist in the user database, return Nobody.
get_local_roles (self)
get_local_roles_for_userid (self, userid)
get_request_var_or_attr (self, name, default)
get_valid_userids (self)
hasChildNodes (self)
Returns true if the node has any children, false
if it doesn't.
has_key (self, id)
Indicates whether the folder has an item by ID.
hasProperty (self, id)
Return true if object has a property 'id'.
has_key (self, id)
Access contents information
Indicates whether the folder has an item by ID.
has_local_roles (self)
http__etag (self, readonly=0 )
http__parseMatchList (self, REQUEST, header='if-match' )
http__processMatchHeaders (self, REQUEST=None )
http__refreshEtag (self)
indexObject (self)
Modify portal content
Index the object in the portal catalog.
installPkgs (self, pkgs, REQUEST=None )
Change configuration
delegate package installs to *all* chroots that may wish to install the RPMPackage's
invokeFactory (self, type_name, id, RESPONSE=None , *args, **kw)
Invokes the portal_types tool.
isEffective (self, date)
View
Is the date within the resource's effective range?
is_diffable (self, meta_type=None , status='ok' )
Do we know how to render a diff for this type?
and, is its status such that we *can* show a diff for it?
objectItems (self, spec=None )
Access contents information
objectIds (self, spec=None )
Access contents information
lintCheckNames (self)
Access contents information
return the names we're lint-checking
listContributors (self)
View
Dublin Core Contributor elements - resource collaborators.
listCreators (self)
View
List Dublin Core Creator elements - resource authors.
listDAVObjects (self)
listFolderContents (self, contentFilter=None , suppressHiddenFiles=0 )
Optionally you can suppress "hidden" files, or files that
begin with .
list_imports (self)
manage_CopyContainerAllItems (self, REQUEST)
manage_CopyContainerFirstItem (self, REQUEST)
manage_DAVget (self)
Gets the document source
manage_FTPlist (self, REQUEST)
Directory listing for FTP.
manage_FTPstat (self, REQUEST)
Psuedo stat, used by FTP for directory listings.
manage_access (self, REQUEST, **kw)
Change permissions
Return an interface for making permissions settings.
manage_acquiredPermissions (self, permissions=[] , REQUEST=[] )
Change the permissions that acquire.
addDTMLDocument (self, id, title='' , file='' , REQUEST=None , submit=None )
Add a DTML Document object with the contents of file. If
'file' is empty, default document text is used.
addDTMLMethod (self, id, title='' , file='' , REQUEST=None , submit=None )
Add a DTML Method object with the contents of file. If
'file' is empty, default document text is used.
addDTMLMethod (self, id, title='' , file='' , REQUEST=None , submit=None )
Add a DTML Method object with the contents of file. If
'file' is empty, default document text is used.
manage_addFile (self, id, file='' , title='' , precondition='' , content_type='' , REQUEST=None )
Add a new File object.
Creates a new File object 'id' with the contents of 'file'
manage_addFolder (self, id, title='' , createPublic=0 , createUserF=0 , REQUEST=None )
Add a new Folder object with id *id*.
If the 'createPublic' and 'createUserF' parameters are set to any true
value, an 'index_html' and a 'UserFolder' objects are created respectively
in the new folder.
manage_addImage (self, id, file, title='' , precondition='' , content_type='' , REQUEST=None )
Add a new Image object.
Creates a new Image object 'id' with the contents of 'file'.
manage_addLocalRoles (self, userid, roles, REQUEST=[] )
Set local roles for a user.
manage_addOrderedFolder (self, id, title='' , createPublic=0 , createUserF=0 , REQUEST=None )
Add a new ordered Folder object with id *id*.
If the 'createPublic' and 'createUserF' parameters are set to any true
value, an 'index_html' and a 'UserFolder' objects are created respectively
in the new folder.
manage_addPloneFolder (self, id, title='' , REQUEST=None )
Adds a new PloneFolder.
manage_addProperty (self, id, value, type, REQUEST=None )
ZSyncer: Use ZSyncer
Add a new property via the web.
Sets a new property with the given id, type, and value.
manage_addSiteRoot (self, title='' , base='' , path='' , REQUEST=None , **ignored)
Add a SiteRoot to a container.
manage_addUserFolder (self, dtself=None , REQUEST=None , **ignored)
manage_afterAdd (self, item, container)
manage_afterClone (self, item)
manage_approvedAction (self, REQUEST={} , action='' , folder=None , object_paths=None , syncer=None , approver=None , comments='' )
View management screens
If this action is to be approved, throw that data in
into the message list
manage_beforeDelete (self, item, container)
manage_builders (self, REQUEST)
View management screens
manage_changeOwnership (self, userid, recursive=0 , REQUEST=None )
Take ownership
go change the owner to specified user (if found)
manage_changeOwnershipType (self, explicit=[] , RESPONSE=[] , REQUEST=[] )
Take ownership
Change the type (implicit or explicit) of ownership.
manage_changePermissions (self, REQUEST)
Change permissions
Change all permissions settings, called by management screen.
manage_changeProperties (self, REQUEST=None , **kw)
ZSyncer: Use ZSyncer
Change existing object properties.
Change object properties by passing either a REQUEST object or
name=value parameters
manage_changePropertyTypes (self, old_ids, props, REQUEST=None )
Replace one set of properties with another
Delete all properties that have ids in old_ids, then add a
property for each item in props. Each item has a new_id,
new_value, and new_type. The type of new_value should match
new_type.
manage_change_status (self, wfid, action, REQUEST=None )
Manage properties
do a workflow transition from the ZMI
manage_cleanup (self)
View management screens
Calls self._cleanup() and reports the result as text.
manage_clone (self, ob, id, REQUEST=None )
Clone an object, creating a new object with the given id.
manage_compare (self, path, recurse=None , REQUEST=None )
View management screens
Compare items, optionally recursing into subfolders;
optionally filtering by status according to REQUEST.
Return a tuple of (dict, [list of dicts]) where
the first dict represents the status of the object at *path*,
and the dicts in the (possibly empty) list represent the
status of sub-objects of that object.
If *recurse* is true, subobjects of subfolders are merged and
flattened into the subs list.
The list is sorted by path.
If the list is empty, it means the remote server found no sub-objects
at *path*.
manage_copyObjects (self, ids=None , REQUEST=None , RESPONSE=None )
Copy or Move
Put a reference to the objects named in ids in the clip board
manage_cutObjects (self, ids=None , REQUEST=None )
Put a reference to the objects named in ids in the clip board
manage_debugDelAttrs (self, attrs, REQUEST=None )
Change configuration
remove attributes from object
manage_defined_roles (self, submit=None , REQUEST=None )
Called by management screen.
manage_delLocalRoles (self, userids, REQUEST=[] )
Remove all local roles for a user.
manage_delObjects (self, ids=[] , REQUEST=None )
PloneFolder doesn't want to return properly ...
manage_delProperties (self, ids=None , REQUEST=None )
ZSyncer: Use ZSyncer
Delete one or more properties specified by 'ids'.
manage_deleteRemote (self, object_paths, msgs=None , REQUEST=None )
ZSyncer: Use ZSyncer
Interface to calling delete on each destination server.
We've just overridden the self.dest_servers stuff ...
manage_diffObject (self, object_path, REQUEST=None )
ZSyncer: Use ZSyncer
Try to get the object from the destination server
and diff on it.
Return the result as a dictionary.
manage_editMetadata (self, title, subject, description, contributors, effective_date, expiration_date, format, language, rights, REQUEST)
Modify portal content
Update metadata from the ZMI.
manage_editProperties (self, REQUEST)
ZSyncer: Use ZSyncer
Edit object properties via the web.
The purpose of this method is to change all property values,
even those not listed in REQUEST; otherwise checkboxes that
get turned off will be ignored. Use manage_changeProperties()
instead for most situations.
manage_editRoles (self, REQUEST, acl_type='A' , acl_roles=[] )
manage_editedDialog (self, REQUEST, **args)
manage_eggs (self, REQUEST)
View management screens
manage_exportObject (self, id='' , download=None , toxml=None , RESPONSE=None , REQUEST=None )
Exports an object to a file and returns that file.
manage_fixCount (self)
View management screens
Calls self._fixCount() and reports the result as text.
manage_fixupOwnershipAfterAdd (self)
manage_fixup_plone (self, REQUEST=None )
hmmm - our Plone site's borked itself and we can't customise our skin ...
manage_form_title (self, *args, **kw)
manage_getExportData (self, path)
ZSyncer: Use ZSyncer
Gets data suitable for transfer.
pkg is a file-like wrapped RPM
manage_getPermissionMapping (self)
Return the permission mapping for the object
This is a list of dictionaries with:
permission_name -- The name of the native object permission
class_permission -- The class permission the permission is
mapped to.
manage_getSource (self, obj_path)
View management screens
Get a src from an object (if allowed) suitable for diffing.
manage_getUserRolesAndPermissions (self, user_id)
Used for permission/role reporting for a given user_id.
Returns a dict mapping
'user_defined_in' -> path where the user account is defined
'roles' -> global roles,
'roles_in_context' -> roles in context of the current object,
'allowed_permissions' -> permissions allowed for the user,
'disallowed_permissions' -> all other permissions
manage_hasId (self, REQUEST)
check if the folder has an object with REQUEST['id']
manage_importObject (self, upload_file='' , REQUEST=None , set_owner=1 )
import an object from a local file system
manage_listObjects (self, path, do_base=1 )
View management screens
introspect non-contained containers ...
manage_moveObjectDown (self, id, REQUEST=None )
move indicated object down one in the order
manage_moveObjectToBottom (self, id, REQUEST=None )
move indicated object to bottom of the order
manage_moveObjectToTop (self, id, REQUEST=None )
move indicated object to top of the order
manage_moveObjectUp (self, id, REQUEST=None )
move indicated object up one the order
manage_move_objects_down (self, REQUEST, ids=None , delta=1 )
Move specified sub-objects down by delta in container.
manage_move_objects_to_bottom (self, REQUEST, ids=None )
Move specified sub-objects to bottom of container.
manage_move_objects_to_top (self, REQUEST, ids=None )
Move specified sub-objects to top of container.
manage_move_objects_up (self, REQUEST, ids=None , delta=1 )
Move specified sub-objects up by delta in container.
manage_object_workspace (self, ids=() , REQUEST=None )
View management screens
Redirects to the workspace of the first object in
the list.
manage_options (self)
manage_pasteObjects (self, cb_copy_data=None , REQUEST=None )
Paste previously copied objects into the current object.
If calling manage_pasteObjects from python code, pass the result of a
previous call to manage_cutObjects or manage_copyObjects as the first
argument.
Also sends IObjectCopiedEvent and IObjectClonedEvent
or IObjectWillBeMovedEvent and IObjectMovedEvent.
manage_permission (self, permission_to_manage, roles=[] , acquire=[] , REQUEST=[] )
Change the settings for the given permission.
If optional arg acquire is true, then the roles for the permission
are acquired, in addition to the ones specified, otherwise the
permissions are restricted to only the designated roles.
manage_ploneCatalog (self, REQUEST=None )
View management screens
add the damned thing into Plone so it appears in navigation ...
manage_pullFromRemote (self, object_paths, msgs=None , REQUEST=None )
ZSyncer: Use ZSyncer
Interface to retrieving each object from destination
server.
manage_pushToRemote (self, object_paths, msgs=None , REQUEST=None )
ZSyncer: Use ZSyncer
Interface to pushing each object to destination
server.
The 'msgs' argument may be modified in-place, and will be
returned as a list of TextMsg or StatusMsg instances.
manage_rebuildCatalog (self, REQUEST=None )
Change configuration
go and reindex every f**king object in the suite
manage_renameObject (self, id, new_id, REQUEST=None )
Rename a particular sub-object.
manage_renameObjects (self, ids=[] , new_ids=[] , REQUEST=None )
Rename several sub-objects
manage_repair (self, REQUEST=None )
Repair objects in folder ...
manage_replaceObject (self, obj_path, data=None , pkg=None )
ZSyncer: Use ZSyncer
If an object already exists at *obj_path*, delete it.
If *data* is not None, treat is as a picked new object to
add at that path.
If pkg is present, then it's the RPM - upload it
manage_reports (self, REQUEST)
View management screens
manage_role (self, role_to_manage, permissions=[] , REQUEST=[] )
Change the permissions given to the given role.
manage_rpms (self, REQUEST)
View management screens
redirect to mirrors ...
manage_setLocalRoles (self, userid, roles, REQUEST=[] )
Set local roles for a user.
manage_setPermissionMapping (self, permission_names=[] , class_permissions=[] , REQUEST=[] )
Change the permission mapping
manage_set_default_sorting (self, REQUEST, key, reverse)
Set default sorting key and direction.
manage_srpms (self, REQUEST)
View management screens
redirect to mirrors ...
manage_syncDelete (self, object_paths, msgs=None , REQUEST=None )
ZSyncer: Use ZSyncer
Interface to deleting both locally and remotely.
object_paths may be a string or a sequence of strings.
If msgs list is provided, it's modified in-place;
it's also returned.
manage_takeOwnership (self, REQUEST, RESPONSE, recursive=[] )
Take ownership
Take ownership (responsibility) for an object.
If 'recursive' is true, then also take ownership of all sub-objects.
manage_touch (self, object_paths, msgs=None , REQUEST=None )
ZSyncer: Use ZSyncer
Force timestamp of local and remote object(s) to *now*.
A list of StatusMsgs or TextMsgs will be returned.
manage_undo_transactions (self, transaction_info=() , REQUEST=None )
Undo changes
manage_workspace (self, REQUEST)
Dispatch to first interface in manage_options
manage_zmi_logout (self, REQUEST, RESPONSE)
Logout current user
modified (self)
View
Dublin Core Date element - date resource last modified.
moveObject (self, id, position)
moveObjectToPosition (self, id, position, suppress_events=False )
Move specified object to absolute position.
moveObjectsByDelta (self, ids, delta, subset_ids=None , suppress_events=False )
Move specified sub-objects by delta.
moveObjectsDown (self, ids, delta=1 , subset_ids=None )
Move specified sub-objects down by delta in container.
moveObjectsToBottom (self, ids, subset_ids=None )
Move specified sub-objects to bottom of container.
moveObjectsToTop (self, ids, subset_ids=None )
Move specified sub-objects to top of container.
moveObjectsUp (self, ids, delta=1 , subset_ids=None )
Move specified sub-objects up by delta in container.
notifyModified (self)
Take appropriate action after the resource has been modified.
Update creators and modification_date.
notifyWorkflowCreated (self)
Notify the workflow that the object was just created.
objectCount (self)
Access contents information
Returns the number of items in the folder.
objectIds (self, spec=None )
Access contents information
objectIds_d (self, t=None )
Access contents information
objectItems (self, spec=None )
Access contents information
objectItems_d (self, t=None )
objectMap (self)
Access contents information
objectMap_d (self, t=None )
Access contents information
objectValues (self, spec=None )
Access contents information
objectValues_d (self, t=None )
opaqueIds (self)
Return opaque ids (subelements that are contained
using something that is not an ObjectManager).
opaqueItems (self)
Return opaque items (subelements that are contained
using something that is not an ObjectManager).
opaqueValues (self)
Return opaque values (subelements that are contained
using something that is not an ObjectManager).
orderObjects (self, key, reverse=None )
Order sub-objects by key and direction.
owner_info (self)
View management screens
Get ownership info for display
permission_settings (self, permission=None )
Return user-role permission settings.
If 'permission' is passed to the method then only the settings for
'permission' is returned.
permissionsOfRole (self, role)
Returns a role to permission mapping.
portalCatalogMe (self, REQUEST=None )
Modify portal content
stick object in portal catalog (sometimes we just internally catalog
stuff but want navigation etc)
possible_permissions (self)
propdict (self)
propertyDescription (self, id)
Return a description for the given property id
propertyIds (self)
Return a list of property ids.
propertyItems (self)
Return a list of (id,property) tuples.
propertyLabel (self, id)
Return a label for the given property id
propertyMap (self)
Return a tuple of mappings, giving meta-data for properties.
Return copies of the real definitions for security.
propertyValues (self)
Return a list of actual property objects.
publishTraverse (self, REQUEST, name)
This is copied from OFS/Application.py and seems strangely necessary
since Plone 3.0 upgrade ...
raise_standardErrorMessage (self, client=None , REQUEST={} , error_type=None , error_value=None , tb=None , error_tb=None , error_message='' , tagSearch= , error_log_url='' )
reindexObject (self, idxs=[] )
Modify portal content
Reindex the object in the portal catalog.
reindexObjectSecurity (self, skip_self=False )
Modify portal content
Reindex security-related indexes on the object.
repoMirrors (self)
View
allow mirrorlist generation
repsolveYum (self, names)
go to our yum server and solve the deps
resolvesDeps (self, dependencies, arch, REQUEST=None )
Access contents information
return a list of tuples (pkg name, RPMPackage or None) which
resolve the dependencies (package names)
restrictedTraverse (self, path, default= )
rolesOfPermission (self, permission)
Returns a permission to role mapping.
rpmContents (self, pkgpath)
Access contents information
return list of files contained in package (excepting the spec file)
rpmInfo (self, pkgname, epoch=True )
Access contents information
return this machine's nevra tuple of installed package information for
the designated package
this function is primarily to determine build dependencies are
satisfied
the function returns None if not installed
rpmProvidesInfo (self, pkgnames, epoch=True )
Access contents information
return this machine's nevra tuple of installed package information for
packages which provide these packages
rpmSpecPath (self, srpm_path)
Access contents information
returns the full path name of the specfile contained in the SRPM
rpmSpecProvides (self, specfile)
Access contents information
return list of RPM packages specpath builds, n-v-r only
searchObjects (self, REQUEST={'path': ('', 'plone', 'RPMBuilders', '13')} , **kw)
Access contents information
return objects instead of brains
searchResults (self, REQUEST={'path': ('', 'plone', 'RPMBuilders', '13')} , **kw)
use acquisition to call portal_catalog ...
setContributors (self, contributors)
Modify portal content
Set Dublin Core Contributor elements - resource collaborators.
setCreators (self, creators)
Modify portal content
Set Dublin Core Creator elements - resource authors.
setDefaultSorting (self, key, reverse)
Set default sorting key and direction.
setDescription (self, description)
Modify portal content
Set Dublin Core Description element - resource summary.
setEffectiveDate (self, effective_date)
Modify portal content
Set Dublin Core Date element - date resource becomes effective.
setExpirationDate (self, expiration_date)
Modify portal content
Set Dublin Core Date element - date resource expires.
setFormat (self, format)
Modify portal content
Set Dublin Core Format element - resource format.
setId (self, value)
Modify portal content
Sets the object id. - this is the Archetypes::BaseObject implementation ...
setLanguage (self, language)
Modify portal content
Set Dublin Core Language element - resource language.
setModificationDate (self, modification_date=None )
Modify portal content
Set the date when the resource was last modified.
When called without an argument, sets the date to now.
setRights (self, rights)
Modify portal content
Set Dublin Core Rights element - resource copyright.
setSiteManager (self, components)
setSubject (self, subject)
Modify portal content
Set Dublin Core Subject element - resource keywords.
setTitle (self, title)
Modify portal content
Set Dublin Core Title element - resource name.
status (self, wftool=None , wf_var='review_state' )
View
return workflow status
status_colour (self, status, default='white' )
View management screens
Gives a list of status colours for pretty html.
status_descr (self, status)
View management screens
Get description of each status from the config.
status_icon (self, status)
Get icon of each status from the config.
superValues (self, t)
tabs_path_default (self, REQUEST, unquote= )
tabs_path_info (self, script, path, quote= )
this (self)
title_and_id (self)
Return the title if it is not blank and the id otherwise.
If the title is not blank, then the id is included in parens.
title_or_id (self)
Return the title if it is not blank and the id otherwise.
touch (self, object_path, timestamp=DateTime('2012/02/08 07:44:30.534298 US/Eastern') )
ZSyncer: Use ZSyncer
Force timestamp update to the (local) object.
Optional timestamp arg must be a DateTime instance,
and is set to the object's modification_date attribute
IFF it has one.
tpURL (self)
tpValues (self)
Access contents information
Ensures the items don't show up in the left pane.
traverseFromRoot (self, relative_path)
ZSyncer: Use ZSyncer
we need to support non-objectManager containment ...
undoable_transactions (self, first_transaction=None , last_transaction=None , PrincipiaUndoBatchSize=None )
Undo changes
unindexObject (self)
Modify portal content
Unindex the object from the portal catalog.
uninstallPkgs (self, pkgs, REQUEST=None )
delegate package installs to *all* chroots that may wish to install the RPMPackage's
unixGroup (self)
Access contents information
return the gid associated with this running user
unixHome (self)
Access contents information
f**ked permissions ...
unixUser (self)
Access contents information
return passwd tuple associated with this server
this is used for gpg key stuff, home directory stuff etc etc
unrestrictedTraverse (self, path, default= , restricted=False )
Lookup an object by path.
path -- The path to the object. May be a sequence of strings or a slash
separated string. If the path begins with an empty path element
(i.e., an empty string or a slash) then the lookup is performed
from the application root. Otherwise, the lookup is relative to
self. Two dots (..) as a path element indicates an upward traversal
to the acquisition parent.
default -- If provided, this is the value returned if the path cannot
be traversed for any reason (i.e., no object exists at that path or
the object is inaccessible).
restricted -- If false (default) then no security checking is performed.
If true, then all of the objects along the path are validated with
the security machinery. Usually invoked using restrictedTraverse().
upgrade (self)
View management screens
upgrade from 0.5.1 (or earlier?) to current version.
userCanTakeOwnership (self)
userdefined_roles (self)
Return list of user-defined roles.
users_with_local_role (self, role)
cb_dataValid (self)
valid_roles (self)
Return list of valid roles.
valid_property_id (self, id)
valid_roles (self)
Return list of valid roles.
validate_roles (self, roles)
Return true if all given roles are valid.
objectValues (self, spec=None )
Access contents information
virtual_url_path (self)
Return a URL for the object, relative to the site root.
If a virtual host is configured, the URL is a path relative to
the virtual host's root object. Otherwise, it is the physical
path. In either case, the URL does not begin with a slash.
wl_clearLocks (self)
wl_delLock (self, locktoken)
wl_getLock (self, locktoken)
wl_hasLock (self, token, killinvalids=0 )
wl_isLocked (self)
wl_lockItems (self, killinvalids=0 )
wl_lockTokens (self, killinvalids=0 )
wl_lockValues (self, killinvalids=0 )
wl_lockmapping (self, killinvalids=0 , create=0 )
if 'killinvalids' is 1, locks who are no longer valid
will be deleted
wl_setLock (self, locktoken, lock)
workflowHistory (self, workflow)
View management screens
return the worflow history/transition info (latest first)
class RPMReportFolder
(
PortalFolder
)
a container for defining and running reports against all of our
RPM information
Add Folders
Implements
IFolder
IObjectManager
ICopyContainer
INavigation
IAcquirer
IPersistentExtra
IPersistent
IDAVCollection
IDAVResource
IWriteLock
EtagBaseInterface
ITraversable
IPropertyManager
IRoleManager
IPermissionMappingSupport
IItem
ICopySource
IOwned
IUndoSupport
IFindSupport
COPY (self, REQUEST, RESPONSE)
Create a duplicate of the source resource whose state
and behavior match that of the source resource as closely
as possible. Though we may later try to make a copy appear
seamless across namespaces (e.g. from Zope to Apache), COPY
is currently only supported within the Zope namespace.
Contributors (self)
View
Deprecated alias of listContributors.
CreationDate (self, zone=None )
View
Dublin Core Date element - date resource created.
Creator (self)
View
Dublin Core Creator element - resource author.
DELETE (self, REQUEST, RESPONSE)
Delete a collection resource. For collection resources, DELETE
may return either 200 (OK) or 204 (No Content) to indicate total
success, or may return 207 (Multistatus) to indicate partial
success. Note that in Zope a DELETE currently never returns 207.
Date (self, zone=None )
View
Dublin Core Date element - default date.
Description (self)
View
Dublin Core Description element - resource summary.
EffectiveDate (self, zone=None )
View
Dublin Core Date element - date resource becomes effective.
ExpirationDate (self, zone=None )
View
Dublin Core Date element - date resource expires.
Format (self)
View
Dublin Core Format element - resource format.
HEAD (self, REQUEST, RESPONSE)
Retrieve resource information without a response body.
Identifier (self)
View
Dublin Core Identifier element - resource ID.
LOCK (self, REQUEST, RESPONSE)
Lock a resource
Language (self)
View
Dublin Core Language element - resource language.
MKCOL (self, REQUEST, RESPONSE)
Create a new collection resource. If called on an existing
resource, MKCOL must fail with 405 (Method Not Allowed).
MKCOL_handler (self, id, REQUEST=None , RESPONSE=None )
Handle WebDAV MKCOL.
MOVE (self, REQUEST, RESPONSE)
Move a resource to a new location. Though we may later try to
make a move appear seamless across namespaces (e.g. from Zope
to Apache), MOVE is currently only supported within the Zope
namespace.
ModificationDate (self, zone=None )
View
Dublin Core Date element - date resource last modified.
OPTIONS (self, REQUEST, RESPONSE)
Retrieve communication options.
PROPFIND (self, REQUEST, RESPONSE)
Retrieve properties defined on the resource.
PROPPATCH (self, REQUEST, RESPONSE)
Set and/or remove properties defined on the resource.
PUT (self, REQUEST, RESPONSE)
The PUT method has no inherent meaning for collection
resources, though collections are not specifically forbidden
to handle PUT requests. The default response to a PUT request
for collections is 405 (Method Not Allowed).
PUT_factory (self, name, typ, body)
Factory for PUT requests to objects which do not yet exist.
Used by NullResource.PUT.
Returns -- Bare and empty object of the appropriate type (or None, if
we don't know what to do)
ZopeFind (self, obj, obj_ids=None , obj_metatypes=None , obj_searchterm=None , obj_expr=None , obj_mtime=None , obj_mspec=None , obj_permission=None , obj_roles=None , search_sub=0 , REQUEST=None , result=None , pre='' )
Zope Find interface
Publisher (self)
View
Dublin Core Publisher element - resource publisher.
Rights (self)
View
Dublin Core Rights element - resource copyright.
SQLConnectionIDs (container)
Find SQL database connections in the current folder and above
This function returns a list of two-element tuples. The second element
is the connection ID, the first element either its title, or if the
title is empty, its ID.
SecurityCheckPermission (md, permission, object)
Check whether the security context allows the given permission on
the given object.
Arguments:
permission -- A permission name
object -- The object being accessed according to the permission
Subject (self)
View
Dublin Core Subject element - resource keywords.
TRACE (self, REQUEST, RESPONSE)
Return the HTTP message received back to the client as the
entity-body of a 200 (OK) response. This will often usually
be intercepted by the web server in use. If not, the TRACE
request will fail with a 405 (Method Not Allowed), since it
is not often possible to reproduce the HTTP request verbatim
from within the Zope environment.
Title (self)
View
Dublin Core Title element - resource name.
Type (self)
View
Dublin Core Type element - resource type.
UNLOCK (self, REQUEST, RESPONSE)
Remove an existing lock on a resource.
ZQueryIds (self)
ZopeFind (self, obj, obj_ids=None , obj_metatypes=None , obj_searchterm=None , obj_expr=None , obj_mtime=None , obj_mspec=None , obj_permission=None , obj_roles=None , search_sub=0 , REQUEST=None , result=None , pre='' )
Zope Find interface
ZopeFindAndApply (self, obj, obj_ids=None , obj_metatypes=None , obj_searchterm=None , obj_expr=None , obj_mtime=None , obj_mspec=None , obj_permission=None , obj_roles=None , search_sub=0 , REQUEST=None , result=None , pre='' , apply_func=None , apply_path='' )
Zope Find interface and apply
getPortalTypeName (self)
needed for the portal type view mechanism ...
absolute_url (self, relative=0 )
Return the absolute URL of the object.
This a canonical URL based on the object's physical
containment path. It is affected by the virtual host
configuration, if any, and can be used by external
agents, such as a browser, to address the object.
If the relative argument is provided, with a true value, then
the value of virtual_url_path() is returned.
Some Products incorrectly use '/'+absolute_url(1) as an
absolute-path reference. This breaks in certain virtual
hosting situations, and should be changed to use
absolute_url_path() instead.
absolute_url_path (self)
Return the path portion of the absolute URL of the object.
This includes the leading slash, and can be used as an
'absolute-path reference' as defined in RFC 2396.
ac_inherited_permissions (self, all=0 )
access_debug_info (self)
Return debug info.
acquiredRolesAreUsedBy (self, permission)
actions (self)
View
return a list of valid transitions for the object
addCreator (self, creator=None )
Modify portal content
Add creator to Dublin Core creators.
addDTMLDocument (self, id, title='' , file='' , REQUEST=None , submit=None )
Add a DTML Document object with the contents of file. If
'file' is empty, default document text is used.
addDTMLMethod (self, id, title='' , file='' , REQUEST=None , submit=None )
Add a DTML Method object with the contents of file. If
'file' is empty, default document text is used.
additional_buttons (self)
all_meta_types (self)
allowedContentTypes (self)
List type info objects for types which can be added in
this folder.
bobobase_modification_time (self)
cb_dataItems (self)
cb_dataValid (self)
cb_isCopyable (self)
cb_isMoveable (self)
cb_userHasCopyOrMovePermission (self)
chains (self, wftool=None )
View management screens
return workflow chains
changeOwnership (self, user, recursive=0 )
Change the ownership to the given user.
If 'recursive' is true then also take ownership of all sub-objects,
otherwise sub-objects retain their ownership information.
checkIdAvailable (self, id)
contentIds (self, filter=None )
contentItems (self, filter=None )
contentValues (self, filter=None , sort_on=None , reverse=0 )
Able to sort on field.
content_type (self)
WebDAV needs this to do the Right Thing (TM).
created (self)
View
Dublin Core Date element - date resource created.
dav__init (self, request, response)
dav__simpleifhandler (self, request, response, method='PUT' , col=0 , url=None , refresh=0 )
dav__validate (self, object, methodname, REQUEST)
debugInfo (self)
View management screens
return tuple of sorted dict keys, plus the __dict__
decodeFolderFilter (self, encoded)
Parse cookie string for using variables in dtml.
edit (self, title='' , description='' )
Edit the folder title (and possibly other attributes later)
editMetadata (self, title='' , subject=() , description='' , contributors=() , effective_date=None , expiration_date=None , format='text/html' , language='en-US' , rights='' )
Modify portal content
Need to add check for webDAV locked resource for TTW methods.
effective (self)
View
Dublin Core Date element - date resource becomes effective.
emptyContent (self)
initially dupe kupu into setting a blank field
encodeFolderFilter (self, REQUEST)
Parse cookie string for using variables in dtml.
expires (self)
View
Dublin Core Date element - date resource expires.
EditLink (self, object, borrow_lock=0 , skip_data=0 )
Insert the external editor link to an object if appropriate
filtered_manage_options (self, REQUEST=None )
filtered_meta_types (self, user=None )
folderlistingFolderContents (self, contentFilter=None , suppressHiddenFiles=0 )
Calls listFolderContents in protected only by ACI so that
folder_listing can work without the List folder contents permission,
as in CMFDefault.
get (self, key, default=None )
getActionInfo (self, action_chain, check_visibility=0 , check_condition=0 )
Get an Action info mapping specified by a chain of actions.
getActionsFor (self, workflow)
View management screens
return a list of valid transition states
getAttribute (self, name)
Retrieves an attribute value by name.
getAttributeNode (self, name)
Retrieves an Attr node by name or None if
there is no such attribute.
getAttributes (self)
Returns a NamedNodeMap containing the attributes
of this node (if it is an element) or None otherwise.
getBastionDomain (self)
return a BastionDomain - DNS info for anything within a hosting
context
getIdsSubset (self, objs)
Get the ids of only cmf objects (used for moveObjectsByDelta).
getChildNodes (self)
Returns a NodeList that contains all children of this node.
If there are no children, this is a empty NodeList
getContentType (self, fieldname)
kupu get's confused with our non-AT types ...
getDefaultSorting (self)
Get default sorting key and direction.
getElementsByTagName (self, tagname)
Returns a NodeList of all the Elements with a given tag
name in the order in which they would be encountered in a
preorder traversal of the Document tree. Parameter: tagname
The name of the tag to match (* = all tags). Return Value: A new
NodeList object containing all the matched Elements.
getField (self, fieldname)
kupu get's confused with our non-AT types
getFirstChild (self)
The first child of this node. If there is no such node
this returns None
icon (self, relative_to_portal=0 )
Using this method allows the content class
creator to grab icons on the fly instead of using a fixed
attribute on the class.
getIconURL (self)
Get the absolute URL of the icon for the object.
getId (self)
Return the id of the object as a string.
This method should be used in preference to accessing an id attribute
of an object directly. The getId method is public.
getIdsSubset (self, objs)
Get the ids of only cmf objects (used for moveObjectsByDelta).
getLastChild (self)
The last child of this node. If there is no such node
this returns None.
getMetadataHeaders (self)
View
Return RFC-822-style headers.
getNextSibling (self)
The node immediately preceding this node. If
there is no such node, this returns None.
getNodeName (self)
The name of this node, depending on its type
getNodeType (self)
A code representing the type of the node.
getNodeValue (self)
The value of this node, depending on its type
getObjectPosition (self, id)
getOwner (self, info=0 , aq_get= , UnownableOwner=[] , getSecurityManager= )
Get the owner
If a true argument is provided, then only the owner path and id are
returned. Otherwise, the owner object is returned.
getOwnerDocument (self)
The Document object associated with this node.
When this is a document this is None
getOwnerTuple (self)
Return a tuple, (userdb_path, user_id) for the owner.
o Ownership can be acquired, but only from the containment path.
o If unowned, return None.
getParentNode (self)
The parent of this node. All nodes except Document
DocumentFragment and Attr may have a parent
getPath (self)
Access contents information
getPhysicalPath (self)
Get the physical path of the object.
Returns a path (an immutable sequence of strings) that can be used to
access this object again later, for example in a copy/paste operation.
getPhysicalRoot() and getPhysicalPath() are designed to operate
together.
getPortalTypeName (self)
needed for the portal type view mechanism ...
getPreviousSibling (self)
The node immediately preceding this node. If
there is no such node, this returns None.
getProperty (self, id, d=None )
Get the property 'id'.
Returns the optional second argument or None if no such property is
found.
getPropertyType (self, id)
Get the type of property 'id'.
Returns None if no such property exists.
getSiteManager (self)
getSize (self, ob=None )
getStatusOf (self, workflow, wftool=None , variable=None )
View management screens
return the status of ourselves in the context of this workflow (the corresponding
WorkflowTool function is strangely declared private ...
getTagName (self)
The name of the element
getTypeInfo (self)
View
Get the TypeInformation object specified by the portal type.
getURL (self, relative=False )
Access contents information
getWrappedOwner (self)
Get the owner, modestly wrapped in the user folder.
o If the object is not owned, return None.
o If the owner's user database doesn't exist, return Nobody.
o If the owner ID does not exist in the user database, return Nobody.
get_local_roles (self)
get_local_roles_for_userid (self, userid)
get_request_var_or_attr (self, name, default)
get_valid_userids (self)
hasChildNodes (self)
Returns true if the node has any children, false
if it doesn't.
hasObject (self, id)
Indicate whether the folder has an item by ID.
This doesn't try to be more intelligent than _getOb, and doesn't
consult _objects (for performance reasons). The common use case
is to check that an object does *not* exist.
hasProperty (self, id)
Return true if object has a property 'id'.
has_local_roles (self)
http__etag (self, readonly=0 )
http__parseMatchList (self, REQUEST, header='if-match' )
http__processMatchHeaders (self, REQUEST=None )
http__refreshEtag (self)
icon (self, relative_to_portal=0 )
Using this method allows the content class
creator to grab icons on the fly instead of using a fixed
attribute on the class.
indexObject (self)
Modify portal content
Index the object in the portal catalog.
invokeFactory (self, type_name, id, RESPONSE=None , *args, **kw)
Invokes the portal_types tool.
isEffective (self, date)
View
Is the date within the resource's effective range?
items (self)
keys (self)
listContributors (self)
View
Dublin Core Contributor elements - resource collaborators.
listCreators (self)
View
List Dublin Core Creator elements - resource authors.
listDAVObjects (self)
listFolderContents (self, contentFilter=None , suppressHiddenFiles=0 )
Optionally you can suppress "hidden" files, or files that
begin with .
list_imports (self)
manage_CopyContainerAllItems (self, REQUEST)
manage_CopyContainerFirstItem (self, REQUEST)
manage_DAVget (self)
Gets the document source
manage_FTPlist (self, REQUEST)
Directory listing for FTP.
manage_FTPstat (self, REQUEST)
Psuedo stat, used by FTP for directory listings.
manage_access (self, REQUEST, **kw)
Change permissions
Return an interface for making permissions settings.
manage_acquiredPermissions (self, permissions=[] , REQUEST=[] )
Change the permissions that acquire.
addDTMLDocument (self, id, title='' , file='' , REQUEST=None , submit=None )
Add a DTML Document object with the contents of file. If
'file' is empty, default document text is used.
addDTMLMethod (self, id, title='' , file='' , REQUEST=None , submit=None )
Add a DTML Method object with the contents of file. If
'file' is empty, default document text is used.
addDTMLMethod (self, id, title='' , file='' , REQUEST=None , submit=None )
Add a DTML Method object with the contents of file. If
'file' is empty, default document text is used.
manage_addFile (self, id, file='' , title='' , precondition='' , content_type='' , REQUEST=None )
Add a new File object.
Creates a new File object 'id' with the contents of 'file'
manage_addPloneFolder (self, id, title='' , REQUEST=None )
Adds a new PloneFolder.
manage_addImage (self, id, file, title='' , precondition='' , content_type='' , REQUEST=None )
Add a new Image object.
Creates a new Image object 'id' with the contents of 'file'.
manage_addLocalRoles (self, userid, roles, REQUEST=[] )
Set local roles for a user.
manage_addOrderedFolder (self, id, title='' , createPublic=0 , createUserF=0 , REQUEST=None )
Add a new ordered Folder object with id *id*.
If the 'createPublic' and 'createUserF' parameters are set to any true
value, an 'index_html' and a 'UserFolder' objects are created respectively
in the new folder.
manage_addPloneFolder (self, id, title='' , REQUEST=None )
Adds a new PloneFolder.
manage_addProperty (self, id, value, type, REQUEST=None )
Add a new property via the web.
Sets a new property with the given id, type, and value.
manage_addSiteRoot (self, title='' , base='' , path='' , REQUEST=None , **ignored)
Add a SiteRoot to a container.
manage_addUserFolder (self, dtself=None , REQUEST=None , **ignored)
manage_afterAdd (self, item, container)
manage_afterClone (self, item)
manage_beforeDelete (self, item, container)
manage_changeOwnership (self, userid, recursive=0 , REQUEST=None )
Take ownership
go change the owner to specified user (if found)
manage_changeOwnershipType (self, explicit=[] , RESPONSE=[] , REQUEST=[] )
Take ownership
Change the type (implicit or explicit) of ownership.
manage_changePermissions (self, REQUEST)
Change permissions
Change all permissions settings, called by management screen.
manage_changeProperties (self, REQUEST=None , **kw)
Change existing object properties.
Change object properties by passing either a REQUEST object or
name=value parameters
manage_changePropertyTypes (self, old_ids, props, REQUEST=None )
Replace one set of properties with another
Delete all properties that have ids in old_ids, then add a
property for each item in props. Each item has a new_id,
new_value, and new_type. The type of new_value should match
new_type.
manage_change_status (self, wfid, action, REQUEST=None )
Manage properties
do a workflow transition from the ZMI
manage_clone (self, ob, id, REQUEST=None )
Clone an object, creating a new object with the given id.
manage_copyObjects (self, ids=None , REQUEST=None , RESPONSE=None )
Copy or Move
Put a reference to the objects named in ids in the clip board
manage_cutObjects (self, ids=None , REQUEST=None )
Put a reference to the objects named in ids in the clip board
manage_debugDelAttrs (self, attrs, REQUEST=None )
Change configuration
remove attributes from object
manage_defined_roles (self, submit=None , REQUEST=None )
Called by management screen.
manage_delLocalRoles (self, userids, REQUEST=[] )
Remove all local roles for a user.
manage_delObjects (self, ids=[] , REQUEST=None )
We need to enforce security.
manage_delProperties (self, ids=None , REQUEST=None )
Delete one or more properties specified by 'ids'.
manage_editMetadata (self, title, subject, description, contributors, effective_date, expiration_date, format, language, rights, REQUEST)
Modify portal content
Update metadata from the ZMI.
manage_editProperties (self, REQUEST)
Edit object properties via the web.
The purpose of this method is to change all property values,
even those not listed in REQUEST; otherwise checkboxes that
get turned off will be ignored. Use manage_changeProperties()
instead for most situations.
manage_editRoles (self, REQUEST, acl_type='A' , acl_roles=[] )
manage_editedDialog (self, REQUEST, **args)
manage_exportObject (self, id='' , download=None , toxml=None , RESPONSE=None , REQUEST=None )
Exports an object to a file and returns that file.
manage_fixupOwnershipAfterAdd (self)
manage_form_title (self, *args, **kw)
manage_getPermissionMapping (self)
Return the permission mapping for the object
This is a list of dictionaries with:
permission_name -- The name of the native object permission
class_permission -- The class permission the permission is
mapped to.
manage_getUserRolesAndPermissions (self, user_id)
Used for permission/role reporting for a given user_id.
Returns a dict mapping
'user_defined_in' -> path where the user account is defined
'roles' -> global roles,
'roles_in_context' -> roles in context of the current object,
'allowed_permissions' -> permissions allowed for the user,
'disallowed_permissions' -> all other permissions
manage_hasId (self, REQUEST)
check if the folder has an object with REQUEST['id']
manage_importObject (self, upload_file='' , REQUEST=None , set_owner=1 )
import an object from a local file system
manage_moveObjectDown (self, id, REQUEST=None )
move indicated object down one in the order
manage_moveObjectToBottom (self, id, REQUEST=None )
move indicated object to bottom of the order
manage_moveObjectToTop (self, id, REQUEST=None )
move indicated object to top of the order
manage_moveObjectUp (self, id, REQUEST=None )
move indicated object up one the order
manage_move_objects_down (self, REQUEST, ids=None , delta=1 )
Move specified sub-objects down by delta in container.
manage_move_objects_to_bottom (self, REQUEST, ids=None )
Move specified sub-objects to bottom of container.
manage_move_objects_to_top (self, REQUEST, ids=None )
Move specified sub-objects to top of container.
manage_move_objects_up (self, REQUEST, ids=None , delta=1 )
Move specified sub-objects up by delta in container.
manage_pasteObjects (self, cb_copy_data=None , REQUEST=None )
Paste previously copied objects into the current object.
If calling manage_pasteObjects from python code, pass the result of a
previous call to manage_cutObjects or manage_copyObjects as the first
argument.
Also sends IObjectCopiedEvent and IObjectClonedEvent
or IObjectWillBeMovedEvent and IObjectMovedEvent.
manage_permission (self, permission_to_manage, roles=[] , acquire=[] , REQUEST=[] )
Change the settings for the given permission.
If optional arg acquire is true, then the roles for the permission
are acquired, in addition to the ones specified, otherwise the
permissions are restricted to only the designated roles.
manage_ploneCatalog (self, REQUEST=None )
View management screens
add the damned thing into Plone so it appears in navigation ...
manage_renameObject (self, id, new_id, REQUEST=None )
Rename a particular sub-object.
manage_renameObjects (self, ids=[] , new_ids=[] , REQUEST=None )
Rename several sub-objects
manage_repair (self, REQUEST=None )
Repair objects in folder ...
manage_role (self, role_to_manage, permissions=[] , REQUEST=[] )
Change the permissions given to the given role.
manage_setLocalRoles (self, userid, roles, REQUEST=[] )
Set local roles for a user.
manage_setPermissionMapping (self, permission_names=[] , class_permissions=[] , REQUEST=[] )
Change the permission mapping
manage_set_default_sorting (self, REQUEST, key, reverse)
Set default sorting key and direction.
manage_takeOwnership (self, REQUEST, RESPONSE, recursive=[] )
Take ownership
Take ownership (responsibility) for an object.
If 'recursive' is true, then also take ownership of all sub-objects.
manage_undo_transactions (self, transaction_info=() , REQUEST=None )
Undo changes
manage_workspace (self, REQUEST)
Dispatch to first interface in manage_options
manage_zmi_logout (self, REQUEST, RESPONSE)
Logout current user
modified (self)
View
Dublin Core Date element - date resource last modified.
moveObject (self, id, position)
moveObjectToPosition (self, id, position, suppress_events=False )
Move specified object to absolute position.
moveObjectsByDelta (self, ids, delta, subset_ids=None , suppress_events=False )
Move specified sub-objects by delta.
moveObjectsDown (self, ids, delta=1 , subset_ids=None )
Move specified sub-objects down by delta in container.
moveObjectsToBottom (self, ids, subset_ids=None )
Move specified sub-objects to bottom of container.
moveObjectsToTop (self, ids, subset_ids=None )
Move specified sub-objects to top of container.
moveObjectsUp (self, ids, delta=1 , subset_ids=None )
Move specified sub-objects up by delta in container.
notifyModified (self)
Take appropriate action after the resource has been modified.
Update creators and modification_date.
notifyWorkflowCreated (self)
Notify the workflow that the object was just created.
objectIds (self, spec=None )
objectIds_d (self, t=None )
objectItems (self, spec=None )
objectItems_d (self, t=None )
objectMap (self)
objectMap_d (self, t=None )
objectValues (self, spec=None )
objectValues_d (self, t=None )
opaqueIds (self)
Return opaque ids (subelements that are contained
using something that is not an ObjectManager).
opaqueItems (self)
Return opaque items (subelements that are contained
using something that is not an ObjectManager).
opaqueValues (self)
Return opaque values (subelements that are contained
using something that is not an ObjectManager).
orderObjects (self, key, reverse=None )
Order sub-objects by key and direction.
owner_info (self)
View management screens
Get ownership info for display
permission_settings (self, permission=None )
Return user-role permission settings.
If 'permission' is passed to the method then only the settings for
'permission' is returned.
permissionsOfRole (self, role)
Returns a role to permission mapping.
portalCatalogMe (self, REQUEST=None )
Modify portal content
stick object in portal catalog (sometimes we just internally catalog
stuff but want navigation etc)
possible_permissions (self)
propdict (self)
propertyDescription (self, id)
Return a description for the given property id
propertyIds (self)
Return a list of property ids.
propertyItems (self)
Return a list of (id,property) tuples.
propertyLabel (self, id)
Return a label for the given property id
propertyMap (self)
Return a tuple of mappings, giving meta-data for properties.
Return copies of the real definitions for security.
propertyValues (self)
Return a list of actual property objects.
publishTraverse (self, REQUEST, name)
This is copied from OFS/Application.py and seems strangely necessary
since Plone 3.0 upgrade ...
raise_standardErrorMessage (self, client=None , REQUEST={} , error_type=None , error_value=None , tb=None , error_tb=None , error_message='' , tagSearch= , error_log_url='' )
reindexObject (self, idxs=[] )
Modify portal content
Reindex the object in the portal catalog.
reindexObjectSecurity (self, skip_self=False )
Modify portal content
Reindex security-related indexes on the object.
restrictedTraverse (self, path, default= )
rolesOfPermission (self, permission)
Returns a permission to role mapping.
setContributors (self, contributors)
Modify portal content
Set Dublin Core Contributor elements - resource collaborators.
setCreators (self, creators)
Modify portal content
Set Dublin Core Creator elements - resource authors.
setDefaultSorting (self, key, reverse)
Set default sorting key and direction.
setDescription (self, description)
Modify portal content
Set Dublin Core Description element - resource summary.
setEffectiveDate (self, effective_date)
Modify portal content
Set Dublin Core Date element - date resource becomes effective.
setExpirationDate (self, expiration_date)
Modify portal content
Set Dublin Core Date element - date resource expires.
setFormat (self, format)
Modify portal content
Set Dublin Core Format element - resource format.
setId (self, value)
Modify portal content
Sets the object id. - this is the Archetypes::BaseObject implementation ...
setLanguage (self, language)
Modify portal content
Set Dublin Core Language element - resource language.
setModificationDate (self, modification_date=None )
Modify portal content
Set the date when the resource was last modified.
When called without an argument, sets the date to now.
setRights (self, rights)
Modify portal content
Set Dublin Core Rights element - resource copyright.
setSiteManager (self, components)
setSubject (self, subject)
Modify portal content
Set Dublin Core Subject element - resource keywords.
setTitle (self, title)
Modify portal content
Set Dublin Core Title element - resource name.
status (self, wftool=None , wf_var='review_state' )
View
return workflow status
superValues (self, t)
tabs_path_default (self, REQUEST, unquote= )
tabs_path_info (self, script, path, quote= )
this (self)
title_and_id (self)
Return the title if it is not blank and the id otherwise.
If the title is not blank, then the id is included in parens.
title_or_id (self)
Return the title if it is not blank and the id otherwise.
tpURL (self)
tpValues (self)
undoable_transactions (self, first_transaction=None , last_transaction=None , PrincipiaUndoBatchSize=None )
Undo changes
unindexObject (self)
Modify portal content
Unindex the object from the portal catalog.
unrestrictedTraverse (self, path, default= , restricted=False )
Lookup an object by path.
path -- The path to the object. May be a sequence of strings or a slash
separated string. If the path begins with an empty path element
(i.e., an empty string or a slash) then the lookup is performed
from the application root. Otherwise, the lookup is relative to
self. Two dots (..) as a path element indicates an upward traversal
to the acquisition parent.
default -- If provided, this is the value returned if the path cannot
be traversed for any reason (i.e., no object exists at that path or
the object is inaccessible).
restricted -- If false (default) then no security checking is performed.
If true, then all of the objects along the path are validated with
the security machinery. Usually invoked using restrictedTraverse().
userCanTakeOwnership (self)
userdefined_roles (self)
Return list of user-defined roles.
users_with_local_role (self, role)
cb_dataValid (self)
valid_roles (self)
Return list of valid roles.
valid_property_id (self, id)
valid_roles (self)
Return list of valid roles.
validate_roles (self, roles)
Return true if all given roles are valid.
values (self)
virtual_url_path (self)
Return a URL for the object, relative to the site root.
If a virtual host is configured, the URL is a path relative to
the virtual host's root object. Otherwise, it is the physical
path. In either case, the URL does not begin with a slash.
wl_clearLocks (self)
wl_delLock (self, locktoken)
wl_getLock (self, locktoken)
wl_hasLock (self, token, killinvalids=0 )
wl_isLocked (self)
wl_lockItems (self, killinvalids=0 )
wl_lockTokens (self, killinvalids=0 )
wl_lockValues (self, killinvalids=0 )
wl_lockmapping (self, killinvalids=0 , create=0 )
if 'killinvalids' is 1, locks who are no longer valid
will be deleted
wl_setLock (self, locktoken, lock)
workflowHistory (self, workflow)
View management screens
return the worflow history/transition info (latest first)
Functions
addRPMBuilder
(ob, event)
getSecurityManager
()
Get a security manager, for the current thread.
getToolByName
(obj, name, default=[] )
Get the tool, 'toolname', by acquiring it.
o Application code should use this method, rather than simply
acquiring the tool by name, to ease forward migration (e.g.,
to Zope3).
implements
(*interfaces)
Declare interfaces implemented by instances of a class
This function is called in a class definition.
The arguments are one or more interfaces or interface
specifications (IDeclaration objects).
The interfaces given (including the interfaces in the
specifications) are added to any interfaces previously
declared.
Previous declarations include declarations for base classes
unless implementsOnly was used.
This function is provided for convenience. It provides a more
convenient way to call classImplements. For example::
implements(I1)
is equivalent to calling::
classImplements(C, I1)
after the class has been created.
Consider the following example::
>>> from zope.interface import Interface
>>> class IA1(Interface): pass
...
>>> class IA2(Interface): pass
...
>>> class IB(Interface): pass
...
>>> class IC(Interface): pass
...
>>> class A(object):
... implements(IA1, IA2)
>>> class B(object):
... implements(IB)
>>> class C(A, B):
... implements(IC)
>>> ob = C()
>>> int(IA1 in providedBy(ob))
1
>>> int(IA2 in providedBy(ob))
1
>>> int(IB in providedBy(ob))
1
>>> int(IC in providedBy(ob))
1
Instances of ``C`` implement ``I1``, ``I2``, and whatever interfaces
instances of ``A`` and ``B`` implement.
manage_addRPMBuilder
(self, id='RPMBuilder' , title='' , rpmdbtree='/usr/src/redhat' , REQUEST=None )
set up a builder with a default tree path
February
Mo Tu We Th Fr Sa Su
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29
View API Docs
Subscribe Now and get BastionLinux™
for as little as GBP 29.99 per month...