public class InternalUserSource extends AbstractUserSourceProfile
This user source stores users, groups, extended properties, and contact info inside the internal database. It is fully compliant with the user-source editing capabilities of Ignition.
Relevant persistent records:
cacheValidationTimeout, context, manager, profileId, profileName
Constructor and Description |
---|
InternalUserSource(GatewayContext context,
long profileId,
java.lang.String profileName,
long cacheTimeout) |
Modifier and Type | Method and Description |
---|---|
void |
addRole(java.lang.String newName,
UICallback ui) |
void |
addUser(User user,
UICallback ui) |
void |
alterUser(User user,
UICallback ui) |
AuthenticatedUser |
authenticate(AuthChallenge challenge)
Called to both verify authentication for a given username/password pair, and to find the security roles for that
user.
|
static long |
createDefaultUserSource(GatewayContext context)
Creates an internal user source called "default" with user "admin"/"password" and role "Administrator".
|
protected java.lang.Long |
findUserInternalId(PersistenceSession session,
User user) |
protected java.util.List<ContactInfo> |
getContactInfoForUser(PersistenceSession session,
InternalUserRecord user) |
java.util.Set<UserSourceEditCapability> |
getEditFlags()
Which of the editing functions are supported?
|
java.util.Collection<java.lang.String> |
getRoles() |
protected java.util.List<java.lang.String> |
getRolesForUser(PersistenceSession session,
InternalUserRecord user) |
protected java.util.List<ScheduleAdjustment> |
getScheduleAdjustmentsForUser(PersistenceSession session,
InternalUserRecord user) |
java.util.Collection<User> |
getUsers()
Retrieve all users from this profile.
|
protected void |
loadExtendedUserProperties(PersistenceSession session,
InternalUserRecord userRec,
PropertySet user) |
protected void |
loadUserProperties(InternalUserRecord userRec,
User user) |
void |
removeRole(java.lang.String group,
UICallback ui) |
void |
removeUser(User user,
UICallback ui) |
void |
renameRole(java.lang.String oldName,
java.lang.String newName,
UICallback ui) |
java.lang.String |
toString() |
getCacheValidationTimeout, getName, getProfileId, shutdown, startup
public InternalUserSource(GatewayContext context, long profileId, java.lang.String profileName, long cacheTimeout)
public static long createDefaultUserSource(GatewayContext context) throws java.lang.Exception
java.lang.Exception
public AuthenticatedUser authenticate(AuthChallenge challenge) throws java.lang.Exception
UserSourceProfile
java.lang.Exception
public java.util.Collection<User> getUsers()
UserSourceProfile
protected void loadUserProperties(InternalUserRecord userRec, User user)
protected java.util.List<java.lang.String> getRolesForUser(PersistenceSession session, InternalUserRecord user)
protected java.util.List<ContactInfo> getContactInfoForUser(PersistenceSession session, InternalUserRecord user)
protected java.util.List<ScheduleAdjustment> getScheduleAdjustmentsForUser(PersistenceSession session, InternalUserRecord user)
protected void loadExtendedUserProperties(PersistenceSession session, InternalUserRecord userRec, PropertySet user)
public java.util.Collection<java.lang.String> getRoles() throws java.lang.Exception
java.lang.Exception
public java.lang.String toString()
toString
in class java.lang.Object
public java.util.Set<UserSourceEditCapability> getEditFlags()
UserSourceProfile
getEditFlags
in interface UserSourceProfile
getEditFlags
in class AbstractUserSourceProfile
public void addUser(User user, UICallback ui) throws java.lang.Exception
addUser
in interface UserSourceProfile
addUser
in class AbstractUserSourceProfile
java.lang.Exception
protected java.lang.Long findUserInternalId(PersistenceSession session, User user)
public void alterUser(User user, UICallback ui) throws java.lang.Exception
alterUser
in interface UserSourceProfile
alterUser
in class AbstractUserSourceProfile
java.lang.Exception
public void removeUser(User user, UICallback ui) throws java.lang.Exception
removeUser
in interface UserSourceProfile
removeUser
in class AbstractUserSourceProfile
java.lang.Exception
public void addRole(java.lang.String newName, UICallback ui) throws java.lang.Exception
addRole
in interface UserSourceProfile
addRole
in class AbstractUserSourceProfile
java.lang.Exception
public void renameRole(java.lang.String oldName, java.lang.String newName, UICallback ui) throws java.lang.Exception
renameRole
in interface UserSourceProfile
renameRole
in class AbstractUserSourceProfile
java.lang.Exception
public void removeRole(java.lang.String group, UICallback ui) throws java.lang.Exception
removeRole
in interface UserSourceProfile
removeRole
in class AbstractUserSourceProfile
java.lang.Exception