Package mks.ci.server.engine
Class LocalTriggerManager.ScriptDynamicGroupBean
- java.lang.Object
-
- mks.frame.triggers.ScriptExposableBaseBean
-
- mks.frame.triggers.beans.ScriptBaseBean
-
- mks.ci.server.engine.LocalTriggerManager.ScriptIMBaseBean
-
- mks.ci.server.engine.LocalTriggerManager.ScriptIdentifiedBean
-
- mks.ci.server.engine.LocalTriggerManager.ScriptPrincipalBean
-
- mks.ci.server.engine.LocalTriggerManager.ScriptDynamicGroupBean
-
- All Implemented Interfaces:
mks.frame.triggers.ScriptExposableBean
- Enclosing class:
- LocalTriggerManager
public static class LocalTriggerManager.ScriptDynamicGroupBean extends LocalTriggerManager.ScriptPrincipalBean implements mks.frame.triggers.ScriptExposableBean
Bean which encompasses a dynamic group. A dynamic group is a group whose membership dynamically changes as the value of the project field changes.Use the
getDynamicGroupBean
method on theimServerBean
to obtain a handle to one of these beans.
-
-
Constructor Summary
Constructors Constructor Description ScriptDynamicGroupBean(mks.ci.server.engine.DynamicGroup dynamicGroup, int userId, java.sql.Connection c)
Create a new DynamicGroupBean
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getExposedName()
Get the name of this bean:imDynamicGroupBean
java.lang.String[]
getGroups(java.lang.String project)
Returns the group members in this group given the project providedjava.lang.String[]
getUsers(java.lang.String project)
Returns the users in this group given the project providedboolean
isUserMemberOf(java.lang.String userName, java.lang.String project)
Verifies if a user is a member of dynamic group for the specified project.-
Methods inherited from class mks.ci.server.engine.LocalTriggerManager.ScriptPrincipalBean
getEmailAddress, getName, isActive
-
Methods inherited from class mks.ci.server.engine.LocalTriggerManager.ScriptIdentifiedBean
getCreatedDate, getCreatedUser, getInternalID, getModifiedDate, getModifiedUser
-
Methods inherited from class mks.ci.server.engine.LocalTriggerManager.ScriptIMBaseBean
getCurrentDatabaseTime, getCurrentDatabaseTime, getCurrentUser, getServerBean, getUserID, isParallelProcessingEnabled
-
Methods inherited from class mks.frame.triggers.beans.ScriptBaseBean
getEnvironmentBean, setEnvironmentBean
-
-
-
-
Method Detail
-
getUsers
public java.lang.String[] getUsers(java.lang.String project) throws mks.frame.triggers.TriggerException
Returns the users in this group given the project provided- Parameters:
project
- The project to use as a context for the dynamic group- Returns:
- the users in this group given the project provided
- Throws:
mks.frame.triggers.TriggerException
- If the project does not exist.
-
getGroups
public java.lang.String[] getGroups(java.lang.String project) throws mks.frame.triggers.TriggerException
Returns the group members in this group given the project provided- Parameters:
project
- The project to use as a context for the dynamic group- Returns:
- the group members in this group given the project provided
- Throws:
mks.frame.triggers.TriggerException
- If the project does not exist.
-
getExposedName
public java.lang.String getExposedName()
Get the name of this bean:imDynamicGroupBean
- Specified by:
getExposedName
in interfacemks.frame.triggers.ScriptExposableBean
- Specified by:
getExposedName
in classScriptBaseBean
- Returns:
- the bean name:
imDynamicGroupBean
.
-
isUserMemberOf
public boolean isUserMemberOf(java.lang.String userName, java.lang.String project) throws mks.frame.triggers.TriggerException
Verifies if a user is a member of dynamic group for the specified project.- Parameters:
userName
- The current user nameproject
- The project to use as a context for the dynamic group. Note that a null project means to use an unspecified project with project id of 0.- Returns:
- true if the user is member of dynamic group for the project.
- Throws:
mks.frame.triggers.TriggerException
- If the project does not exist.
-
-