-
public interface OperatorRepository
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceOperatorRepository.ListenerInterface for when active operator changes.
-
Method Summary
Modifier and Type Method Description abstract OperatorgetActiveOperator()Retrieve the active Operator. abstract List<Operator>getOperators()Retrieve the list of Operator. abstract voidaddListener(@NonNull() OperatorRepository.Listener listener)Register Listener that used for being notified of updates/changes in the active operator. abstract voidremoveListener(@NonNull() OperatorRepository.Listener listener)Unregisters/removes the listener registered in addListener. -
-
Method Detail
-
getActiveOperator
@NonNull() abstract Operator getActiveOperator()
Retrieve the active Operator.
The following permission is required to access the data:
SID: se.cpacsystems.permission.READ_OPERATOR_PROFILES
-
getOperators
@NonNull() abstract List<Operator> getOperators()
Retrieve the list of Operator.
This is run on the thread that it was called on. Consider running it on background thread.
The following permission is required to access the data:
se.cpacsystems.permission.READ_OPERATOR_PROFILES
-
addListener
abstract void addListener(@NonNull() OperatorRepository.Listener listener)
Register Listener that used for being notified of updates/changes in the active operator.
When registering, a request/query is made directly which will trigger the listeners onActiveUpdated and the active operator will be retrieved.
IMPORTANT! To avoid leaks make sure the listener are unregistered by using removeListener}.
The following permission is required to access the data:
SID: se.cpacsystems.permission.READ_OPERATOR_PROFILES- Parameters:
listener- the callback
-
removeListener
abstract void removeListener(@NonNull() OperatorRepository.Listener listener)
Unregisters/removes the listener registered in addListener.
-
-
-
-