Back to index

plone3  3.1.7
Public Member Functions | Static Public Attributes | Static Private Attributes
ATContentTypes.content.link.ATLink Class Reference
Inheritance diagram for ATContentTypes.content.link.ATLink:
Inheritance graph
[legend]
Collaboration diagram for ATContentTypes.content.link.ATLink:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def setRemoteUrl
def remote_url
def cmf_edit
def getRemoteUrl

Static Public Attributes

 schema = ATLinkSchema
string portal_type = 'Link'
string archetype_name = 'Link'
tuple assocMimetypes = ()
tuple assocFileExt = ('link', 'url', )
tuple cmf_edit_kws = ('remote_url', )
tuple security = ClassSecurityInfo()

Static Private Attributes

dictionary _atct_newTypeFor = {'portal_type' : 'CMF Link', 'meta_type' : 'Link'}
 __implements__ = ATCTContent.__implements__,IATLink

Detailed Description

A link to an internal or external resource.

Definition at line 62 of file link.py.


Member Function Documentation

def ATContentTypes.content.link.ATLink.cmf_edit (   self,
  remote_url = None,
  kwargs 
)

Definition at line 96 of file link.py.

00096 
00097     def cmf_edit(self, remote_url=None, **kwargs):
00098         if not remote_url:
00099             remote_url = kwargs.get('remote_url', None)
00100         self.update(remoteUrl = remote_url, **kwargs)

Sanitize output

Definition at line 102 of file link.py.

00102 
00103     def getRemoteUrl(self):
00104         """Sanitize output
00105         """
00106         value = self.Schema()['remoteUrl'].get(self)
00107         if not value: value = '' # ensure we have a string
00108         return quote(value, safe='?$#@/:=+;$,&')
00109 
00110 registerATCT(ATLink, PROJECTNAME)

Here is the call graph for this function:

Here is the caller graph for this function:

CMF compatibility method

Definition at line 90 of file link.py.

00090 
00091     def remote_url(self):
00092         """CMF compatibility method
00093         """
00094         return self.getRemoteUrl()

Here is the call graph for this function:

def ATContentTypes.content.link.ATLink.setRemoteUrl (   self,
  value,
  kwargs 
)
remute url mutator

Use urlparse to sanify the url
Also see http://dev.plone.org/plone/ticket/3296

Definition at line 79 of file link.py.

00079 
00080     def setRemoteUrl(self, value, **kwargs):
00081         """remute url mutator
00082 
00083         Use urlparse to sanify the url
00084         Also see http://dev.plone.org/plone/ticket/3296
00085         """
00086         if value:
00087             value = urlparse.urlunparse(urlparse.urlparse(value))
00088         self.getField('remoteUrl').set(self, value, **kwargs)

Here is the call graph for this function:


Member Data Documentation

ATContentTypes.content.link.ATLink.__implements__ = ATCTContent.__implements__,IATLink [static, private]

Definition at line 74 of file link.py.

dictionary ATContentTypes.content.link.ATLink._atct_newTypeFor = {'portal_type' : 'CMF Link', 'meta_type' : 'Link'} [static, private]

Definition at line 69 of file link.py.

Definition at line 68 of file link.py.

tuple ATContentTypes.content.link.ATLink.assocFileExt = ('link', 'url', ) [static]

Definition at line 71 of file link.py.

Definition at line 70 of file link.py.

Definition at line 72 of file link.py.

Definition at line 67 of file link.py.

Definition at line 65 of file link.py.

tuple ATContentTypes.content.link.ATLink.security = ClassSecurityInfo() [static]

Definition at line 76 of file link.py.


The documentation for this class was generated from the following file: