Make handles immutable

- incoming handle IDs are always ignored in insert_handle, since it
should be a new handle
- to update a handle, the user must provide the same id, type, url, and
hid, and they must match the DB record (this might need rethinking,
another option is to just ignore those fields and only require the hid)
- the id, type, url and hid cannot be altered on a persist_handle call
- throw an error if the persist operation fails due to non-matching
record
- made some changes in initialize_handle to properly set the url and
type, given they're implicitly determined in the method
This needs more thought. It is an incomplete feature, but I don’t want to lose the placeholder.

On Aug 7, 2014, at 12:03 PM, MrCreosote <notifications@github.com> wrote:

> In lib/Bio/KBase/AbstractHandle/AbstractHandleImpl.pm:
> 
> >  
> > -        $h2->{id} = $ref->{data}->{id} or die "could not find node id in $json_node";
> > -	DEBUG "Calling persist_handle from initialize_handle.";
> > +	$h2->{url} = $default_shock; # needs to match actual shock instance used
> > +	$h2->{id} = $ref->{data}->{id} or die "could not find node id in $json_node";
> > +	$h2->{type} = "shock"; # it's def. a shock handle
> Same response - the localize_handle effectively ignores the type provided by initialize_handle and always creates a handle of type 'shock'.
> 
> —
> Reply to this email directly or view it on GitHub.
>