Zum Hauptinhalt gehen

internal espirit classes NON_API_USAGE and Dependency on class not available in isolated mode

Kommentare

4 Kommentare

  • Zendesk API User
    Author: Windmüller - 9/19/2022 10:14

    Dependencies marked as "NON_API_USAGE" are not part of the stable API and may change anytime without notice. In order to ensure that your module works with future FirstSpirit versions, we recommend to minimize those dependencies and use the official API.

    Can you please elaborate which class has been reported as "not available in isolated mode"?

    0
  • Zendesk API User
    Author: Aradhana - 9/28/2022 13:44

    Hi,

    Can you provide the details like which  official API we need to use if we remove NON_API_USAGE dependency like what will be the replacement of NON_API_USAGE from where we can get the all details.

    Below are the NON_API_USAGE dependencies from one module:

    de.espirit.firstspirit.access.editor.value.SimpleOption
    de.espirit.firstspirit.access.store.contentstore.gom.list.EntityFormData
    de.espirit.firstspirit.server.storemanagement.exception.ElementNotFoundException
    de.espirit.storage.File
    de.espirit.storage.Type

    Below class not available in isolated mode:

    de.espirit.firstspirit.io.servlet.WebCallback 

    0
  • Zendesk API User
    Author: Windmüller - 9/28/2022 14:10

    Unfortunately there is no 1:1 mapping between API and non-API classes. The replacement procedure depends on what you want to achieve with your code. Without any knowledge of your code I am unable to provide any advice.

    As a general rule, try to use only those classes listed in the API documentation. If a use-case is not covered there, please open a support ticket so we can discuss an extension of the API for future versions of FirstSpirit.

    0
  • Zendesk API User
    Author: mbergmann - 9/28/2022 22:20

    Is there a reason WHY you use those non API classes instead of those in the API? I‘ve come across cases where developers used internal classes just because they used .getClass() somewhere to find out which type is returned - and then just used that one. And not because they really need to use that class.

    What I mean is: A first approach would be to check if you can also use (at least in some places) an interface from the API that is implemented by the internal class you are currently using. Just as an example: Option instead of SimpleOption, FormData instead of EntityFormData. If that’s possible in your case depends - as Stephan mentioned - on your code.

    0

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.