Package org.opencms.db.log
Class CmsLogFilter
- java.lang.Object
-
- org.opencms.db.log.CmsLogFilter
-
- All Implemented Interfaces:
java.lang.Cloneable
public final class CmsLogFilter extends java.lang.Object implements java.lang.Cloneable
A filter to retrieve log entries.- Since:
- 8.0.0
-
-
Field Summary
Fields Modifier and Type Field Description static CmsLogFilter
ALL
To filter all.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
clone()
CmsLogFilter
excludeType(CmsLogEntryType type)
Returns an extended filter with the given type restriction.CmsLogFilter
filterFrom(long from)
Returns an extended filter with the starting date restriction.CmsLogFilter
filterResource(CmsUUID structureId)
Returns an extended filter with the given resource restriction.CmsLogFilter
filterTo(long to)
Returns an extended filter with the end date restriction.CmsLogFilter
filterUser(CmsUUID userId)
Returns an extended filter with the given user ID restriction.long
getDateFrom()
Returns the starting date restriction.long
getDateTo()
Returns the end date restriction.java.util.Set<CmsLogEntryType>
getExcludeTypes()
Returns the types to exclude.java.util.Set<CmsLogEntryType>
getIncludeTypes()
Returns the types to include.CmsUUID
getStructureId()
Returns the structure Id of the resource to filter.CmsUUID
getUserId()
Returns the user ID restriction.CmsLogFilter
includeType(CmsLogEntryType type)
Returns an extended filter with the given type restriction.boolean
matchType(CmsLogEntryType type)
Returnstrue
if the given log entry type matches this filter.java.lang.String
toString()
-
-
-
Field Detail
-
ALL
public static final CmsLogFilter ALL
To filter all.
-
-
Method Detail
-
clone
public java.lang.Object clone()
- Overrides:
clone
in classjava.lang.Object
- See Also:
Object.clone()
-
excludeType
public CmsLogFilter excludeType(CmsLogEntryType type)
Returns an extended filter with the given type restriction.- Parameters:
type
- the relation type to exclude- Returns:
- an extended filter with the given type restriction
-
filterFrom
public CmsLogFilter filterFrom(long from)
Returns an extended filter with the starting date restriction.- Parameters:
from
- the starting date to filter- Returns:
- an extended filter with the starting date restriction
-
filterResource
public CmsLogFilter filterResource(CmsUUID structureId)
Returns an extended filter with the given resource restriction.- Parameters:
structureId
- the structure id to filter- Returns:
- an extended filter with the given resource restriction
-
filterTo
public CmsLogFilter filterTo(long to)
Returns an extended filter with the end date restriction.- Parameters:
to
- the end date to filter- Returns:
- an extended filter with the end date restriction
-
filterUser
public CmsLogFilter filterUser(CmsUUID userId)
Returns an extended filter with the given user ID restriction.- Parameters:
userId
- the user ID to filter- Returns:
- an extended filter with the given user ID restriction
-
getDateFrom
public long getDateFrom()
Returns the starting date restriction.- Returns:
- the starting date restriction
-
getDateTo
public long getDateTo()
Returns the end date restriction.- Returns:
- the end date restriction
-
getExcludeTypes
public java.util.Set<CmsLogEntryType> getExcludeTypes()
Returns the types to exclude.- Returns:
- the types to exclude
-
getIncludeTypes
public java.util.Set<CmsLogEntryType> getIncludeTypes()
Returns the types to include.- Returns:
- the types to include
-
getStructureId
public CmsUUID getStructureId()
Returns the structure Id of the resource to filter.- Returns:
- the structure Id of the resource to filter
-
getUserId
public CmsUUID getUserId()
Returns the user ID restriction.- Returns:
- the user ID restriction
-
includeType
public CmsLogFilter includeType(CmsLogEntryType type)
Returns an extended filter with the given type restriction.- Parameters:
type
- the relation type to include- Returns:
- an extended filter with the given type restriction
-
matchType
public boolean matchType(CmsLogEntryType type)
Returnstrue
if the given log entry type matches this filter.- Parameters:
type
- the log entry type to test- Returns:
true
if the given log entry type matches this filter
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
- See Also:
Object.toString()
-
-