1   /*
2    * Logback: the reliable, generic, fast and flexible logging framework.
3    * Copyright (C) 1999-2026, QOS.ch. All rights reserved.
4    *
5    * This program and the accompanying materials are dual-licensed under
6    * either the terms of the Eclipse Public License v2.0 as published by
7    * the Eclipse Foundation
8    *
9    *   or (per the licensee's choosing)
10   *
11   * under the terms of the GNU Lesser General Public License version 2.1
12   * as published by the Free Software Foundation.
13   */
14  
15  package ch.qos.logback.core.model.processor;
16  
17  import java.io.FileInputStream;
18  import java.io.FileNotFoundException;
19  import java.io.IOException;
20  import java.io.InputStream;
21  import java.net.URL;
22  
23  import ch.qos.logback.core.Context;
24  import ch.qos.logback.core.joran.action.ActionUtil;
25  import ch.qos.logback.core.joran.action.ActionUtil.Scope;
26  import ch.qos.logback.core.model.Model;
27  import ch.qos.logback.core.model.ModelConstants;
28  import ch.qos.logback.core.model.PropertyModel;
29  import ch.qos.logback.core.model.util.PropertyModelHandlerHelper;
30  import ch.qos.logback.core.util.Loader;
31  
32  public class PropertyModelHandler extends ModelHandlerBase {
33  
34      public PropertyModelHandler(Context context) {
35          super(context);
36      }
37  
38      static public ModelHandlerBase makeInstance(Context context, ModelInterpretationContext ic) {
39          return new PropertyModelHandler(context);
40      }
41  
42      @Override
43      protected Class<PropertyModel> getSupportedModelClass() {
44          return PropertyModel.class;
45      }
46  
47      @Override
48      public void handle(ModelInterpretationContext mic, Model model) {
49  
50          PropertyModel propertyModel = (PropertyModel) model;
51          PropertyModelHandlerHelper propertyModelHandlerHelper = new PropertyModelHandlerHelper(this);
52          propertyModelHandlerHelper.setContext(context);
53          propertyModelHandlerHelper.handlePropertyModel(mic, propertyModel);
54      }
55  
56  }