Class AppInfoFragment
- All Implemented Interfaces:
KosDescriptorFragment
descriptor.json within
a KAB of type kos.app or kos.system. The fields of this object describe
details about the application and how to properly load it within KOS.- Since:
- 1
- Version:
- 1
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintThe api version supported by this app.The fully qualified class name for theApplicationclass within the kab.getAppId()The unique application id for this application.An application can contain libraries and classes.An application can contain libraries and classes.An application can have an associated sdk that allows thrid party developers compile against your application without access to the application code.voidsetApiVersion(int apiVersion) The api version supported by this app.voidsetAppClass(String appClass) The fully qualified class name for theApplicationclass within the kab.voidThe unique application id for this application.voidsetClassesDir(String classesDir) An application can contain libraries and classes.voidAn application can contain libraries and classes.voidsetSdkClassPrefixes(List<String> sdkClassPrefixes) An application can have an associated sdk that allows thrid party developers compile against your application without access to the application code.
-
Field Details
-
PATH
Path to where thisAppInfoFragmentobject exists in a standard KOS descriptor.json file:kos.app.- See Also:
-
-
Constructor Details
-
AppInfoFragment
public AppInfoFragment()
-
-
Method Details
-
getAppId
The unique application id for this application. Every application must have a globally unique id. The id is integrated into various KOS entities such as directory names, urls, topics and so on. An appId must contain only numbers, letters, underscores and periods. No other characters are allowed. Developers should pick id's that are namespaced to their organization (similar to java package names or domain names) to ensure no overlap with third party applications.Each KOS runtime can run a single system application. This KAB will have a type of
kos.systemand the appId must besystem. If any other appId is used, the appId will be overwritten within KOS to besystem. This ensures that all system app related paths and resources are consistent. -
getApiVersion
public int getApiVersion()The api version supported by this app. Unlike the version of the app, this describes the compatibility of the api. If the api version of the app is the same as the api version of the sdk, the version of the app shouldn't matter as the api's haven't changed. This can also be used to dynamically determine which api's to call based on the supported api version.This is subject to app development teams supporting the use of api versions. When a api version changes, users must consult the app vendor to determine the nature of the changes. Developers may choose to use semantic versions for their apps to indicate compatibility, but in cases where that's not the case, api version is another available alternative.
-
getAppClass
The fully qualified class name for theApplicationclass within the kab. This is used by KOS to create an instance of the application. -
getClassesDir
An application can contain libraries and classes. By default KOS will search/classesin the KAB for any classes provided by the application. If there is a need to specify an alternate directory for classes within the KAB, override this value as needed. -
getLibDir
An application can contain libraries and classes. By default KOS will search/libin the KAB for any jars provided by the application. If there is a need to specify an alternate directory for jars within the KAB, override this value as needed. -
getSdkClassPrefixes
An application can have an associated sdk that allows thrid party developers compile against your application without access to the application code. KOS tooling provides a mechanism to annotate your code to automatically generate such an sdk. When a user of an sdk loads their application on KOS, it expects the actual implementation classes to be provided by your application. KOS provides a mechanism that allows your application to export these classes into the public classloader infrastructure while restricting all other classes. To expose your implementation classes, include the classes, or class prefixes in this list.Since sdk classes are shared among all loaded application in KOS, it is strongly recommended to use organization specific package names for your public facing classes to ensure there are no collisions with other third party apps that also expose an sdk.
-
setAppId
The unique application id for this application. Every application must have a globally unique id. The id is integrated into various KOS entities such as directory names, urls, topics and so on. An appId must contain only numbers, letters, underscores and periods. No other characters are allowed. Developers should pick id's that are namespaced to their organization (similar to java package names or domain names) to ensure no overlap with third party applications.Each KOS runtime can run a single system application. This KAB will have a type of
kos.systemand the appId must besystem. If any other appId is used, the appId will be overwritten within KOS to besystem. This ensures that all system app related paths and resources are consistent. -
setApiVersion
public void setApiVersion(int apiVersion) The api version supported by this app. Unlike the version of the app, this describes the compatibility of the api. If the api version of the app is the same as the api version of the sdk, the version of the app shouldn't matter as the api's haven't changed. This can also be used to dynamically determine which api's to call based on the supported api version.This is subject to app development teams supporting the use of api versions. When a api version changes, users must consult the app vendor to determine the nature of the changes. Developers may choose to use semantic versions for their apps to indicate compatibility, but in cases where that's not the case, api version is another available alternative.
-
setAppClass
The fully qualified class name for theApplicationclass within the kab. This is used by KOS to create an instance of the application. -
setClassesDir
An application can contain libraries and classes. By default KOS will search/classesin the KAB for any classes provided by the application. If there is a need to specify an alternate directory for classes within the KAB, override this value as needed. -
setLibDir
An application can contain libraries and classes. By default KOS will search/libin the KAB for any jars provided by the application. If there is a need to specify an alternate directory for jars within the KAB, override this value as needed. -
setSdkClassPrefixes
An application can have an associated sdk that allows thrid party developers compile against your application without access to the application code. KOS tooling provides a mechanism to annotate your code to automatically generate such an sdk. When a user of an sdk loads their application on KOS, it expects the actual implementation classes to be provided by your application. KOS provides a mechanism that allows your application to export these classes into the public classloader infrastructure while restricting all other classes. To expose your implementation classes, include the classes, or class prefixes in this list.Since sdk classes are shared among all loaded application in KOS, it is strongly recommended to use organization specific package names for your public facing classes to ensure there are no collisions with other third party apps that also expose an sdk.
-