Package org.apache.manifoldcf.ui.beans
Class APIProfile
- java.lang.Object
-
- org.apache.manifoldcf.ui.beans.APIProfile
-
- All Implemented Interfaces:
java.util.EventListener
,javax.servlet.http.HttpSessionBindingListener
,IAuthorizer
public class APIProfile extends java.lang.Object implements javax.servlet.http.HttpSessionBindingListener, IAuthorizer
The profile object contains an API user's login information, and helps establish the session model for the application. This particular bean maintains the user (against the IAdminUserManager service).
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
_rcsid
-
Fields inherited from interface org.apache.manifoldcf.core.interfaces.IAuthorizer
CAPABILITY_EDIT_CONNECTIONS, CAPABILITY_EDIT_JOBS, CAPABILITY_RUN_JOBS, CAPABILITY_VIEW_CONNECTIONS, CAPABILITY_VIEW_JOBS, CAPABILITY_VIEW_REPORTS
-
-
Constructor Summary
Constructors Constructor Description APIProfile()
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
checkAllowed(IThreadContext threadContext, int capability)
Check user capabilityboolean
getLoggedOn()
Get the logged-in status, which will be false if the log-in did not succeed, or timed out.java.lang.String
getLoginTime()
Get the current login time as a string.long
getLoginTimeLong()
Get the current login time as a long.java.lang.String
getUserID()
Get the admin user id.void
login(IThreadContext threadContext, java.lang.String userID, java.lang.String userPassword)
Log on the user, with the already-set user id and company description.void
logout()
Log out the current user.java.lang.String
session()
Get the current session identifier.void
valueBound(javax.servlet.http.HttpSessionBindingEvent e)
void
valueUnbound(javax.servlet.http.HttpSessionBindingEvent e)
-
-
-
Field Detail
-
_rcsid
public static final java.lang.String _rcsid
- See Also:
- Constant Field Values
-
-
Method Detail
-
session
public java.lang.String session()
Get the current session identifier.- Returns:
- the identifier.
-
getUserID
public java.lang.String getUserID()
Get the admin user id.- Returns:
- the last login user id.
-
logout
public void logout()
Log out the current user.
-
login
public void login(IThreadContext threadContext, java.lang.String userID, java.lang.String userPassword)
Log on the user, with the already-set user id and company description.- Parameters:
userPassword
- is the login password for the user.
-
getLoggedOn
public boolean getLoggedOn()
Get the logged-in status, which will be false if the log-in did not succeed, or timed out.- Returns:
- the current login status: true if logged in.
-
getLoginTime
public java.lang.String getLoginTime()
Get the current login time as a string.- Returns:
- the last login time.
-
getLoginTimeLong
public long getLoginTimeLong()
Get the current login time as a long.- Returns:
- the last login time.
-
checkAllowed
public boolean checkAllowed(IThreadContext threadContext, int capability) throws ManifoldCFException
Check user capability- Specified by:
checkAllowed
in interfaceIAuthorizer
- Throws:
ManifoldCFException
-
valueBound
public void valueBound(javax.servlet.http.HttpSessionBindingEvent e)
- Specified by:
valueBound
in interfacejavax.servlet.http.HttpSessionBindingListener
-
valueUnbound
public void valueUnbound(javax.servlet.http.HttpSessionBindingEvent e)
- Specified by:
valueUnbound
in interfacejavax.servlet.http.HttpSessionBindingListener
-
-