/** * Adds a source where Definition objects are stored. * <p/> * Implementations should publish what type of source object they expect. * The source should contain enough information to resolve a configuration * source containing definitions. The source should be a "base" source for * configurations. Internationalization and Localization properties will be * applied by implementations to discriminate the correct data sources based * on locale. * * @param source The configuration source for definitions. * @throws DefinitionsFactoryException if an invalid source is passed in or * an error occurs resolving the source to an actual data store. * @deprecated Use {@link URLReader#addSourceURL(URL)}. */ public void addSource(Object source) { if (source == null) { throw new DefinitionsFactoryException( "Source object must not be null"); } if (!(source instanceof URL)) { throw new DefinitionsFactoryException( "Source object must be an URL"); } if (definitionDao instanceof URLReader) { ((URLReader) definitionDao).addSourceURL((URL) source); } }