add new setContent method to ContentStore
lmtoo opened this issue · 1 comments
ContentStore's setContent only support inputStream ,but can't get a WritableResource or OutputStream to write content,.
when I package a zip file , I have to wirte this to a file somewhere , and then read this file as Inputstream pass it to setContent ,
but when this zip file is too big , this will limit by local disk.
this method can defined like this :
WritableResource setContent(S property)
or OutputStream setContent(S property)
Hi @lmtoo,
I think you can actually do this today @lmtoo. ContentStore
inherits from AssociativeStore
that provides a Resource getResource(S entity)
method. As long as an association exists this will return a WriteableResource
. If an association doesn't yet exist you can create a resource with Resource Store.getResource(SID id)
and associate it with AssociativeStore.associate(S entity, SID id)
.
Or am I missing something?