lib/ddr/models.rb in ddr-models-2.3.2 vs lib/ddr/models.rb in ddr-models-2.4.0.rc1
- old
+ new
@@ -9,38 +9,49 @@
require 'hydra-core'
require 'hydra/validations'
module Ddr
extend ActiveSupport::Autoload
+ extend Deprecation
autoload :Actions
autoload :Auth
- autoload :Contacts
autoload :Datastreams
autoload :Derivatives
autoload :Events
autoload :Index
- autoload :IndexFields
autoload :Jobs
autoload :Managers
autoload :Metadata
autoload :Notifications
autoload :Utils
autoload :Vocab
+ def self.const_missing(name)
+ if name == :IndexFields
+ Deprecation.warn(Ddr::Models, "`Ddr::IndexFields` is deprecated and will be removed in ddr-models 3.0." \
+ " Use `Ddr::Index::Fields` instead.")
+ Index::Fields
+ else
+ super
+ end
+ end
+
module Models
extend ActiveSupport::Autoload
autoload :AccessControllable
autoload :AdminSet
autoload :Base
autoload :ChecksumInvalid, 'ddr/models/error'
+ autoload :Contact
autoload :ContentModelError, 'ddr/models/error'
autoload :DerivativeGenerationFailure, 'ddr/models/error'
autoload :Describable
autoload :Error
autoload :EventLoggable
+ autoload :FileCharacterization
autoload :FileManagement
autoload :FindingAid
autoload :FixityCheckable
autoload :Governable
autoload :HasAdminMetadata
@@ -52,9 +63,10 @@
autoload :HasThumbnail
autoload :Indexing
autoload :SolrDocument
autoload :StructDiv
autoload :Structure
+ autoload :WithContentFile
autoload :YearFacet
autoload_under "licenses" do
autoload :AdminPolicyLicense
autoload :EffectiveLicense