Class AuditLogBuilderImpl
- java.lang.Object
-
- jetbrains.buildServer.serverSide.impl.audit.AuditLogBuilderImpl
-
- All Implemented Interfaces:
AuditLogBuilder
public class AuditLogBuilderImpl extends Object implements AuditLogBuilder
- Author:
- Maxim.Manuylov Date: 27.04.2009
-
-
Field Summary
Fields Modifier and Type Field Description static StringAUDIT_MAX_NUMBER_OF_IDS_FOR_IN_CONDITIONstatic StringUSER_ACTION_CONDITION
-
Constructor Summary
Constructors Constructor Description AuditLogBuilderImpl(SQLRunnerEx sqlRunner, ProjectManager projectManager, CommentManager commentManager, SecurityContext securityContext, ObjectFinderProvider objectFinderProvider, AuditAdditionalObjectProvider additionalObjectProvider)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddFilter(AuditLogFilter filter)Adds a filter for log actions.AuditLogActionfindLastAction()Set<String>getAllObjectIds(ObjectType objectType)Returns set of all distinct ids for objects of the specified typeList<AuditLogAction>getLogActions(int maxActions)Returns built list of the audit log actions according to all filters.voidsetActionTypes(ActionType... actionTypes)Sets a set of action types we are interested invoidsetActionTypeSet(ActionTypeSet actionTypeSet)Sets a set of action types we are interested invoidsetCommentId(long commentId)Sets comment id we are interested invoidsetObjectId(String objectId)Sets object id we are interested invoidsetObjectIds(Collection<String> objectIds)Sets collection of ids of objects we're interested in.voidsetUserAction(boolean userAction)Only retrieve actions performed by usersvoidsetUserId(long userId)Sets user id we are interested in
-
-
-
Field Detail
-
AUDIT_MAX_NUMBER_OF_IDS_FOR_IN_CONDITION
public static final String AUDIT_MAX_NUMBER_OF_IDS_FOR_IN_CONDITION
- See Also:
- Constant Field Values
-
USER_ACTION_CONDITION
public static final String USER_ACTION_CONDITION
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AuditLogBuilderImpl
public AuditLogBuilderImpl(@NotNull SQLRunnerEx sqlRunner, @NotNull ProjectManager projectManager, @NotNull CommentManager commentManager, @NotNull SecurityContext securityContext, @NotNull ObjectFinderProvider objectFinderProvider, @NotNull AuditAdditionalObjectProvider additionalObjectProvider)
-
-
Method Detail
-
setObjectId
public void setObjectId(@NotNull String objectId)Description copied from interface:AuditLogBuilderSets object id we are interested in- Specified by:
setObjectIdin interfaceAuditLogBuilder- Parameters:
objectId- id of the object
-
setObjectIds
public void setObjectIds(@NotNull Collection<String> objectIds)Description copied from interface:AuditLogBuilderSets collection of ids of objects we're interested in.- Specified by:
setObjectIdsin interfaceAuditLogBuilder- Parameters:
objectIds- ids of objects
-
setUserId
public void setUserId(long userId)
Description copied from interface:AuditLogBuilderSets user id we are interested in- Specified by:
setUserIdin interfaceAuditLogBuilder- Parameters:
userId- id of the user
-
setUserAction
public void setUserAction(boolean userAction)
Description copied from interface:AuditLogBuilderOnly retrieve actions performed by users- Specified by:
setUserActionin interfaceAuditLogBuilder- Parameters:
userAction- if true, only users actions are returned, if false all actions are returned
-
setCommentId
public void setCommentId(long commentId)
Description copied from interface:AuditLogBuilderSets comment id we are interested in- Specified by:
setCommentIdin interfaceAuditLogBuilder- Parameters:
commentId- id of the comment
-
setActionTypeSet
public void setActionTypeSet(ActionTypeSet actionTypeSet)
Description copied from interface:AuditLogBuilderSets a set of action types we are interested in- Specified by:
setActionTypeSetin interfaceAuditLogBuilder- Parameters:
actionTypeSet- action type set
-
setActionTypes
public void setActionTypes(ActionType... actionTypes)
Description copied from interface:AuditLogBuilderSets a set of action types we are interested in- Specified by:
setActionTypesin interfaceAuditLogBuilder- Parameters:
actionTypes- action types
-
addFilter
public void addFilter(@NotNull AuditLogFilter filter)Description copied from interface:AuditLogBuilderAdds a filter for log actions. Action will be accepted if all the filters accept it.- Specified by:
addFilterin interfaceAuditLogBuilder- Parameters:
filter- filter
-
getAllObjectIds
@NotNull public Set<String> getAllObjectIds(@NotNull ObjectType objectType)
Description copied from interface:AuditLogBuilderReturns set of all distinct ids for objects of the specified type- Specified by:
getAllObjectIdsin interfaceAuditLogBuilder- Returns:
- set of all distinct ids for objects of the specified type
-
getLogActions
@NotNull public List<AuditLogAction> getLogActions(int maxActions)
Description copied from interface:AuditLogBuilderReturns built list of the audit log actions according to all filters.- Specified by:
getLogActionsin interfaceAuditLogBuilder- Parameters:
maxActions- if -1 returns all actions, otherwise returns no more than specified number of actions- Returns:
- built list of the audit log actions according to all filters
-
findLastAction
@Nullable public AuditLogAction findLastAction()
- Specified by:
findLastActionin interfaceAuditLogBuilder- Returns:
- the last action corresponding to specified filters or null, if there is no such action
-
-