Configuring Library Descriptor
Library Descriptor is the which defines the properties of library.
<!-- Design Of LibraryDescriptor.xml -->
<library-descriptor>
<!-- General Properties Of Library -->
<!-- Mandatory Field -->
<property name="name">name_of_library</property>
<!-- Optional Field -->
<property name="description">description_of_library</property>
<!-- Entity Descriptors Needed Under This Library Descriptor -->
<!-- Optional Field -->
<!-- Entity Descriptor Descriptors -->
<entity-descriptors>
<entity-descriptor>name_of_database_descriptor.full_path_of_entity_descriptor_file</entity-descriptor>
</entity-descriptors>
<!-- Service Descriptors -->
<!-- Optional Field -->
<!-- Service Descriptor -->
<service-descriptors>
<service-descriptor>full_path_of_service-descriptor_file</service-descriptor>
</service-descriptors>
<!-- Sync Descriptors -->
<!-- Optional Field -->
<!-- Sync Descriptor -->
<sync-descriptors>
<sync-descriptor>full_path_of_sync_descriptor_file</sync-descriptor>
</sync-descriptors>
</library-descriptor>
<!-- Android Sample: Library Descriptor -->
<library-descriptor>
<property name="name">SIMINOV CORE LIBRARY SAMPLE</property>
<property name="description">Siminov Core Library Sample</property>
<entity-descriptors>
<entity-descriptor>SIMINOV-CORE-SAMPLE.Credential.xml</entity-descriptor>
</entity-descriptors>
</library-descriptor>
<!-- iOS Sample: Library Descriptor -->
<library-descriptor>
<property name="name">SIMINOV CORE LIBRARY SAMPLE</property>
<property name="description">Siminov Core Library Sample</property>
<entity-descriptors>
<entity-descriptor>SIMINOV-CORE-SAMPLE.Credential.xml</entity-descriptor>
</entity-descriptors>
</library-descriptor>
<!-- Windows Sample: Library Descriptor -->
<library-descriptor>
<property name="name">SIMINOV CORE LIBRARY SAMPLE</property>
<property name="description">Siminov Core Library Sample</property>
<entity-descriptors>
<entity-descriptor>SIMINOV-CORE-SAMPLE.Credential.xml</entity-descriptor>
</entity-descriptors>
</library-descriptor>
Note: Application Developer can provide their own properties also, and by using following API's they can use properties.
Get Properties - [Android:getProperties | iOS:getProperties | Windows:GetProperties]: It will return all properties associated with Application Descriptor.
Get Property - [Android:getProperty(Name-of-Property) | iOS:getProperty:Name-of-Property | Windows:GetProperty(Name-of-Property)]: It will return property value associated with property name provided.
Contains Property - [Android:containsProperty(Name-of-Property) | iOS:containsProperty:Name-of-Property | Windows:ContainsProperty(Name-of-Property)]: It will return TRUE/FALSE whether property exists or not.
Add Property - [Android:addProperty(Name-of-Property, Value-of-Property) | iOS:addProperty:Name-of-Property value:Value-of-Property | Windows:AddProperty(Name-of-Property, Value-of-Property)]: It will add new property to the collection of Application Descriptor properties.
Remove Property - [Android:removeProperty(Name-of-Property) | iOS:removeProperty:Name-of-Property | Windows:RemoveProperty(Name-of-Property)]: It will remove property from Application Descriptor properties based on name provided.
-
name*: Name of library. It is mandatory field.
-
descriptor: Description of library. It is optional field.
Note
Provide full entity descriptor file path if you have used xml format to define ORM.
Provide full class path of entity descriptor mapped class if you have used annotation to define ORM.
- Provide full service descriptor file path.
- Provide full sync descriptor file path.
Note
Library descriptor file name should be same as LibraryDescriptor.xml.
It should always be in root package specified in DatabaseDescriptor.xml file.
![Application Data Folder Based On Name Defined] (https://raw.githubusercontent.com/Siminov/connect/docs/github/v2.0/library_descriptor_path.android.png "ApplicationDescriptor.xml file path")
![Application Data Folder Based On Name Defined] (https://raw.githubusercontent.com/Siminov/connect/docs/github/v2.0/library_descriptor_path.ios.png "ApplicationDescriptor.xml file path")
![Application Data Folder Based On Name Defined] (https://raw.githubusercontent.com/Siminov/connect/docs/github/v2.0/library_descriptor_path.windows.png "ApplicationDescriptor.xml file path")