Interface Updateable

  • All Superinterfaces:
    EntityProvider, Resolvable
    All Known Subinterfaces:
    CRUDable, RESTful, Saveable

    public interface Updateable
    extends Resolvable
    This entity type can be updated (this is the U in CRUD), the current user id should be used for permissions checking in most cases
    This is one of the capability extensions for the EntityProvider interface
    Author:
    Aaron Zeckoski (aaron@caret.cam.ac.uk)
    • Method Detail

      • updateEntity

        void updateEntity​(EntityReference ref,
                          Object entity,
                          Map<String,​Object> params)
        Update an existing entity, the object should contain the data needed to update the entity or this will fail
        Typically the entity will be retrieved first using Resolvable.getEntity(EntityReference) and the the fields will be updated and it will be passed into this method
        Parameters:
        ref - the parsed reference object which uniquely represents this entity
        entity - an entity object
        params - (optional) incoming set of parameters which may be used to send data specific to this request, may be null
        Throws:
        IllegalArgumentException - if the entity could not be updated because of missing or invalid data or could not find entity to update
        SecurityException - if permissions prevented this entity from being updated
        IllegalStateException - for all other failures