class PluginSessionControl extends SessionControl
Modifier and Type | Field and Description |
---|---|
private SessionControl |
parent |
Constructor and Description |
---|
PluginSessionControl(java.lang.String id,
SessionControl parent,
PluginDefinition plugin,
Job job)
Create a new plugin session control
|
Modifier and Type | Method and Description |
---|---|
PluginSessionControl |
getPluginSessionControl(PluginDefinition plugin,
Job job)
Create a new session control for executing a plugin using the same
parent as this session control has.
|
SessionControl |
impersonateLogin(int userId,
java.lang.String comment)
Log in as another user or create a clone of the currently logged in user's session.
|
SessionControl |
impersonateLogin(Ownable item,
java.lang.String comment)
Log in as the owner of the specified item.
|
(package private) void |
login(Keyring keyring) |
void |
login(LoginRequest loginRequest)
Log in to BASE.
|
void |
login(java.lang.String login,
java.lang.String password,
java.lang.String comment)
Deprecated.
|
void |
logout()
Do nothing, a plugin is not allowed to log out.
|
cleanUp, clearDbControlCache, close, deleteContext, deleteCurrentContexts, finalize, getActiveProjectId, getActiveProjectPermissions, getActiveRoles, getAllCurrentContexts, getAllPermissions, getAllPermissions, getAllRoles, getAuthenticationMethod, getClientDefaultSetting, getClientId, getContext, getContextNames, getContextNames, getCurrentContext, getCurrentContext, getCurrentContext, getCurrentContext, getCurrentSessionId, getExternalClientId, getFriends, getGroups, getId, getInactiveRoles, getItemKeyId, getItemKeys, getItemKeys, getJobId, getJobSessionControl, getLastAccess, getLocale, getLoggedInUserId, getPluginId, getPluginPermissions, getProjectKeyId, getProjectKeys, getProjectKeys, getProjectPermission, getProjects, getRemoteId, getRolePermissions, getRoles, getSessionSetting, getSharedPermissions, getUserClientSetting, getUserDefaultSetting, hasPermission, hasSystemPermission, isAllowedToUseClient, isClosed, isDenied, isFriendOf, isImpersonated, isLoggedIn, isMemberOf, isMemberOf, isMemberOf, isRoleInactive, loadContext, loadContext, newDbControl, reloadPermissions, reloadSettings, saveCurrentContextAs, saveCurrentContextAs, setActiveProject, setRoleInactive, setSessionSetting, setUserClientSetting, setUserDefaultSetting, updateLastAccess, verifyUserInternal
private final SessionControl parent
PluginSessionControl(java.lang.String id, SessionControl parent, PluginDefinition plugin, Job job)
id
- The ID of the session controlparent
- The parent session control which settings and permissions
should be copied fromplugin
- The plugin that is executingvoid login(Keyring keyring)
login
in class SessionControl
PermissionDeniedException
- Always@Deprecated public void login(java.lang.String login, java.lang.String password, java.lang.String comment) throws ItemNotFoundException, PermissionDeniedException, InvalidPasswordException, BaseException
login
in class SessionControl
PermissionDeniedException
- AlwaysItemNotFoundException
InvalidPasswordException
BaseException
public void login(LoginRequest loginRequest)
SessionControl
login
in class SessionControl
loginRequest
- Request containing login/password and other informationSessionControl.logout()
,
SessionControl.isLoggedIn()
,
SessionControl.getLoggedInUserId()
public void logout() throws BaseException
logout
in class SessionControl
BaseException
- If there is an errorSessionControl.login(String, String, String)
,
SessionControl.isLoggedIn()
,
SessionControl.impersonateLogin(int, String)
,
SessionControl.isImpersonated()
public SessionControl impersonateLogin(int userId, java.lang.String comment) throws ItemNotFoundException, PermissionDeniedException, BaseException
SessionControl
SessionControl
object which
is equivalent to a SessionControl
where that user logged in by normal means.
This method requires that the logged in user has Permission.ACT_AS_ANOTHER_USER
permission or that the userId is the same as the currently logged in user.impersonateLogin
in class SessionControl
userId
- The id of the user to login ascomment
- A comment that will be placed in the Session
informationSessionControl
objectPermissionDeniedException
- AlwaysItemNotFoundException
- If no user with the specified id existsBaseException
- If there is another errorpublic SessionControl impersonateLogin(Ownable item, java.lang.String comment)
SessionControl
impersonateLogin
in class SessionControl
item
- Login as the owner of this Item. Null is not allowedcomment
- A comment that will be placed in the Session
informationSessionControl
for the created session.PermissionDeniedException
- AlwaysSessionControl.impersonateLogin(int, String)
public PluginSessionControl getPluginSessionControl(PluginDefinition plugin, Job job)
getPluginSessionControl
in class SessionControl
plugin
- The plugin to executejob
- The job that executes the plug-in, or null