public interface GradebookColumnAdminSession extends OsidSession
This session creates, updates, and deletes GradebookColumns.
The data for create and update is provided by the consumer via the
form object. OsidForms are requested for each create or
update and may not be reused.
Create and update operations differ in their usage. To create a
GradebookColumn, a GradebookColumnForm is requested
using getGradebookColumnFormForCreate() specifying the
desired record Types or none if no record Types
are needed. The returned GradebookColumnForm will
indicate that it is to be used with a create operation and can be used to
examine metdata or validate data prior to creation. Once the
GradebookColumnForm is submiited to a create operation, it cannot
be reused with another create operation unless the first operation was
unsuccessful. Each GradebookColumnForm corresponds to an
attempted transaction.
For updates, GradebookColumnForms are requested to the
GradebookColumn Id that is to be updated
using getGradebookColumnFormForUpdate(). Similarly, the
GradebookColumnForm has metadata about the data that can be
updated and it can perform validation before submitting the update. The
GradebookColumnForm can only be used once for a successful
update and cannot be reused.
The delete operations delete GradebookColumns To unmap
a GradebookColumn from the current Gradebook,
the GradebookColumnGradebookAssignmentSession
should be used. These delete operations attempt to remove the
GradebookColumnForm itself thus removing it from all known
Gradebook catalogs.
This session includes an Id aliasing mechanism to
assign an external Id to an internally assigned Id.
| Modifier and Type | Method and Description |
|---|---|
void |
aliasGradebookColumn(Id gradebookColumnId,
Id aliasId)
Adds an
Id to a GradebookColumn for the
purpose of creating compatibility. |
boolean |
canCreateGradebookColumns()
Tests if this user can create gradebook columns.
|
boolean |
canCreateGradebookColumnWithRecordTypes(Type[] gradebookColumnRecordTypes)
Tests if this user can create a single
GradebookColumn
using the desired record types. |
boolean |
canDeleteGradebookColumns()
Tests if this user can delete gradebook columns.
|
boolean |
canManageGradebookColumnAliases()
Tests if this user can manage
Id aliases for
GradebookColumns. |
boolean |
canUpdateGradebookColumns()
Tests if this user can update gradebook columns.
|
void |
copyGradebookColumnEntries(Id sourceGradebookColumnId,
Id targetGradebookColumnId)
Copies gradebook column entries from one column to another.
|
GradebookColumn |
createGradebookColumn(GradebookColumnForm gradebookColumnForm)
Creates a new
GradebookColumn. |
void |
deleteGradebookColumn(Id gradebookColumnId)
Deletes the
GradebookColumn identified by the given
Id. |
Gradebook |
getGradebook()
Gets the
Gradebook associated with this session. |
GradebookColumnForm |
getGradebookColumnFormForCreate(Type[] gradebookColumnRecordTypes)
Gets the gradebook column form for creating new gradebook columns.
|
GradebookColumnForm |
getGradebookColumnFormForUpdate(Id gradebookColumnId)
Gets the gradebook column form for updating an existing gradebook
column.
|
Id |
getGradebookId()
Gets the
Gradebook Id associated with
this session. |
void |
moveGradebookColumn(Id frontGradebookColumnId,
Id backGradebookColumnId)
Moves a gradebook column in front of another.
|
void |
sequenceGradebookColumns(IdList gradebookColumnIds)
Resequences the gradebook columns.
|
void |
updateGradebookColumn(GradebookColumnForm gradebookColumnForm)
Updates an existing gradebook column.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseId getGradebookId()
Gradebook Id associated with
this session. Gradebook Id associated with this sessionmandatory - This method must be implemented. Gradebook getGradebook() throws OperationFailedException, PermissionDeniedException
Gradebook associated with this session. Gradebook associated with this sessionOperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean canCreateGradebookColumns()
PERMISSION_DENIED. This is intended as a hint to an
application that may opt not to offer create operations to an
unauthorized user. false if GradebookColumn
creation is not authorized, true otherwisemandatory - This method must be implemented. boolean canCreateGradebookColumnWithRecordTypes(Type[] gradebookColumnRecordTypes)
GradebookColumn
using the desired record types. While
GradingManager.getGradebookColumnRecordTypes() can be used to
examine which records are supported, this method tests which record(s)
are required for creating a specific GradebookColumn.
Providing an empty array tests if a GradebookColumn can
be created with no records.gradebookColumnRecordTypes - array of gradebook column record
types true if GradebookColumn creation
using the specified record Types is supported,
false otherwiseNullArgumentException -
gradebookColumnRecordTypes is null mandatory - This method must be implemented. GradebookColumnForm getGradebookColumnFormForCreate(Type[] gradebookColumnRecordTypes) throws OperationFailedException, PermissionDeniedException
gradebookColumnRecordTypes - array of gradebook column record
typesNullArgumentException -
gradebookColumnRecordTypes is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException - unable to get form for requested
record typesmandatory - This method must be implemented. GradebookColumn createGradebookColumn(GradebookColumnForm gradebookColumnForm) throws OperationFailedException, PermissionDeniedException
GradebookColumn. gradebookColumnForm - the form for this GradebookColumn
GradebookColumn IllegalStateException - gradebookColumnForm
already used in a create transactionInvalidArgumentException - one or more of the form
elements is invalidNullArgumentException - gradebookColumnForm
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException - gradebookColumnForm
did not originate from
getGradebookColumnFormForCreate() mandatory - This method must be implemented. boolean canUpdateGradebookColumns()
GradebookColumn will result
in a PERMISSION_DENIED. This is intended as a hint to
an application that may opt not to offer update operations to an
unauthorized user. false if gradebook column modification is not
authorized, true otherwisemandatory - This method must be implemented. GradebookColumnForm getGradebookColumnFormForUpdate(Id gradebookColumnId) throws NotFoundException, OperationFailedException, PermissionDeniedException
gradebookColumnId - the Id of the
GradebookColumn NotFoundException - gradebookColumnId is
not foundNullArgumentException - gradebookColumnId
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void updateGradebookColumn(GradebookColumnForm gradebookColumnForm) throws OperationFailedException, PermissionDeniedException
gradebookColumnForm - the form containing the elements to be
updatedIllegalStateException - gradebookColumnForm
already used in an update transactionInvalidArgumentException - the form contains an invalid
valueNullArgumentException - gradebookColumnForm
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failureUnsupportedException - gradebookColumnForm
did not originate from
getGradebookColumnFormForUpdate() mandatory - This method must be implemented. void sequenceGradebookColumns(IdList gradebookColumnIds) throws OperationFailedException, PermissionDeniedException
gradebookColumnIds - the Ids of the
GradebookColumns NullArgumentException - gradebookColumnIdList
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void moveGradebookColumn(Id frontGradebookColumnId, Id backGradebookColumnId) throws NotFoundException, OperationFailedException, PermissionDeniedException
frontGradebookColumnId - the Id of a
GradebookColumn backGradebookColumnId - the Id of a
GradebookColumn NotFoundException - frontGradebookColumnId or
backGradebookColumnId is not foundNullArgumentException - frontGradebookColumnId
or backGradebookColumnId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void copyGradebookColumnEntries(Id sourceGradebookColumnId, Id targetGradebookColumnId) throws NotFoundException, OperationFailedException, PermissionDeniedException
sourceGradebookColumnId - the Id of a
GradebookColumn targetGradebookColumnId - the Id of a
GradebookColumn NotFoundException - sourceGradebookColumnId
ortargetGradebookColumnId is not foundNullArgumentException - sourceGradebookColumnId
targetGradebookColumnId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean canDeleteGradebookColumns()
GradebookColumn will result
in a PERMISSION_DENIED. This is intended as a hint to
an application that may opt not to offer delete operations to an
unauthorized user. false if GradebookColumn
deletion is not authorized, true otherwisemandatory - This method must be implemented. void deleteGradebookColumn(Id gradebookColumnId) throws NotFoundException, OperationFailedException, PermissionDeniedException
GradebookColumn identified by the given
Id. gradebookColumnId - the Id of the
GradebookColumn to deleteNotFoundException - a GradebookColumn
was not found identified by the given Id NullArgumentException - gradebookColumnId
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean canManageGradebookColumnAliases()
Id aliases for
GradebookColumns. A return of true does not guarantee
successful authorization. A return of false indicates that it is known
changing an alias will result in a PERMISSION_DENIED.
This is intended as a hint to an application that may opt not to offer
alias operations to an unauthorized user. false if GradebookColumn
aliasing is not authorized, true otherwisemandatory - This method must be implemented. void aliasGradebookColumn(Id gradebookColumnId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Id to a GradebookColumn for the
purpose of creating compatibility. The primary Id of
the GradebookColumn is determined by the provider. The
new Id performs as an alias to the primary Id.
If the alias is a pointer to another gradebook column, it is
reassigned to the given gradebook column Id. gradebookColumnId - the Id of a
GradebookColumn aliasId - the alias Id AlreadyExistsException - aliasId is
already assignedNotFoundException - gradebookColumnId
not foundNullArgumentException - gradebookColumnId
or aliasId is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.