5 // Created by Claudio Bisegni on 14/06/07.
6 // Copyright 2007 INFN - National Institute of Nuclear Physics. All rights reserved.
8 // Is the identification of a cell in he afs cell database
10 #import <Cocoa/Cocoa.h>
13 @interface DBCellElement
: NSObject
{
14 BOOL userDefaultForToken
;
17 NSString
*cellComment
;
18 NSMutableArray
*ipCellList
;
37 @abstract Set the cel name
38 @discussion Release the old cell name andretain the new one
39 @param name - Name of the cell
41 -(void) setCellName
:(NSString
*)name
;
45 @abstract Return the cell name
46 @discussion Return the cell name
47 @result Name of the cell
49 -(NSString
*) getCellName
;
52 @method setCellComment
53 @abstract Set the comment of the cell
54 @discussion Release the old cell comment and retain the new one
55 @param comment - Comment of the cell
57 -(void) setCellComment
:(NSString
*)comment
;
60 @method getCellComment
61 @abstract Get the comment of the cell
62 @discussion Get the comment of the cell
63 @result comment of the cell
66 -(NSString
*) getCellComment
;
69 @method setUserDefaultForToken
70 @abstract Set the userde fault for tokens for the cell
71 @discussion If this cell is a cell used by user this flag will be true,
72 for multi cell authentication will be more cell with this flag on true.
73 @param isDefault - true if the this cell is default which the user want to ge token for
76 -(void) setUserDefaultForToken
:(BOOL
)isDefault
;
80 @abstract Return the user request for token flag
82 @result if true this cell is used to get the tokens
84 -(BOOL
) userDefaultForToken
;
86 @method setUserDefaultCell
87 @abstract set the user default cell state
89 @result set this cell as default user cell
91 -(void) setUserDefaultCell
:(BOOL
)isDefault
;
93 @method userDefaultForCell
94 @abstract Return the user default cell state
96 @result is true if this cell is the default cell
98 -(BOOL
) userDefaultForCell
;
101 @abstract Add an ipcell description to this cell
102 @discussion Add a new IpCell class to this cell to specify the server ip
103 @param ip - CellIP class representing the ip of one server of the cell
105 -(void) addIpToCell
:(CellIp
*)ip
;
109 @abstract Return the array containing all ip for thi cell
111 @result The array containing all the cell ip decription class
113 -(NSMutableArray
*) getIp
;
117 @abstract Return the description of this cell
118 @discussion The description is the same stile used in CellServDB file(for a single cell)
119 so calling thi method for all cell will be reconstructed the entire afs configuration file for CellSerDB
120 @result The string description of the cell with all the ip
122 -(NSString
*) description
;
126 @abstract Compare this object with anoter of the same type
127 @discussion Compare this object with the ine passed to the function
128 @param anObject - An object to compare with this.
129 @result true if the two object are the same.
131 - (BOOL
)isEqual
:(id
)anObject
;
133 - (BOOL
)isEqualToString
:(NSString
*)aString
;