added the RegistryInstance interface

Which gives the basic registry functionality (because there going to be at least two registries)
Voter-Registry
Vladimir Eliezer Tokarev 2016-01-23 03:29:29 -08:00
parent 01604d1acb
commit 7a167639db
1 changed files with 11 additions and 10 deletions

View File

@ -4,14 +4,14 @@ package meerkat;
* Created by Vladimir Eliezer Tokarev on 1/22/2016. * Created by Vladimir Eliezer Tokarev on 1/22/2016.
* provides voters management options * provides voters management options
*/ */
public abstract class RegistryInstance { public interface RegistryInstance {
/** /**
* Adds new voter to the bulletin-board * Adds new voter to the bulletin-board
* *
* @param voterID id of the new user * @param voterID id of the new user
* @param personalData for example residence location * @param personalData for example residence location
* @param callBack when the adding voter done callBack.HandleVoterAdded will be called * @param callBack when the adding voter done callBack.HandleVoterAdded will be called
* @return void * @return void
*/ */
abstract void AddVoter(String voterID, String personalData, RegistryCallBack callBack); abstract void AddVoter(String voterID, String personalData, RegistryCallBack callBack);
@ -19,8 +19,8 @@ public abstract class RegistryInstance {
/** /**
* Adding given voter to given group * Adding given voter to given group
* *
* @param voterID the voter id * @param voterID the voter id
* @param groupID the group id to which we want add the voter * @param groupID the group id to which we want add the voter
* @param callBack when the adding voter done callBack.HandleVoterAddedToGroup will be called * @param callBack when the adding voter done callBack.HandleVoterAddedToGroup will be called
* @return true if the adding action succeeded else return false * @return true if the adding action succeeded else return false
*/ */
@ -29,8 +29,8 @@ public abstract class RegistryInstance {
/** /**
* Removes given voter from given group * Removes given voter from given group
* *
* @param voterID the voter id * @param voterID the voter id
* @param groupID the group from which we want to remove the user * @param groupID the group from which we want to remove the user
* @param callBack when the adding voter done callBack.HandleVoterRemovedFromGroup will be called * @param callBack when the adding voter done callBack.HandleVoterRemovedFromGroup will be called
* @return true if the removing action succeeded else return false * @return true if the removing action succeeded else return false
*/ */
@ -39,7 +39,7 @@ public abstract class RegistryInstance {
/** /**
* Sets that the voter have voted * Sets that the voter have voted
* *
* @param id id tag string * @param id id tag string
* @param callBack when the adding voter done callBack.HandleSetVoted will be called * @param callBack when the adding voter done callBack.HandleSetVoted will be called
* @return true if the set voted succeed else false * @return true if the set voted succeed else false
*/ */
@ -48,7 +48,7 @@ public abstract class RegistryInstance {
/** /**
* Requests all the groups that the given id voter is in * Requests all the groups that the given id voter is in
* *
* @param id id tag string * @param id id tag string
* @param callBack when the adding voter done callBack.HandleVoterGroups will be called * @param callBack when the adding voter done callBack.HandleVoterGroups will be called
* @return list of groups ids (or names), if the method fails its empty * @return list of groups ids (or names), if the method fails its empty
*/ */
@ -57,9 +57,10 @@ public abstract class RegistryInstance {
/** /**
* Retrieves list of strings that represents voter * Retrieves list of strings that represents voter
* *
* @param id id tag string * @param id id tag string
* @param callBack when the adding voter done callBack.HandleVoterInfo will be called * @param callBack when the adding voter done callBack.HandleVoterInfo will be called
* @return list of strings (empty list if the lookup failed) * @return list of strings (empty list if the lookup failed)
*/ */
abstract void GetPersonIDDetails(String id, RegistryCallBack callBack); abstract void GetPersonIDDetails(String id, RegistryCallBack callBack);
} }