[Dev] Uses of <cloudAlias>?
Morgen Sagen
morgen at osafoundation.org
Thu Jun 2 15:35:39 PDT 2005
On Jun 2, 2005, at 3:14 PM, Phillip J. Eby wrote:
> At 02:43 PM 6/2/2005 -0700, Morgen Sagen wrote:
>
>> I do have a situation in which I want to override an endpoint that
>> normally would get inherited; ContentItem's sharing cloud has a
>> "displayName" endpoint -- however for ItemCollection (which
>> subkinds ContentItem) I don't want to have a displayName
>> endpoint. My fix for this was to define a displayName endpoint on
>> ItemCollection's sharing cloud but set that endpoint's
>> includePolicy to "none". Does that work with your syntax?
>>
>
> If we have a schema.Endpoint type, such that you can set any
> attributes on it that you want, then sure, you'd just add that
> endpoint to the cloud. (Remember that using attributes would be
> just shorthand for defining an Endpoint.)
>
> Of course, whether that actually *does* what you're trying to do,
> I'm not sure. Have you actually tried that in a parcel.xml yet?
> If it works there, then I can almost certainly make it work in the
> Python syntax.
>
> I was originally planning to hold off on creating a schema.Endpoint
> at first, since I hadn't yet seen a place where it would need to be
> used, but if you have this usecase then I guess I'll need to have
> it in the first version. Alternatively, we could use a keyword
> like "exclude", e.g.
>
> sharing = schema.Cloud(exclude=[displayName], ...)
>
> in order to define empty endpoints, especially if this is expected
> to be a common use case.
It's probably not a common thing to do, but I do need it in this one
case at least. I think "exclude=" is an ok way to specify this.
Another include policy that exists (although we don't use it) is
"byMethod" which takes a "method" attribute. (See http://o11n.org/
docs/current/api/repository.schema.Cloud.Cloud-class.html#getItems )
Since we don't actually use this, perhaps that's a sign we don't need
to support it; we could also simplify the problem by always having
byMethod call a certain method name, passing in the current cloudAlias.
More information about the Dev
mailing list