org.sakaiproject.component.legacy.assignment
Interface BaseAssignmentService.AssignmentStorage

All Known Implementing Classes:
DbAssignmentService.DbCachedAssignmentStorage
Enclosing interface:
BaseAssignmentService

protected static interface BaseAssignmentService.AssignmentStorage

Assignment Storage


Method Summary
 void cancel(AssignmentEdit assignment)
          Cancel the changes and release the lock.
 boolean check(String id)
          Check if an Assignment by this id exists.
 void close()
          Close.
 void commit(AssignmentEdit assignment)
          Commit the changes and release the lock.
 AssignmentEdit edit(String id)
          Get a lock on the Assignment with this id, or null if a lock cannot be gotten.
 Assignment get(String id)
          Get the Assignment with this id, or null if not found.
 List getAll(String context)
          Get all Assignments.
 void open()
          Open.
 AssignmentEdit put(String id, String context)
          Add a new Assignment with this id.
 void remove(AssignmentEdit assignment)
          Remove this Assignment.
 

Method Detail

open

public void open()
Open.


close

public void close()
Close.


check

public boolean check(String id)
Check if an Assignment by this id exists.

Parameters:
id - The assignment id.
Returns:
true if an Assignment by this id exists, false if not.

get

public Assignment get(String id)
Get the Assignment with this id, or null if not found.

Parameters:
id - The Assignment id.
Returns:
The Assignment with this id, or null if not found.

getAll

public List getAll(String context)
Get all Assignments.

Returns:
The list of all Assignments.

put

public AssignmentEdit put(String id,
                          String context)
Add a new Assignment with this id.

Parameters:
id - The Assignment id.
context - The context.
Returns:
The locked Assignment object with this id, or null if the id is in use.

edit

public AssignmentEdit edit(String id)
Get a lock on the Assignment with this id, or null if a lock cannot be gotten.

Parameters:
id - The Assignment id.
Returns:
The locked Assignment with this id, or null if this records cannot be locked.

commit

public void commit(AssignmentEdit assignment)
Commit the changes and release the lock.


cancel

public void cancel(AssignmentEdit assignment)
Cancel the changes and release the lock.


remove

public void remove(AssignmentEdit assignment)
Remove this Assignment.