Interface PrivilegeTools
-
public interface PrivilegeTools
Set of basic privileges/grants utilities.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static PrivilegeTools
getInstance(Session session)
Returns a new instance of the default tools implementation.boolean
hasPrivilege(String privilege)
Returns whether the application instance has been granted the specified account privilege.void
validatePrivileges(String... privileges)
Validates whether the application instance has been granted the specified account privileges.
-
-
-
Method Detail
-
hasPrivilege
boolean hasPrivilege(String privilege)
Returns whether the application instance has been granted the specified account privilege.- Parameters:
privilege
- account privilege- Returns:
- whether the application instance has been granted the specified account privilege
-
validatePrivileges
void validatePrivileges(String... privileges)
Validates whether the application instance has been granted the specified account privileges.- Parameters:
privileges
- account privileges- Throws:
RequiredPrivilegesMissingException
- if any of the specified privileges was not granted
-
getInstance
static PrivilegeTools getInstance(Session session)
Returns a new instance of the default tools implementation.- Parameters:
session
- Snowpark session object- Returns:
- a new tools instance
-
-