|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.olat.basesecurity.PersistingManager
public class PersistingManager
| Field Summary | |
|---|---|
static OLATResourceable |
IDENTITY_EVENT_CHANNEL
|
| Method Summary | |
|---|---|
void |
addIdentityToSecurityGroup(Identity identity,
SecurityGroup secGroup)
|
int |
countIdentitiesOfSecurityGroup(SecurityGroup secGroup)
|
java.lang.Long |
countUniqueUserLoginsSince(java.util.Date lastLoginLimit)
get number of users with last login greater than lastLoginLimit |
Authentication |
createAndPersistAuthentication(Identity ident,
java.lang.String provider,
java.lang.String authUserName,
java.lang.String credential)
|
Identity |
createAndPersistIdentity(java.lang.String username,
User user,
java.lang.String provider,
java.lang.String authusername,
java.lang.String credential)
|
Identity |
createAndPersistIdentityAndUser(java.lang.String username,
User user,
java.lang.String provider,
java.lang.String authusername,
java.lang.String credential)
|
SecurityGroup |
createAndPersistNamedSecurityGroup(java.lang.String groupName)
create only makes no sense, since there are no attibutes to set |
Policy |
createAndPersistPolicy(SecurityGroup secGroup,
java.lang.String permission,
OLATResourceable olatResourceable)
the olatResourceable is not required to have some persisted implementation, but the manager will use the OLATResource to persist it. |
Policy |
createAndPersistPolicyWithResource(SecurityGroup secGroup,
java.lang.String permission,
OLATResource olatResource)
Creates a policy and persists on the database |
SecurityGroup |
createAndPersistSecurityGroup()
create only makes no sense, since there are no attibutes to set |
void |
deleteAuthentication(Authentication auth)
|
void |
deletePolicy(SecurityGroup secGroup,
java.lang.String permission,
OLATResourceable olatResourceable)
|
void |
deleteSecurityGroup(SecurityGroup secGroup)
removes the group with all the idendities contained in it, the idenities itself are of course not deleted. |
Authentication |
findAuthentication(Identity identity,
java.lang.String provider)
|
Authentication |
findAuthenticationByAuthusername(java.lang.String authusername,
java.lang.String provider)
|
Identity |
findIdentityByName(java.lang.String identityName)
Find an identity by its name. |
SecurityGroup |
findSecurityGroupByName(java.lang.String securityGroupName)
|
Identity |
getAndUpdateAnonymousUserForLanguage(java.util.Locale locale)
Returns the anonymous identity for a given locale, normally used to log in as guest user |
java.util.List<Authentication> |
getAuthentications(Identity identity)
Return the List of associated Authentications. |
java.util.List |
getGroupsWithPermissionOnOlatResourceable(java.lang.String permission,
OLATResourceable olatResourceable)
use for testing ONLY. |
java.util.List |
getIdentitiesAndDateOfSecurityGroup(SecurityGroup secGroup)
|
java.util.List |
getIdentitiesAndDateOfSecurityGroup(SecurityGroup secGroup,
boolean sortedByAddDate)
|
java.util.List |
getIdentitiesByPowerSearch(java.lang.String login,
java.util.Map<java.lang.String,java.lang.String> userproperties,
boolean userPropertiesAsIntersectionSearch,
SecurityGroup[] groups,
PermissionOnResourceable[] permissionOnResources,
java.lang.String[] authProviders,
java.util.Date createdAfter,
java.util.Date createdBefore,
java.lang.Integer status)
Get a list of identities that match the following conditions. |
java.util.List |
getIdentitiesOfSecurityGroup(SecurityGroup secGroup)
search |
java.util.List |
getIdentitiesWithPermissionOnOlatResourceable(java.lang.String permission,
OLATResourceable olatResourceable)
use for testing ONLY. |
java.util.List |
getPoliciesOfIdentity(Identity identity)
scalar query : select sgi, poi, ori |
java.util.List |
getPoliciesOfSecurityGroup(SecurityGroup secGroup)
|
Roles |
getRoles(Identity identity)
Get the identity's roles |
java.util.Date |
getSecurityGroupJoinDateForIdentity(SecurityGroup secGroup,
Identity identity)
Get date where identity joined a security group |
java.util.List<SecurityGroup> |
getSecurityGroupsForIdentity(Identity identity)
Get all SecurtityGroups an Identity is in |
java.util.List |
getVisibleIdentitiesByPowerSearch(java.lang.String login,
java.util.Map<java.lang.String,java.lang.String> userproperties,
boolean userPropertiesAsIntersectionSearch,
SecurityGroup[] groups,
PermissionOnResourceable[] permissionOnResources,
java.lang.String[] authProviders,
java.util.Date createdAfter,
java.util.Date createdBefore)
Get a list of identities that match the following conditions. |
void |
init()
|
boolean |
isIdentityInSecurityGroup(Identity identity,
SecurityGroup secGroup)
use only if really needed. |
boolean |
isIdentityPermittedOnResourceable(Identity identity,
java.lang.String permission,
OLATResourceable olatResourceable)
is allowed to.... |
boolean |
isIdentityPermittedOnResourceable(Identity identity,
java.lang.String permission,
OLATResourceable olatResourceable,
boolean checkTypeRight)
|
boolean |
isIdentityVisible(java.lang.String identityName)
Check if identity is visible. |
Identity |
loadIdentityByKey(java.lang.Long identityKey)
find an identity by the key instead of the username. |
Identity |
loadIdentityByKey(java.lang.Long identityKey,
boolean strict)
find an identity by the key. |
void |
removeIdentityFromSecurityGroup(Identity identity,
SecurityGroup secGroup)
Removes the identity from this security group or does nothing if the identity is not in the group at all. |
void |
saveIdentityStatus(Identity identity,
java.lang.Integer status)
Save an identity |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final OLATResourceable IDENTITY_EVENT_CHANNEL
| Method Detail |
|---|
public void init()
init in interface ManagerManager.init()
public java.util.List getGroupsWithPermissionOnOlatResourceable(java.lang.String permission,
OLATResourceable olatResourceable)
Manager
getGroupsWithPermissionOnOlatResourceable in interface Managerorg.olat.basesecurity.Manager#getGroupsWithPermissionOnOlatResourceable(java.lang.String,
org.olat.core.id.OLATResourceable
public java.util.List getIdentitiesWithPermissionOnOlatResourceable(java.lang.String permission,
OLATResourceable olatResourceable)
Manager
getIdentitiesWithPermissionOnOlatResourceable in interface Managerorg.olat.basesecurity.Manager#getIdentitiesWithPermissionOnOlatResourceable(java.lang.String,
org.olat.core.id.OLATResourceablepublic java.util.List getPoliciesOfSecurityGroup(SecurityGroup secGroup)
getPoliciesOfSecurityGroup in interface ManagerManager.getPoliciesOfSecurityGroup(org.olat.basesecurity.SecurityGroup)
public boolean isIdentityPermittedOnResourceable(Identity identity,
java.lang.String permission,
OLATResourceable olatResourceable)
Manager
isIdentityPermittedOnResourceable in interface Managerorg.olat.basesecurity.Manager#isIdentityPermittedOnResourceable(org.olat.core.id.Identity, java.lang.String, org.olat.core.id.OLATResourceable
public boolean isIdentityPermittedOnResourceable(Identity identity,
java.lang.String permission,
OLATResourceable olatResourceable,
boolean checkTypeRight)
isIdentityPermittedOnResourceable in interface ManagerManager.isIdentityPermittedOnResourceable(org.olat.core.id.Identity, java.lang.String, org.olat.core.id.OLATResourceable boolean)public Roles getRoles(Identity identity)
Manager
getRoles in interface ManagerManager.getRoles(org.olat.core.id.Identity)public java.util.List getPoliciesOfIdentity(Identity identity)
getPoliciesOfIdentity in interface Manageridentity -
public boolean isIdentityInSecurityGroup(Identity identity,
SecurityGroup secGroup)
Manager
isIdentityInSecurityGroup in interface ManagerManager.isIdentityInSecurityGroup(org.olat.core.id.Identity, org.olat.basesecurity.SecurityGroup)public SecurityGroup createAndPersistSecurityGroup()
Manager
createAndPersistSecurityGroup in interface ManagerManager.createAndPersistSecurityGroup()public void deleteSecurityGroup(SecurityGroup secGroup)
Manager
deleteSecurityGroup in interface ManagerManager.deleteSecurityGroup(org.olat.basesecurity.SecurityGroup)
public void addIdentityToSecurityGroup(Identity identity,
SecurityGroup secGroup)
addIdentityToSecurityGroup in interface ManagerManager.addIdentityToSecurityGroup(org.olat.core.id.Identity, org.olat.basesecurity.SecurityGroup)
public void removeIdentityFromSecurityGroup(Identity identity,
SecurityGroup secGroup)
Manager
removeIdentityFromSecurityGroup in interface ManagerManager.removeIdentityFromSecurityGroup(org.olat.core.id.Identity, org.olat.basesecurity.SecurityGroup)
public Policy createAndPersistPolicy(SecurityGroup secGroup,
java.lang.String permission,
OLATResourceable olatResourceable)
Manager
createAndPersistPolicy in interface Managerorg.olat.basesecurity.Manager#createAndPersistPolicy(org.olat.basesecurity.SecurityGroup, java.lang.String, org.olat.core.id.OLATResourceable
public Policy createAndPersistPolicyWithResource(SecurityGroup secGroup,
java.lang.String permission,
OLATResource olatResource)
createAndPersistPolicyWithResource in interface ManagersecGroup - permission - olatResource -
public void deletePolicy(SecurityGroup secGroup,
java.lang.String permission,
OLATResourceable olatResourceable)
deletePolicy in interface Managerorg.olat.basesecurity.Manager#deletePolicy(org.olat.basesecurity.SecurityGroup, java.lang.String, org.olat.core.id.OLATResourceable
public Identity createAndPersistIdentity(java.lang.String username,
User user,
java.lang.String provider,
java.lang.String authusername,
java.lang.String credential)
createAndPersistIdentity in interface Managerusername - the usernameuser - the presisted Userauthusername - the username used as authentication credential
(=username for provider "OLAT")provider - the provider of the authentication ("OLAT" or "AAI"). If null, no
authentication token is generated.credential - the credentials or null if not used
public Identity createAndPersistIdentityAndUser(java.lang.String username,
User user,
java.lang.String provider,
java.lang.String authusername,
java.lang.String credential)
createAndPersistIdentityAndUser in interface Managerusername - the usernameuser - the unpresisted Userauthusername - the username used as authentication credential
(=username for provider "OLAT")provider - the provider of the authentication ("OLAT" or "AAI"). If null, no
authentication token is generated.credential - the credentials or null if not used
public java.util.List getIdentitiesOfSecurityGroup(SecurityGroup secGroup)
Manager
getIdentitiesOfSecurityGroup in interface ManagerManager.getIdentitiesOfSecurityGroup(org.olat.basesecurity.SecurityGroup)public java.util.List getIdentitiesAndDateOfSecurityGroup(SecurityGroup secGroup)
getIdentitiesAndDateOfSecurityGroup in interface ManagerManager.getIdentitiesAndDateOfSecurityGroup(org.olat.basesecurity.SecurityGroup)
public java.util.List getIdentitiesAndDateOfSecurityGroup(SecurityGroup secGroup,
boolean sortedByAddDate)
getIdentitiesAndDateOfSecurityGroup in interface ManagersortedByAddDate - true= return list of idenities sorted by added dateManager.getIdentitiesAndDateOfSecurityGroup(org.olat.basesecurity.SecurityGroup)
public java.util.Date getSecurityGroupJoinDateForIdentity(SecurityGroup secGroup,
Identity identity)
Manager
getSecurityGroupJoinDateForIdentity in interface ManagerManager.getSecurityGroupJoinDateForIdentity(org.olat.basesecurity.SecurityGroup, org.olat.core.id.Identity)public int countIdentitiesOfSecurityGroup(SecurityGroup secGroup)
countIdentitiesOfSecurityGroup in interface ManagerManager.countIdentitiesOfSecurityGroup(org.olat.basesecurity.SecurityGroup)public SecurityGroup createAndPersistNamedSecurityGroup(java.lang.String groupName)
Manager
createAndPersistNamedSecurityGroup in interface ManagerManager.createAndPersistNamedSecurityGroup(java.lang.String)public SecurityGroup findSecurityGroupByName(java.lang.String securityGroupName)
findSecurityGroupByName in interface ManagerManager.findSecurityGroupByName(java.lang.String)public Identity findIdentityByName(java.lang.String identityName)
ManagerBe aware that this method does not check the identities status! This method returns identities with any state, also deleted identities!
findIdentityByName in interface ManagerManager.findIdentityByName(java.lang.String)public Identity loadIdentityByKey(java.lang.Long identityKey)
Manager
loadIdentityByKey in interface ManageridentityKey - the key of the identity to load; may not be null or zero
Manager.loadIdentityByKey(java.lang.Long)
public Identity loadIdentityByKey(java.lang.Long identityKey,
boolean strict)
Manager
loadIdentityByKey in interface ManageridentityKey - the key of the identity to load; may not be null or zerostrict - if true equivalent to @see org.olat.basesecurity.Manager#loadIdentityByKey(java.lang.Long), if false return null if not found
Manager.loadIdentityByKey(java.lang.Long)public java.lang.Long countUniqueUserLoginsSince(java.util.Date lastLoginLimit)
Manager
countUniqueUserLoginsSince in interface ManagerManager.countUniqueUserLoginsSince(java.util.Date)public java.util.List<Authentication> getAuthentications(Identity identity)
Manager
getAuthentications in interface ManagerManager.getAuthentications(org.olat.core.id.Identity)
public Authentication createAndPersistAuthentication(Identity ident,
java.lang.String provider,
java.lang.String authUserName,
java.lang.String credential)
createAndPersistAuthentication in interface ManagerManager.createAndPersistAuthentication(org.olat.core.id.Identity, java.lang.String, java.lang.String, java.lang.String)
public Authentication findAuthentication(Identity identity,
java.lang.String provider)
findAuthentication in interface ManagerManager.findAuthentication(org.olat.core.id.Identity, java.lang.String)public void deleteAuthentication(Authentication auth)
deleteAuthentication in interface ManagerManager.deleteAuthentication(org.olat.basesecurity.Authentication)
public Authentication findAuthenticationByAuthusername(java.lang.String authusername,
java.lang.String provider)
findAuthenticationByAuthusername in interface ManagerManager.findAuthenticationByAuthusername(java.lang.String, java.lang.String)
public java.util.List getVisibleIdentitiesByPowerSearch(java.lang.String login,
java.util.Map<java.lang.String,java.lang.String> userproperties,
boolean userPropertiesAsIntersectionSearch,
SecurityGroup[] groups,
PermissionOnResourceable[] permissionOnResources,
java.lang.String[] authProviders,
java.util.Date createdAfter,
java.util.Date createdBefore)
Manager
getVisibleIdentitiesByPowerSearch in interface ManageruserPropertiesAsIntersectionSearch - true: user properties and login
name are combined with an AND query; false: user properties and
login name are combined with an OR querygroups - Array of SecurityGroups the user participates in. Search
machtches if user is in any of the groups (OR query)permissionOnResources - Array of resource permissions the user has.
Search machtches if user has any of the permissions (OR query)authProviders - Array of authenticaton providers the user has. Search
machtches if user has any of the authProviders (OR query)createdAfter - date after which the user has been createdcreatedBefore - date before which the user has been created
Manager.getVisibleIdentitiesByPowerSearch(java.lang.String, java.util.Map, boolean, org.olat.basesecurity.SecurityGroup[], org.olat.basesecurity.PermissionOnResourceable[], java.lang.String[], java.util.Date, java.util.Date)
public java.util.List getIdentitiesByPowerSearch(java.lang.String login,
java.util.Map<java.lang.String,java.lang.String> userproperties,
boolean userPropertiesAsIntersectionSearch,
SecurityGroup[] groups,
PermissionOnResourceable[] permissionOnResources,
java.lang.String[] authProviders,
java.util.Date createdAfter,
java.util.Date createdBefore,
java.lang.Integer status)
Manager
getIdentitiesByPowerSearch in interface ManageruserPropertiesAsIntersectionSearch - true: user properties and login
name are combined with an AND query; false: user properties and
login name are combined with an OR querygroups - Array of SecurityGroups the user participates in. Search
machtches if user is in any of the groups (OR query)permissionOnResources - Array of resource permissions the user has.
Search machtches if user has any of the permissions (OR query)authProviders - Array of authenticaton providers the user has. Search
machtches if user has any of the authProviders (OR query)createdAfter - date after which the user has been createdcreatedBefore - date before which the user has been createdstatus - identity status, define in interface Identity e.g. ACTIV,
LOGIN_DENIED, DELETED
Manager.getIdentitiesByPowerSearch(java.lang.String, java.util.Map, boolean, org.olat.basesecurity.SecurityGroup[], org.olat.basesecurity.PermissionOnResourceable[], java.lang.String[], java.util.Date, java.util.Date, java.lang.Integer)public boolean isIdentityVisible(java.lang.String identityName)
Manager
isIdentityVisible in interface ManagerManager.isIdentityVisible(java.lang.String)
public void saveIdentityStatus(Identity identity,
java.lang.Integer status)
Manager
saveIdentityStatus in interface Manageridentity - Save this identityorg.olat.basesecurity.Manager#saveIdentityStatus(org.olat.core.id.Identity)public java.util.List<SecurityGroup> getSecurityGroupsForIdentity(Identity identity)
Manager
getSecurityGroupsForIdentity in interface Managerpublic Identity getAndUpdateAnonymousUserForLanguage(java.util.Locale locale)
Manager
getAndUpdateAnonymousUserForLanguage in interface ManagerManager.getAndUpdateAnonymousUserForLanguage(java.util.Locale)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||