added the RegistryInstance interface
Which gives the basic registry functionality (because there going to be at least two registries)Voter-Registry
parent
01604d1acb
commit
7a167639db
|
@ -4,14 +4,14 @@ package meerkat;
|
|||
* Created by Vladimir Eliezer Tokarev on 1/22/2016.
|
||||
* provides voters management options
|
||||
*/
|
||||
public abstract class RegistryInstance {
|
||||
public interface RegistryInstance {
|
||||
|
||||
/**
|
||||
* 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 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
|
||||
*/
|
||||
abstract void AddVoter(String voterID, String personalData, RegistryCallBack callBack);
|
||||
|
@ -19,8 +19,8 @@ public abstract class RegistryInstance {
|
|||
/**
|
||||
* Adding given voter to given group
|
||||
*
|
||||
* @param voterID the voter id
|
||||
* @param groupID the group id to which we want add the voter
|
||||
* @param voterID the voter id
|
||||
* @param groupID the group id to which we want add the voter
|
||||
* @param callBack when the adding voter done callBack.HandleVoterAddedToGroup will be called
|
||||
* @return true if the adding action succeeded else return false
|
||||
*/
|
||||
|
@ -29,8 +29,8 @@ public abstract class RegistryInstance {
|
|||
/**
|
||||
* Removes given voter from given group
|
||||
*
|
||||
* @param voterID the voter id
|
||||
* @param groupID the group from which we want to remove the user
|
||||
* @param voterID the voter id
|
||||
* @param groupID the group from which we want to remove the user
|
||||
* @param callBack when the adding voter done callBack.HandleVoterRemovedFromGroup will be called
|
||||
* @return true if the removing action succeeded else return false
|
||||
*/
|
||||
|
@ -39,7 +39,7 @@ public abstract class RegistryInstance {
|
|||
/**
|
||||
* 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
|
||||
* @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
|
||||
*
|
||||
* @param id id tag string
|
||||
* @param id id tag string
|
||||
* @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
|
||||
*/
|
||||
|
@ -57,9 +57,10 @@ public abstract class RegistryInstance {
|
|||
/**
|
||||
* 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
|
||||
* @return list of strings (empty list if the lookup failed)
|
||||
*/
|
||||
abstract void GetPersonIDDetails(String id, RegistryCallBack callBack);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue