com.evolveum.midpoint.model.expr
Class MidpointFunctions

java.lang.Object
  extended by com.evolveum.midpoint.model.expr.MidpointFunctions

@Component
public class MidpointFunctions
extends Object

Author:
semancik

Constructor Summary
MidpointFunctions()
           
 
Method Summary
 Collection<UserType> getManagers(UserType user)
           
 Collection<UserType> getManagersOfOrg(String orgOid)
           
 Collection<String> getManagersOids(UserType user)
          Returns a list of user's managers.
 Collection<String> getManagersOidsExceptUser(UserType user)
           
 OrgType getOrgByName(String name)
           
 OrgType getOrgByOid(String oid)
           
 Collection<String> getOrgUnits(UserType user)
           
 UserType getUserByOid(String oid)
           
 String hello(String name)
           
 boolean isManagerOf(UserType user, String orgOid)
           
 boolean isMemberOf(UserType user, String orgOid)
           
 List<String> toList(String... s)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MidpointFunctions

public MidpointFunctions()
Method Detail

hello

public String hello(String name)

toList

public List<String> toList(String... s)

getManagersOids

public Collection<String> getManagersOids(UserType user)
                                   throws SchemaException,
                                          ObjectNotFoundException
Returns a list of user's managers. Formally, for each Org O which this user has (any) relation to, all managers of O are added to the result. Some customizations are probably necessary here, e.g. filter out project managers (keep only line managers), or defining who is a manager of a user who is itself a manager in its org.unit. (A parent org unit manager, perhaps.)

Parameters:
user -
Returns:
list of oids of the respective managers
Throws:
SchemaException
ObjectNotFoundException

getManagersOidsExceptUser

public Collection<String> getManagersOidsExceptUser(UserType user)
                                             throws SchemaException,
                                                    ObjectNotFoundException
Throws:
SchemaException
ObjectNotFoundException

getManagers

public Collection<UserType> getManagers(UserType user)
                                 throws SchemaException,
                                        ObjectNotFoundException
Throws:
SchemaException
ObjectNotFoundException

getUserByOid

public UserType getUserByOid(String oid)
                      throws ObjectNotFoundException,
                             SchemaException
Throws:
ObjectNotFoundException
SchemaException

getOrgUnits

public Collection<String> getOrgUnits(UserType user)

getOrgByOid

public OrgType getOrgByOid(String oid)
                    throws ObjectNotFoundException,
                           SchemaException
Throws:
ObjectNotFoundException
SchemaException

getOrgByName

public OrgType getOrgByName(String name)
                     throws ObjectNotFoundException,
                            SchemaException
Throws:
ObjectNotFoundException
SchemaException

getManagersOfOrg

public Collection<UserType> getManagersOfOrg(String orgOid)
                                      throws SchemaException
Throws:
SchemaException

isManagerOf

public boolean isManagerOf(UserType user,
                           String orgOid)

isMemberOf

public boolean isMemberOf(UserType user,
                          String orgOid)


Copyright © 2013 evolveum. All Rights Reserved.