Expand Minimize Picture-in-picture Power Device Status Voice Recognition Skip Back Skip Forward Minus Plus Play Search
Documentation
Sidebar

Class PermissionManager

Hierarchy

java.lang.Object
     com.smartdevicelink.managers.BaseSubManager

Package
com.smartdevicelink.managers.permission

Overview

PermissionManager gives the developer information about what permissions are permitted in specific HMI level and helps developers setup listeners to be called when specific permissions become allowed.
This should be used through the com.smartdevicelink.managers.SdlManager and not be instantiated by itself

Fields

PERMISSION_GROUP_STATUS_ALLOWED

public static final int PERMISSION_GROUP_STATUS_ALLOWED

PERMISSION_GROUP_STATUS_DISALLOWED

public static final int PERMISSION_GROUP_STATUS_DISALLOWED
Constant Value
1

PERMISSION_GROUP_STATUS_MIXED

public static final int PERMISSION_GROUP_STATUS_MIXED
Constant Value
2

PERMISSION_GROUP_STATUS_UNKNOWN

public static final int PERMISSION_GROUP_STATUS_UNKNOWN
Constant Value
3

PERMISSION_GROUP_TYPE_ALL_ALLOWED

public static final int PERMISSION_GROUP_TYPE_ALL_ALLOWED

PERMISSION_GROUP_TYPE_ANY

public static final int PERMISSION_GROUP_TYPE_ANY
Constant Value
1

Inherited Fields

From Class Fields
com.smartdevicelink.managers.BaseSubManager SETTING_UP, READY, LIMITED, SHUTDOWN, ERROR, internalInterface

Constructors

PermissionManager( ISdl internalInterface )

Creates a new instance of the PermissionManager

public PermissionManager(ISdl internalInterface)

Parameters

internalInterface

Methods

start( CompletionListener listener )

public void start(CompletionListener listener)

Parameters

listener

isRPCAllowed( FunctionID rpcName )

Determine if an individual RPC is allowed for the current permission items and HMI level

public boolean isRPCAllowed(FunctionID rpcName)

Parameters

rpcName
rpcName FunctionID value that represents the name of the RPC

isPermissionParameterAllowed( FunctionID rpcName, String parameter )

Determine if an individual permission parameter is allowed for current permission items and current HMI level

public boolean isPermissionParameterAllowed(FunctionID rpcName,String parameter)

Parameters

rpcName
FunctionID value that represents the name of the RPC
parameter
String value that represents a parameter for the RPC

dispose()

Clean up everything after the manager is no longer needed

public void dispose()

getGroupStatusOfPermissions( java.util.List<com.smartdevicelink.managers.permission.PermissionElement> permissionElements )

Determine if a group of permissions is allowed for the current HMI level

public int getGroupStatusOfPermissions(java.util.List<com.smartdevicelink.managers.permission.PermissionElement> permissionElements)

Parameters

permissionElements
list of PermissionElement that represents the RPC names and their parameters

getStatusOfPermissions( java.util.List<com.smartdevicelink.managers.permission.PermissionElement> permissionElements )

Determine if a group of permissions is allowed for the current HMI level This method is similar to getGroupStatusOfPermissions() but returns more detailed result about each individual permission

public java.util.Map getStatusOfPermissions(java.util.List<com.smartdevicelink.managers.permission.PermissionElement> permissionElements)

Parameters

permissionElements
list of PermissionElement that represents the RPC names and their parameters

addListener( java.util.List<com.smartdevicelink.managers.permission.PermissionElement> permissionElements, int groupType, OnPermissionChangeListener listener )

Add a listener to be called when there is permissions change

public java.util.UUID addListener(java.util.List<com.smartdevicelink.managers.permission.PermissionElement> permissionElements,int groupType,OnPermissionChangeListener listener)

Parameters

permissionElements
list of PermissionElement that represents the RPC names and their parameters
groupType
PermissionGroupType int value represents whether we need the listener to be called when there is any permissions change or only when all permission become allowed
listener
OnPermissionChangeListener interface

removeListener( UUID listenerId )

Removes specific listener

public void removeListener(UUID listenerId)

Parameters

listenerId
the id of the listener

Inherited Methods

From Class Methods
com.smartdevicelink.managers.BaseSubManager start, dispose, transitionToState, getState, handleTransportUpdated, onTransportUpdate
java.lang.Object getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize
View on GitHub.com
Previous Section Next Section