Package Products :: Package ZenUtils :: Package guid :: Module interfaces
[hide private]
[frames] | no frames]

Source Code for Module Products.ZenUtils.guid.interfaces

 1  ############################################################################## 
 2  #  
 3  # Copyright (C) Zenoss, Inc. 2010, all rights reserved. 
 4  #  
 5  # This content is made available according to terms specified in 
 6  # License.zenoss under the directory where your Zenoss product is installed. 
 7  #  
 8  ############################################################################## 
 9   
10   
11  from zope.interface import Interface, Attribute 
12  from zope.component.interfaces import IObjectEvent 
13   
14   
15 -class IGloballyIdentifiable(Interface):
16 """ 17 An object with a GUID. 18 """
19 - def getPrimaryUrlPath():
20 """ 21 The path under which the object can be found. 22 """
23 24
25 -class IGlobalIdentifier(Interface):
26 """ 27 Adapter that manages GUID for objects. 28 """
29 - def __init__(context):
30 """ 31 Constructor 32 """
33 34 guid = Attribute("Globally unique identifier") 35
36 - def getGUID():
37 """ 38 Gets the GUID associated with this object. 39 """
40 - def setGUID(value):
41 """ 42 Sets the GUID for this object. 43 """
44 - def create(force):
45 """ 46 Creates a new GUID and applies it to this object. 47 """
48
49 -class IGUIDManager(Interface):
50 """ 51 A utility that can register objects as having guids and look up objects by 52 guid. 53 """
54 - def getPath(guid):
55 """ 56 Return the path associated with a guid. 57 """
58 - def getObject(guid):
59 """ 60 Return the object associated with a guid. 61 """
62 - def register(object):
63 """ 64 Store the guid-path mapping in the reference table. 65 """
66
67 -class IGUIDEvent(IObjectEvent):
68 pass
69