|
Re: ResourceSet default save options? [message #855216 is a reply to message #855183] |
Tue, 24 April 2012 16:03 |
Ed Merks Messages: 33140 Registered: July 2009 |
Senior Member |
|
|
Bryan,
Comments below.
On 24/04/2012 5:36 PM, Bryan Hunt wrote:
> Hi Ed,
>
> I'm working on some code that will load/save EMF models across HTTP
> and I need to support user authentication. I've added the capability
> to specify the authentication information in load/save options, but it
> seems rather inconvenient for clients to have to know to specify the
> authentication information on each call to load and save.
> Additionally, demand loads must get the authentication information
> from the default load options in the ResourceSet. It seems a natural
> extension to put the authentication information in the ResourceSet for
> saves as well.
The only reason it's there for load is because things get loaded on
demand, i.e., Save on the other hand is always an explicit operation
performed on the resource so the client will always have to be aware to
pass in any options that are needed.
>
> Since there are no default save options in the ResourceSet, is there a
> technical reason for not having them, or has there never been a need
> to have them?
Even if we have them, a client would need to know to fetch them and use
them in conjunction with whatever other options they need.
> Would my use-case be a good argument for adding default save options
> to the ResourceSet?
No. :-P It's at best a convenient place. More convenient for the
client if they're in the default save options of the resource itself.
The factory could set them.
>
> I might be able to contribute this if the solution is fairly straight
> forward.
No matter where we put them, other than the resource's own save options,
the client has to know to use them when they call save...
>
> Bryan
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03347 seconds