Class: AgentCorporateEntity

Inherits:
Sequel::Model
  • Object
show all
Includes:
ASModel, AgentManager::Mixin, ExternalDocuments, Notes, Publishable, RecordableCataloging, RightsStatements
Defined in:
backend/app/model/agent_corporate_entity.rb

Instance Method Summary (collapse)

Methods included from RightsStatements

included

Methods included from Publishable

db_value_for, included

Methods included from Notes

included, #persistent_id_context, #update_from_json

Methods included from RecordableCataloging

included

Methods included from AgentManager::Mixin

#before_save, included, #linked_agent_roles, #update_from_json, #validate

Methods included from ExternalDocuments

included

Methods included from ASModel

all_models, included, update_publish_flag, update_suppressed_flag

Methods included from JSONModel

JSONModel, #JSONModel, add_error_handler, all, allow_unmapped_enum_value, backend_url, client_mode?, custom_validations, destroy_model, enum_default_value, enum_values, handle_error, init, load_schema, #models, models, parse_jsonmodel_ref, parse_reference, repository, repository_for, schema_src, set_repository, strict_mode, strict_mode?, with_repository

Instance Method Details

- (Object) delete



21
22
23
24
25
26
27
# File 'backend/app/model/agent_corporate_entity.rb', line 21

def delete
  begin
    super
  rescue Sequel::DatabaseError
    raise ConflictException.new("This agent is linked to a repository and can't be removed")
  end
end