Author: kwin Date: Wed Dec 10 16:44:21 2014 New Revision: 1644472 URL: http://svn.apache.org/r1644472 Log: fix typos
Modified: sling/site/trunk/content/documentation/bundles/models.mdtext Modified: sling/site/trunk/content/documentation/bundles/models.mdtext URL: http://svn.apache.org/viewvc/sling/site/trunk/content/documentation/bundles/models.mdtext?rev=1644472&r1=1644471&r2=1644472&view=diff ============================================================================== --- sling/site/trunk/content/documentation/bundles/models.mdtext (original) +++ sling/site/trunk/content/documentation/bundles/models.mdtext Wed Dec 10 16:44:21 2014 @@ -87,13 +87,13 @@ Or As with other AdapterFactories, if the adaptation can't be made for any reason, `adaptTo()` returns null. ## ModelFactory (since 1.2.0) -Since Sling Models 1.2.0 ([SLING-3709](https://issues.apache.org/jira/browse/SLING-3709)) there is another way of instanciating models. The OSGi service `ModelFactory` provides a method for instanciating a model that throws exceptions in case the model cannot be instanciated. That way `null` checks are not necessary. +Since Sling Models 1.2.0 ([SLING-3709](https://issues.apache.org/jira/browse/SLING-3709)) there is another way of instantiating models. The OSGi service `ModelFactory` provides a method for instantiating a model that throws exceptions this is not possible. That way `null` checks are not necessary. ::java try { MyModel model = modelFactory.createModel(resource, MyModel.class); } catch (Exception e) { - // give out error message that the model could not be instanciated. + // give out error message that the model could not be instantiated. // The exception contains further information. // See the javadoc of the ModelFactory for which Exception can be expected here } @@ -316,11 +316,11 @@ You can use the attribute `validation` o Value | Description | Invalid validation model | No validation model found | Resource invalid according to model ----- | ------- | ------------- | -------------| --------- - `DISABLED` (default) | don't validate the resource bound to the Model | Model instanciated | Model instanciated | Model instanciated - `REQUIRED` | enforce validation of the resource bound to the Model | Model not instanciated | Model not instanciated | Model not instanciated - `OPTIONAL` | validate the resource bound to the Model (if a validation model is found) | Model not instanciated | Model instanciated | Model not instanciated + `DISABLED` (default) | don't validate the resource bound to the Model | Model instantiated | Model instantiated | Model instantiated + `REQUIRED` | enforce validation of the resource bound to the Model | Model not instantiated | Model not instantiated | Model not instantiated + `OPTIONAL` | validate the resource bound to the Model (if a validation model is found) | Model not instantiated | Model instantiated | Model not instantiated -In case the model is not instanciated an appropriate error message is logged (if the model is instanciated through the `adaptTo()` method or an appropriate exception is thrown if the model is instanciated through `ModelFactory.createModel()`). +In case the model is not instantiated an appropriate error message is logged (if `adaptTo()` is used) or an appropriate exception is thrown (if `ModelFactory.createModel()` is used). Validation is only supported on models which are adapted from a `Resource` and if the Sling Validation Bundle is deployed. # Custom Injectors