Package ZenModel :: Module Linkable
[hide private]
[frames] | no frames]

Source Code for Module ZenModel.Linkable

 1  ########################################################################### 
 2  # 
 3  # This program is part of Zenoss Core, an open source monitoring platform. 
 4  # Copyright (C) 2007, Zenoss Inc. 
 5  # 
 6  # This program is free software; you can redistribute it and/or modify it 
 7  # under the terms of the GNU General Public License version 2 as published by 
 8  # the Free Software Foundation. 
 9  # 
10  # For complete information please visit: http://www.zenoss.com/oss/ 
11  # 
12  ########################################################################### 
13   
14  from Globals import InitializeClass 
15  from ZenModelRM import ZenModelRM 
16  from Products.ZenRelations.RelSchema import * 
17   
18   
19 -class Linkable:
20 """ A mixin allowing an object to be the 21 endpoint of a Link object. 22 """ 23 24 meta_type = "Linkable" 25 26 _relations = ( 27 ("links", ToMany(ToMany, "Products.ZenModel.Link", "endpoints")), 28 ) 29
30 - def getEndpointName(self):
31 """ Returns a unique endpoint name """ 32 raise NotImplementedError
33
34 - def isInLocation(self, context):
35 """ Checks if Linkable is in given Location """ 36 raise NotImplementedError
37
43 44 45 InitializeClass(Linkable) 46