Skip to content
MrDhruv edited this page Jan 6, 2016 · 24 revisions

Generic Partner Application

Generic Partner App is distribution of data between Ekstep(Genie) and it's partner(Akshara,Aser etc).

Generic Partner App will launch from Genie App and get back to Genie after completion of all process.

Generic Partner App will register one time after successful registration. It could be start session and send partner data to Genie Services.

In Generic Partner App, there is one configuration file(config.json) where Partner can define their name and own set of rules like number of fields with description with their data types.

Here example of Config.json file

{
  "partnerName": "LME",
  "partnerId": "org.ekstep.partner.lme",
  "partnerPublicKey": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvgDm/lRk4ZU4ZUAaLRqXhzxGbRzSFOjOsIEgGAMYkh3+pULK/9evvOhI5X2afbnLLTo6h9MzjzWKio/G5jTH8YRS61ohBnhL8TKkVwXlU9GYnvOZimIoizPXimhNrVcAYvo4GNwrB9sxGFyNPup0CBCnyWifdhKOWGo5LGhNCP9ehmJJchPw23RN+VeF/fsW9WVJNTZFXy4WYbsM7YVGcQWYgCZX4eNqBcckP3aXaFTej1pPHfti2n+BLmudGK60lnZ4ePBidEi6WoPzpMrdMnwzkYOnQ8KBV0LKJr0vzqATzxGMC85fo1OUm+ZMobdl8SCLAzn5+2WFnNKyct1mtwIDAQAB",
  "sections": [
    //------------------Section represented by[ ] --------------------
    [
      {
        "SectionHeading": "Employee Details",  //Section 1st heading it will display on Top
        "instructions": {
          "title": "Star(*) denotes Mandatory field.",  //if Any instruction you want to give inside partucular section  as title
          "displayOrder": 2  // displayOrder representing position of  field ,it will show  at 2nd position inside partucular section
        }
      },
      {
        "fieldName": "Email-Id",   //It's fieldName which will display as Label
        "fieldvalue": {
          "fieldType": "Text",
          "fieldInputType": "textEmailAddress", //where user will enter email  e.g. dhruvraj123@gmail.com
          "validation": {
            "flag": false,  //false represents don't validate field
            "minimum": 8,   // It represents mimimum '8' character should  be
            "maximum": 12   // It represents maximum '12' character should  be
          }
        },
        "fieldHint": "enter aplhabet character",  //fieldHint as Help what fieldInputType should be
        "displayOrder": 1,  //displayOrder representing position of  field, it will show  at 1st position inside first section
        "fieldValues": []
      },
      {
        "fieldName": "FirstName", //It's fieldName which will display as Label
        "fieldvalue": {
          "fieldType": "Text",
          "fieldInputType": "text",//where user will enter FirstName  e.g. Dhruv
          "validation": {
            "flag": true,  //true represents  validate field
            "minimum": 3,  // It represents mimimum '3' character should  be
            "maximum": 25  // It represents maximum '25' character should  be
          }
        },
        "fieldHint": "enter aplhabet character",
        "displayOrder": 13,
        "fieldValues": []
      },
      {
        "fieldName": "Skills", //It's fieldName which will display as Label
        "fieldvalue": {
          "fieldType": "MultipleChoiceMore", //MultipleChoiceMore means You can select one or more options
          "fieldInputType": "None", //fieldInputType None means where user has to select from given option
          "validation": {
            "flag": true,  //true represents  validate field
            "minimum": 1,  // It represents mimimum '1' field has to select
            "maximum": 0   // It represents maximum  '0'  means has no limitations
          }
        },
        "fieldHint": "You can select one or more options",
        "displayOrder": 5,
        "fieldValues": ["Java","PHP","Android","SAP"] // It showing the option list corresponding to field
      },
      {
        "fieldName": "Gender", //It's fieldName which will display as Label
        "fieldvalue": {
          "fieldType": "MultipleChoiceSingle", //MultipleChoiceSingle means You can select only one option
          "fieldInputType": "None",
          "validation": {
            "flag": true, //true represents  validate field
            "minimum": 1, // It represents mimimum '1' field has to select
            "maximum": 1  // It represents maximum '1' field has to select
          }
        },
        "fieldHint": "You can select one option only",
        "displayOrder": 6,
        "fieldValues": ["Male","Female"]
      },
      {
        "fieldName": "Password", //It's fieldName which will display as Label
        "fieldvalue": {
          "fieldType": "Text",
          "fieldInputType": "textPassword", //textPassword means it will hide what user is enetered e.g. ********
          "validation": {
            "flag": true, //true represents  validate field
            "minimum": 6,  // It represents mimimum '6' character should be
            "maximum": 10  // It represents maximum '10' character should be
          }
        },
        "fieldHint": "enter password max 10 char",
        "displayOrder": 4,
        "fieldValues": []
      },
      {
        "fieldName": "Joining Date", //It's fieldName which will display as Label
        "fieldvalue": {
          "fieldType": "Text",
          "fieldInputType": "date", //User has to select date from calander
          "validation": {
            "flag": true, //true represents  validate field
            "minimum": 1, // It represents mimimum '1' year should be from current date
            "maximum": 2 // It represents maximum '2' year should be from current date
          }
        },
        "fieldHint": "select date from calander",
        "displayOrder": 3,
        "fieldValues": []
      }
    ],
    //----------------------end of Section First-------------------------------------------
    //---------------------- Section Second-------------------------------------------

    [
      {
        "SectionHeading": "Address Details", //Section 2nd heading it will display below Section First
        "instructions": {
          "title": "",   //if Any instruction you want to give inside partucular section  as title, Here no instruction
          "displayOrder": 0 // displayOrder '0' means no title
        }
      },
      {
        "fieldName": "State", //It's fieldName which will display as Label
        "fieldvalue": {
          "fieldType": "DropDown", //DropDown means You can select only one option
          "fieldInputType": "None",
          "validation": {
            "flag": true, //true represents  validate field
            "minimum": 1, // It represents mimimum '1' has to select
            "maximum": 1 // It represents maximum '1'  has to select
          }
        },
        "fieldHint": "please select one state",
        "displayOrder": 1,
        "fieldValues": [
          "Karnataka",
          "Tamilandu",
          "Bihar"
        ]
      },
      {
        "fieldName": "Street Address", //It's fieldName which will display as Label
        "fieldvalue": {
          "fieldType": "TextComment",
          "fieldInputType": "textMultiLine", //textMultiLine means User can enter input more than one line
          "validation": {
            "flag": true, //true represents  validate field
            "minimum": 1, // It represents mimimum '1' line should be
            "maximum": 3  // It represents maximum '3' line should be
          }
        },
        "fieldHint": "enter address",
        "displayOrder": 2,
        "fieldValues": []
      }
    ],
    //----------------------end of Section Second----------------

    //------------------------Section third----------------------------
    [
      {
        "SectionHeading": "",// No heading
        "instructions": {
          "title": "",   //No title
          "displayOrder": 0 //No displaying position
        }
      },
      {
        "fieldName": "Age", //It's fieldName which will display as Label
        "fieldvalue": {
          "fieldType": "Text",
          "fieldInputType": "number", //where user can enter age as integer like 12,24,35,36 etc
          "validation": {
            "flag": true, //true represents  validate field
            "minimum": 3, // It represents mimimum '3' years should be
            "maximum": 10 // It represents maximum '10' years should be
          }
        },
        "fieldHint": "enter age in years only",
        "displayOrder": 1,
        "fieldValues": []
      },


      {
        "fieldName": "Mobile Number", //It's fieldName which will display as Label
        "fieldvalue": {
          "fieldType": "Text",
          "fieldInputType": "phone", //fieldInputType 'phone' means it will be integer like e.g. 8050691172
          "validation": {
            "flag": true, //true represents validate field
            "minimum": 10, // It represents mimimum '10' number should  be
            "maximum": 12  // It represents maximum '12' number should  be
          }
        },
        "fieldHint": "enter mobile number",
        "displayOrder": 2,
        "fieldValues": []
      }
    ]
  ]
}

Summary of Config.json

Any partner can change only following things
i)PartnerName
ii)PartnerId
iii)PartnerPublicKey
iv)Sections
1.SectionHeading
2.instructions
a)title b)Displayorder 3. fieldName
a)validation
-flag :true/false
minimum : integer value
maximum :integer value
4. fieldHint
5. fieldValues

Clone this wiki locally