|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface UserProvider
Among the interfaces of JReport security API, UserProvider is used to
provide customized information of the principal user. In addition to getting user information
from customer's external security system, this interface also provides the ability
to modify user information in customer's external security system.
| Field Summary | |
|---|---|
static java.lang.String |
TAG_USER_CREATED_TIME
Property of user, indicates the time when a user is created, the value is "user_created_time". |
static java.lang.String |
TAG_USER_DESCRIPTION
Property of user, indicates description of a user, the value is "user_description". |
static java.lang.String |
TAG_USER_DISABLED_ACCOUNT
Property of user, indicates whether this user account is disabled in the security system, the value is "user_disabled_account". |
static java.lang.String |
TAG_USER_EMAIL
Property of user, indicates a user's email address, the value is "user_email". |
static java.lang.String |
TAG_USER_ENABLE_NULL_PWD
Property of user, indicates whether a user can have null password, the value is "user_enable_null_pwd". |
static java.lang.String |
TAG_USER_EXPIRE_TIME
Property of user, indicates how long for when the user will expire after last time modification, the value is "user_expire_time". |
static java.lang.String |
TAG_USER_FULLNAME
Property of user, indicates a user's full name, the value is "user_fullname". |
static java.lang.String |
TAG_USER_LAST_MODIFY_TIME
Property of user, indicates the last time when user properties is modified, the value is "user_last_modify_time". |
static java.lang.String |
TAG_USER_MIN_PWD_LENGTH
Property of user, indicates the minimum password length, the value is "user_min_pwd_length". |
static java.lang.String |
TAG_USER_NAME
Property of user, indicates user name, the value is "user_name". |
static java.lang.String |
TAG_USER_NEVER_EXPIRE
Property of user, indicates whether the user never expires, the value is "user_never_expire". |
static java.lang.String |
TAG_USER_PASSWORD
Property of user, indicates the user's password, the value is "user_password". |
| Method Summary | |
|---|---|
void |
addUser(java.lang.String realmName,
java.util.Properties props)
Adds a user into customer's external security system. |
java.util.Iterator |
getAllUsers(java.lang.String realmName)
Gets all user names from customer's external security system. |
java.util.Properties |
getUserProperties(java.lang.String realmName,
java.lang.String userName)
Gets a Properties used to represent a user. |
boolean |
isEnableEdit()
Indicates whether customer's external security system will be modified by invoking some methods in UserProvider.In common cases, invoking addUser(), setUser() or
removeUser() should take effect on
customer's external security system, and cause modification of external security
system, this method should return true in such cases. |
void |
removeUser(java.lang.String realmName,
java.lang.String userName)
Removes the specified user from customer's external security system. |
void |
setUser(java.lang.String realmName,
java.util.Properties props)
Updates the specified user's properties to customer's external security system. |
| Field Detail |
|---|
static final java.lang.String TAG_USER_NAME
String value that non-null, length is bigger than zero.
static final java.lang.String TAG_USER_DESCRIPTION
String value.
static final java.lang.String TAG_USER_FULLNAME
String value.
static final java.lang.String TAG_USER_EMAIL
String value.
static final java.lang.String TAG_USER_CREATED_TIME
Date value.
In a Properties to represent a user, the value of the key TAG_USER_CREATED_TIME
is a Date.
static final java.lang.String TAG_USER_PASSWORD
String value.
static final java.lang.String TAG_USER_ENABLE_NULL_PWD
null password, the value is "user_enable_null_pwd". This property is
a boolean value. In a Properties to represent a user,
the value of the key TAG_USER_ENABLE_NULL_PWD is a string representation of
boolean value.
static final java.lang.String TAG_USER_LAST_MODIFY_TIME
Date value. In a Properties to represent a user,
the value of the key TAG_USER_LAST-MODIFY_TIME is a Date.
static final java.lang.String TAG_USER_NEVER_EXPIRE
boolean value.
In a Properties to represent a user, the value of the key
TAG_USER_NEVER_EXPIRE is a string representation of boolean value.
static final java.lang.String TAG_USER_EXPIRE_TIME
int value, the unit is day. In a Properties to represent
a user, the value of the key TAG_USER_EXPIRE_TIME is a string representation
of int value.
static final java.lang.String TAG_USER_MIN_PWD_LENGTH
int value.
In a Properties to represent a user, the value of the key
TAG_USER_MIN_PWD_LENGTH is a string representation of int value.
static final java.lang.String TAG_USER_DISABLED_ACCOUNT
boolean value. In a Properties to represent a
user, the value of the key TAG_USER_DISABLED_ACCOUNT is a string representation
of boolean value.
- See Also:
- Constant Field Values
| Method Detail |
|---|
java.util.Iterator getAllUsers(java.lang.String realmName)
throws JRCustomerException
realmName - the realm name.
JRCustomerException - If an error occurs during JReport server security
system invoking this method, and the implementation thinks this error should be thrown
to JReport server security system.
java.util.Properties getUserProperties(java.lang.String realmName,
java.lang.String userName)
throws NoSuchUserException,
JRCustomerException
Properties used to represent a user.
realmName - the realm name.userName - the user name.
Properties that represents a user. If a null
or an empty Properties is returned, it means there is not any property
for the specified user.
NoSuchUserException - If there is no user with the specified name in
customer's external security system.
JRCustomerException - If an error occurs during JReport server security
system invoking this method, and the implementation thinks this error should be thrown
to JReport server security system.
void addUser(java.lang.String realmName,
java.util.Properties props)
throws UserExistsException,
JRCustomerException
Properties.
realmName - the realm name.props - a Properties that represents a user.
UserExistsException - If there is a user with the same name in customer's
external security system.
JRCustomerException - If an error occurs during JReport server security
system invoking this method, and the implementation thinks this error should be thrown
to JReport server security system.
void setUser(java.lang.String realmName,
java.util.Properties props)
throws NoSuchUserException,
JRCustomerException
realmName - the realm name.props - a Properties that represents a user.
NoSuchUserException - If there is no user with the specified name (indicated
by TAG_USER_NAME in props) in customer's
external security system.
JRCustomerException - If an error occurs during JReport server security
system invoking this method, and the implementation thinks this error should be thrown
to JReport server security system.
void removeUser(java.lang.String realmName,
java.lang.String userName)
throws NoSuchUserException,
JRCustomerException
realmName - the realm name.userName - the user name to specify which user needs to be removed.
NoSuchUserException - If there is no user with the specified name (indicated
by TAG_USER_NAME in props) in customer's
external security system.
JRCustomerException - If an error occurs during JReport server security
system invoking this method, and the implementation thinks this error should be thrown
to JReport server security system.boolean isEnableEdit()
UserProvider.addUser(), setUser() or
removeUser() should take effect on
customer's external security system, and cause modification of external security
system, this method should return true in such cases. If customer's external
security system will not be affected by invoking addUser(), setUser() or
removeUser(), this method should return false. isEditing() with parameters
SecurityWebAdaptor.ACTION_ADD_USER
SecurityWebAdaptor.ACTION_REMOVE_USER
SecurityWebAdaptor.ACTION_EDIT_USER_PROPERTIES
in jet.server.api.SecurityWebAdaptor
is the same as this method's return value.
true if external security system will be affected by invoking
addUser(), setUser() or
removeUser(), otherwise return false.SecurityWebAdaptor
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||