equal
deleted
inserted
replaced
148 entity: the entity from which to extract the key values |
148 entity: the entity from which to extract the key values |
149 """ |
149 """ |
150 |
150 |
151 return [entity.scope_path, entity.link_id] |
151 return [entity.scope_path, entity.link_id] |
152 |
152 |
153 def getSuffixValues(self, entity): |
|
154 """Returns an array with the public values of the Key Fields. |
|
155 |
|
156 Defaults to getKeyValues |
|
157 If any of the Key Fields should not be made public, this method |
|
158 should return their public counterparts instead. |
|
159 |
|
160 Args: |
|
161 entity: the entity for which to construct the suffix |
|
162 """ |
|
163 |
|
164 return self.getKeyValues(entity) |
|
165 |
|
166 def getKeyValuesFromFields(self, fields): |
153 def getKeyValuesFromFields(self, fields): |
167 """Extracts the key values from a dict and returns them. |
154 """Extracts the key values from a dict and returns them. |
168 |
155 |
169 The default implementation uses the scope and link_id as key values. |
156 The default implementation uses the scope and link_id as key values. |
170 |
157 |
190 """ |
177 """ |
191 |
178 |
192 if not entity: |
179 if not entity: |
193 return None |
180 return None |
194 |
181 |
195 key_values = self.getSuffixValues(entity) |
182 key_values = self.getKeyValues(entity) |
196 suffix = '/'.join(key_values) |
183 suffix = '/'.join(key_values) |
197 |
184 |
198 return suffix |
185 return suffix |
199 |
186 |
200 def getKeyFieldsFromDict(self, dictionary): |
187 def getKeyFieldsFromDict(self, dictionary): |