Package com.clover.sdk.v3.employees
Interface IEmployeeService
-
- All Superinterfaces:
IInterface
- All Known Implementing Classes:
IEmployeeService.Default
,IEmployeeService.Stub
public interface IEmployeeService extends IInterface
An interface for interacting with the Clover employee service. The employee service is a bound AIDL service. Bind to this service as follows,Intent serviceIntent = new Intent(EmployeeIntent.ACTION_EMPLOYEE_SERVICE_V3); serviceIntent.putExtra(Intents.EXTRA_ACCOUNT, CloverAccount.getAccount(context)); serviceIntent.putExtra(Intents.EXTRA_VERSION, 1); context.bindService(serviceIntent);
You may also interact with the employee service through thecom.clover.sdk.v3.employee.EmployeeConnector
class, which handles binding and asynchronous invocation of service methods.- See Also:
CloverAccount
,com.clover.sdk.v3.employee.EmployeeIntent
,com.clover.sdk.v3.employee.EmployeeConnector
,Lockscreen
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
IEmployeeService.Default
Default implementation for IEmployeeService.static class
IEmployeeService.Stub
Local-side IPC implementation stub class.
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description EmployeeCard
addEmployeeCard(EmployeeCard employeeCard, ResultStatus resultStatus)
Not available to non-Clover apps.void
addListener(IEmployeeListener listener, ResultStatus resultStatus)
Register a listener to be called when the active employee changes, which coincides with the lockscreen being shown or dismissed.Employee
createEmployee(Employee employee, ResultStatus resultStatus)
Create a new employee.void
deleteEmployee(String id, ResultStatus resultStatus)
Delete an existing employee.void
deleteEmployeeCard(EmployeeCard employeeCard, ResultStatus resultStatus)
Not available to non-Clover apps.void
deleteFingerprintId(String employeeId, ResultStatus resultStatus)
Not available to non-Clover apps.Employee
getActiveEmployee(ResultStatus resultStatus)
Return the employee currently logged in to this device.Employee
getEmployee(String id, ResultStatus resultStatus)
Return the employee for the particular UUID.List<EmployeeCard>
getEmployeeCards(String employeeId, ResultStatus resultStatus)
Not available to non-Clover apps.Employee
getEmployeeForCard(String cardNumber, ResultStatus resultStatus)
Not available to non-Clover apps.String
getEmployeeId(int fingerprintId, ResultStatus resultStatus)
Not available to non-Clover apps.List<Employee>
getEmployees(ResultStatus resultStatus)
Return a list of all employees.int[]
getEnrolledFingerprints(ResultStatus resultStatus)
Not available to non-Clover apps.int
getFingerprintId(String employeeId, ResultStatus resultStatus)
Not available to non-Clover apps.void
login(ResultStatus resultStatus)
Deprecated.Please useLockscreen#unlock()
,Lockscreen#unlock(String)
, orLockscreen#unlockDefault()
.void
logout(ResultStatus resultStatus)
Deprecated.Please useLockscreen#lock()
.void
removeListener(IEmployeeListener listener, ResultStatus resultStatus)
Unregister a previously registered employee changed listener.Employee
setEmployeePin(String id, String pin, ResultStatus resultStatus)
Deprecated.UseupdateEmployee(Employee, ResultStatus)
instead.void
setFingerprintId(String employeeId, String fingerprintId, ResultStatus resultStatus)
Not available to non-Clover apps.Employee
updateEmployee(Employee employee, ResultStatus resultStatus)
Update an existing employee.-
Methods inherited from interface android.os.IInterface
asBinder
-
-
-
-
Method Detail
-
getActiveEmployee
Employee getActiveEmployee(ResultStatus resultStatus) throws RemoteException
Return the employee currently logged in to this device. If the device is locked this returns null.- Throws:
RemoteException
-
getEmployee
Employee getEmployee(String id, ResultStatus resultStatus) throws RemoteException
Return the employee for the particular UUID.- Throws:
RemoteException
-
getEmployees
List<Employee> getEmployees(ResultStatus resultStatus) throws RemoteException
Return a list of all employees.- Throws:
RemoteException
-
createEmployee
Employee createEmployee(Employee employee, ResultStatus resultStatus) throws RemoteException
Create a new employee. You must set at least a name, pin and role. Do not set the id, one will be generated and available in the return value. Device must have network connectivity to succeed.- Throws:
RemoteException
-
updateEmployee
Employee updateEmployee(Employee employee, ResultStatus resultStatus) throws RemoteException
Update an existing employee. Device must have network connectivity to succeed. Check result status to ensure the call succeeded.- Throws:
RemoteException
-
setEmployeePin
Employee setEmployeePin(String id, String pin, ResultStatus resultStatus) throws RemoteException
Deprecated.UseupdateEmployee(Employee, ResultStatus)
instead.- Throws:
RemoteException
-
deleteEmployee
void deleteEmployee(String id, ResultStatus resultStatus) throws RemoteException
Delete an existing employee. Device must have network connectivity to succeed. Check result status to ensure the call succeeded.- Throws:
RemoteException
-
logout
void logout(ResultStatus resultStatus) throws RemoteException
Deprecated.Please useLockscreen#lock()
.- Throws:
RemoteException
-
login
void login(ResultStatus resultStatus) throws RemoteException
Deprecated.Please useLockscreen#unlock()
,Lockscreen#unlock(String)
, orLockscreen#unlockDefault()
.- Throws:
RemoteException
-
addListener
void addListener(IEmployeeListener listener, ResultStatus resultStatus) throws RemoteException
Register a listener to be called when the active employee changes, which coincides with the lockscreen being shown or dismissed.- Throws:
RemoteException
-
removeListener
void removeListener(IEmployeeListener listener, ResultStatus resultStatus) throws RemoteException
Unregister a previously registered employee changed listener.- Throws:
RemoteException
-
addEmployeeCard
EmployeeCard addEmployeeCard(EmployeeCard employeeCard, ResultStatus resultStatus) throws RemoteException
Not available to non-Clover apps.- Throws:
RemoteException
-
deleteEmployeeCard
void deleteEmployeeCard(EmployeeCard employeeCard, ResultStatus resultStatus) throws RemoteException
Not available to non-Clover apps.- Throws:
RemoteException
-
getEmployeeCards
List<EmployeeCard> getEmployeeCards(String employeeId, ResultStatus resultStatus) throws RemoteException
Not available to non-Clover apps.- Throws:
RemoteException
-
getEmployeeForCard
Employee getEmployeeForCard(String cardNumber, ResultStatus resultStatus) throws RemoteException
Not available to non-Clover apps.- Throws:
RemoteException
-
setFingerprintId
void setFingerprintId(String employeeId, String fingerprintId, ResultStatus resultStatus) throws RemoteException
Not available to non-Clover apps. Set a fingerprint for an employee.- Parameters:
employeeId
- , the employee's ID for whom this fingerprint is set.fingerprintId
- , the fingerprint ID.resultStatus
- , Possible status results from calling Clover services. Most Clover service calls accept an instance of the ResultStatus class as an "out" parameter- Throws:
RemoteException
-
deleteFingerprintId
void deleteFingerprintId(String employeeId, ResultStatus resultStatus) throws RemoteException
Not available to non-Clover apps. Delete the fingerprint of an employee.- Parameters:
employeeId
- , the employee's ID for whom this fingerprint is set.resultStatus
- , Possible status results from calling Clover services. Most Clover service calls accept an instance of the ResultStatus class as an "out" parameter- Throws:
RemoteException
-
getFingerprintId
int getFingerprintId(String employeeId, ResultStatus resultStatus) throws RemoteException
Not available to non-Clover apps. Get the fingerprint of an employee.- Parameters:
employeeId
- , the employee's ID for whom this fingerprint is set.resultStatus
- , Possible status results from calling Clover services. Most Clover service calls accept an instance of the ResultStatus class as an "out" parameter- Throws:
RemoteException
-
getEnrolledFingerprints
int[] getEnrolledFingerprints(ResultStatus resultStatus) throws RemoteException
Not available to non-Clover apps. Get all the enrolled fingerprints in merchant db.- Parameters:
resultStatus
- , Possible status results from calling Clover services. Most Clover service calls accept an instance of the ResultStatus class as an "out" parameter- Throws:
RemoteException
-
getEmployeeId
String getEmployeeId(int fingerprintId, ResultStatus resultStatus) throws RemoteException
Not available to non-Clover apps. Get employeeId using the fingerprintId.- Parameters:
fingerprintId
- , the fingerprint ID of the employee.resultStatus
- , Possible status results from calling Clover services. Most Clover service calls accept an instance of the ResultStatus class as an "out" parameter- Throws:
RemoteException
-
-