This page (revision-22) was last changed on 02-Dec-2023 15:46 by Juan Pablo 

This page was created on 29-Mar-2020 17:46 by Juan Pablo

Only authorized users are allowed to rename pages.

Only authorized users are allowed to delete pages.

Version Date Modified Size Author Changes ... Change note
22 02-Dec-2023 15:46 13 KB Juan Pablo to previous added Event Listeners section
21 23-Jun-2022 07:08 13 KB Murray Altheim to previous | to last fixed spelling errors

Difference between version and

At line 21 changed one line
** Perhaps the most important method here is {{getManager(Class<?> cls )}} which returns the requested "manager" (or ''engine part'' following the engine metaphor). These managers are **not** part of the public API, so if a given extension relies on them it may stop working on a [new minor release|VersioningProposal].
** Perhaps the most important method here is {{getManager(Class<?> cls )}} which returns the requested "manager" (or ''engine part'' following the engine metaphor). These managers are __not__ part of the public API, so if a given extension relies on them it may stop working on a [new minor release|VersioningProposal].
At line 32 changed one line
These default implementations should **never** be accessed directly, but through the correspondent DSL/SPI.
These default implementations should __never__ be accessed directly, but through the correspondent DSL/SPI.
At line 34 added 2 lines
TBD
At line 38 added 6 lines
* For a custom {{Engine}}, provide an implementation of {{o.a.w.api.spi.EngineSPI}}, and set the {{jspwiki.provider.impl.engine}} property on the {{jspwiki-[[custom].properties}} file with the fully qualified name of the implementation.
* For a custom {{Context}}, provide an implementation of {{o.a.w.api.spi.ContextSPI}}, and set the {{jspwiki.provider.impl.context}} property on the {{jspwiki-[[custom].properties}} file with the fully qualified name of the implementation.
* For a custom {{Session}}, provide an implementation of {{o.a.w.api.spi.SessionSPI}}, and set the {{jspwiki.provider.impl.session}} property on the {{jspwiki-[[custom].properties}} file with the fully qualified name of the implementation.
* For custom {{Page}} or {{Attachment}}, provide an implementation of {{o.a.w.api.spi.ContentsSPI}}, and set the {{jspwiki.provider.impl.contents}} property on the {{jspwiki-[[custom].properties}} file with the fully qualified name of the implementation.
* For custom {{Acl}} or {{AclEntry}}, provide an implementation of {{o.a.w.api.spi.AclsSPI}}, and set the {{jspwiki.provider.impl.acls}} property on the {{jspwiki-[[custom].properties}} file with the fully qualified name of the implementation.
At line 40 changed one line
TBD
It is possible to register custom "Engine parts" (managers or components or however you call them)
At line 50 added 5 lines
* The default {{Engine}} implementation will look on classpath for an {{ini/classmappings-extra.xml}} file, with the same structure as [ini/classmappings.xml|https://github.com/apache/jspwiki/blob/master/jspwiki-main/src/main/resources/ini/classmappings.xml#L49].
* If found, will register each {{requestedClass}} with its correspondent {{mappedClass}}.
* These custom manager __must__ have a no-arg constructor.
* If there's a need to perform some initialization tasks querying the {{Engine}}, the custom manager should implement {{o.a.w.api.engine.Initializable}} and perform those tasks there.
* Custom managers then will be accessible through {{Engine#getManager( CustomComponent.class )}}.
At line 56 added 5 lines
Please also note that
* The classes don't get registered in any particular order, as there's an iteration of the contents of a {{Map}}
* As with "official" managers, if there are two {{requestedClass}} entries with the same {{mappedClass}}, the last getting registered overwrites the other(s)
* Access to the entity is controlled through its access modifiers (the Engine must be able to "see" it, though)