On 21 September 2012 10:38, Giedrius Graževičius <[email protected]> wrote:
> > ~~~
> > 2. Why is ContentDescription and the describeXxx() method required?
> > Wouldn't an annotation do? eg:
>
> I considered an annotation, but this way we are limiting what can be
> stored. For example we want to allow storing Adobe Acrobat
> (application/pdf) and Microsoft Word (application/msword) documents,
> but with static annotation there is no way of doing it. Though I
> agree, that the filename can be inferred from attribute name + mime
> type, for example by using standard Java mechanism (.mime.type files).
>
>
I must be missing something. In:
@Blob(mimeType="application/pdf")
public byte[] getCurriculumVitae() { ... }
public void setCurriculumVitae(byte[] cv) { ... }
we have the mime type there. What other info is it that we need?
> > 3. per the "pending problem" you've listed (as to knowing whether or
> not a
> > blob property is populated), one option might be to do something similar
> to
> > the @PersistedTitle annotation that I've proposed in a different thread;
> in
> > other words to have Isis automatically maintain a separate "flag"
> property.
>
> Would user add the attribute or would it be silently generated by
> Isis? In any way, that's probably the way to go.
>
> The former. It's a bit hacky, I know, but it has the benefit of being
supported by all object stores, and degrades gracefully for viewers that
don't support it.
Dan
> Giedrius.
>