|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.basedb.core.BasicItem<ChangeHistoryDetailData> net.sf.basedb.core.ChangeHistory
public class ChangeHistory
Field Summary | |
---|---|
static Item |
TYPE
The type of item represented by this class. |
Constructor Summary | |
---|---|
ChangeHistory(ChangeHistoryDetailData data)
|
Method Summary | |
---|---|
static int |
deleteStrayEntries(ProgressReporter progress)
Delete all change history entries that are linking to non-existing items. |
static ChangeHistory |
getById(DbControl dc,
int id)
Get a ChangeHistory item when you know the ID. |
String |
getChangeInfo()
Get some additional free-text information about the change. |
static ItemQuery<ChangeHistory> |
getChangesBy(Job job)
Get all changes made by the specified job. |
static ItemQuery<ChangeHistory> |
getChangesBy(User user)
Get all changes made by the specified user. |
static ItemQuery<ChangeHistory> |
getChangesIn(Session session)
Get all changes made in the specified session. |
ChangeType |
getChangeType()
Get the type of change that was made. |
Client |
getClient(DbControl dc)
Load the client application that was used when the change was made. |
Integer |
getClientId()
Get the ID of the client application that was used to make the change. |
static ItemQuery<ChangeHistory> |
getHistoryOf(BasicItem item)
Get the change history for a given item. |
BasicItem |
getItem(DbControl dc)
Load the item that was changed. |
int |
getItemId()
Get the ID of the item that was changed. |
Item |
getItemType()
Get the type of the item that was changed. |
Job |
getJob(DbControl dc)
Load the job that was executing when the change was made. |
Integer |
getJobId()
Get the ID of the job that was executing when the change was made |
PluginDefinition |
getPlugin(DbControl dc)
Load the plug-in that made the change. |
Integer |
getPluginId()
Get the ID of the plug-in that was making the change. |
Project |
getProject(DbControl dc)
Load the project that was active when the change was made. |
Integer |
getProjectId()
Get the ID of the project that was active when the change was made. |
Session |
getSession(DbControl dc)
Load the session in which the change was made. |
int |
getSessionId()
Get the ID of the session in which the change was made. |
Date |
getTime()
Get the date and time the change was made. |
Item |
getType()
Get the type of item represented by the object. |
User |
getUser(DbControl dc)
Load the user that made the change. |
int |
getUserId()
Get the ID of the user that made the change. |
(package private) void |
initPermissions(int granted,
int denied)
WRITE permission and higher is always denied. |
Methods inherited from class net.sf.basedb.core.BasicItem |
---|
addUsingItems, addUsingItems, checkPermission, equals, getData, getDbControl, getId, getPermissions, getPluginPermissions, getSessionControl, getUsingItems, getVersion, hashCode, hasPermission, isDetached, isInDatabase, isUsed, onAfterCommit, onAfterInsert, onBeforeCommit, onRollback, setDbControl, setProjectDefaults, toString, toTransferable, validate |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final Item TYPE
Item.CHANGEHISTORY
,
getType()
Constructor Detail |
---|
ChangeHistory(ChangeHistoryDetailData data)
Method Detail |
---|
public static ChangeHistory getById(DbControl dc, int id) throws ItemNotFoundException, PermissionDeniedException, BaseException
ChangeHistory
item when you know the ID.
dc
- The DbControl
which will be used for
permission checking and database access.id
- The ID of the item to load
ChangeHistory
item
ItemNotFoundException
- If an item with the specified
ID is not found
PermissionDeniedException
- If the logged in user doesn't
have Permission.READ
permission to the item
BaseException
- If there is another errorpublic static ItemQuery<ChangeHistory> getHistoryOf(BasicItem item)
item
- The item to get the change history for
InvalidUseOfNullException
- If the item is nullpublic static ItemQuery<ChangeHistory> getChangesBy(User user)
user
- A user object
InvalidUseOfNullException
- If the user is nullpublic static ItemQuery<ChangeHistory> getChangesBy(Job job)
job
- A job object
InvalidUseOfNullException
- If the job is nullpublic static ItemQuery<ChangeHistory> getChangesIn(Session session)
session
- A session object
InvalidUseOfNullException
- If the session is nullpublic static int deleteStrayEntries(ProgressReporter progress)
progress
- An optional progress reporterpublic Item getType()
Identifiable
Item
enumeration.
void initPermissions(int granted, int denied) throws BaseException
initPermissions
in class BasicItem<ChangeHistoryDetailData>
granted
- Permissions that have been granted by the subclassdenied
- Permissions that have been denied by the subclass
BaseException
- If the permissions couldn't be initialisedpublic Date getTime()
public ChangeType getChangeType()
public int getItemId()
public Item getItemType()
public BasicItem getItem(DbControl dc)
dc
- A DbControl to use for database access, or null to
use the same DbControl this history entry belongs to
ItemNotFoundException
- If the item no longer exists in
the database
PermissionDeniedException
- If the logged in user doesn't
have permission to access the itempublic String getChangeInfo()
public int getUserId()
public User getUser(DbControl dc)
dc
- A DbControl to use for database access, or null to
use the same DbControl this history entry belongs to
ItemNotFoundException
- If the user no longer exists in
the database
PermissionDeniedException
- If the logged in user doesn't
have permission to access the other userpublic int getSessionId()
public Session getSession(DbControl dc)
dc
- A DbControl to use for database access, or null to
use the same DbControl this history entry belongs to
ItemNotFoundException
- If the session no longer exists in
the database
PermissionDeniedException
- If the logged in user doesn't
have permission to access the sessionpublic Integer getClientId()
public Client getClient(DbControl dc)
dc
- A DbControl to use for database access, or null to
use the same DbControl this history entry belongs to
ItemNotFoundException
- If the client application no longer exists in
the database
PermissionDeniedException
- If the logged in user doesn't
have permission to access the clientpublic Integer getProjectId()
public Project getProject(DbControl dc)
dc
- A DbControl to use for database access, or null to
use the same DbControl this history entry belongs to
ItemNotFoundException
- If the client application no longer exists in
the database
PermissionDeniedException
- If the logged in user doesn't
have permission to access the projectpublic Integer getPluginId()
public PluginDefinition getPlugin(DbControl dc)
dc
- A DbControl to use for database access, or null to
use the same DbControl this history entry belongs to
ItemNotFoundException
- If the plug-in no longer exists in
the database
PermissionDeniedException
- If the logged in user doesn't
have permission to access the plug-inpublic Integer getJobId()
public Job getJob(DbControl dc)
dc
- A DbControl to use for database access, or null to
use the same DbControl this history entry belongs to
ItemNotFoundException
- If the job no longer exists in
the database
PermissionDeniedException
- If the logged in user doesn't
have permission to access the job
|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |